Viewing Monitored Targets

When setting up a new Prometheus server, it's a good practice to check whether it is scraping all of its targets correctly.

Navigate to http://<machine-ip>:9090/targets to view a list of all targets, grouped by their scrape configuration in the Prometheus server configuration file:

Prometheus targets overview page

Verify that Prometheus is able to scrape itself - the one target endpoint for the prometheus scrape configuration should be shown in green as UP.

In case anything goes wrong during a scrape (whether this is due to a DNS resolution failure, a connection timeout, a bad metrics payload format, or something else), the target would be shown as DOWN, along with an error message providing more detail about the scrape failure. This is helpful for quickly spotting misconfigurations or finding unhealthy targets.

For example, if you had configured Prometheus to scrape itself on an incorrect port (9091 instead of 9090), the targets page would indicate a connection refused error:

Prometheus targets page with error