Add prometheus self scraping target

This will make prometheus scrape its own metrics. This can be useful
to verify basic functionality of prometheus or to have some known
metrics to work with in other tests.

For example we use the prometheus_ready metric to check
basic functionality of the CLI part of the observabilityclient
here https://opendev.org/openstack/python-observabilityclient/src/branch/master/observabilityclient/tests/functional/test_cli.py#L129

Change-Id: Icfaba3bec04a6ef48b0365566b757fb8261c65c4
This commit is contained in:
Jaromir Wysoglad 2025-04-09 09:34:20 -04:00
parent c9faa98672
commit a4a8153583

View File

@ -5,6 +5,7 @@ scrape_configs:
- job_name: "node"
static_configs:
- targets: ["localhost:9882"]
- targets: ["localhost:9090"] # prometheus target
- targets: ["localhost:9100"] # node_exporter target
# labels:
# fqdn: "controller" # node_exporter fqdn