Hello @Prafulla Nawale ,
welcome to this moderated Azure community forum.
The Azure IoT edge solution comes with a standard metric collection solution.
To start with your second question, the metric collector scrapes data from Prometheus endpoints like the ones offered by the EdgeHub and the EdgeAgent.
These endpoints look like HTTP endpoints so it's not the edge agent who publishes but it's the metrics collector.
The default scrape interval for the metrics collector is 5 minutes (300 seconds).
You can alter the scrape interval by updating the 'ScrapeFrequencyInSecs' setting to scrape sooner or later.
Check out this blog post for a working example.
If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.