0
votes

The provided grafana dashboard for node-exporter automatically retrieves the node-exporter scrape configs vor the variable job by this query: label_values(node_uname_info, job).

Is it possible to query for job variable values for my own prometheus scrape configs (for example by a pattern like prom-scrape-*)?

At the moment I'm using prometheus and grafana with docker. A kubernetes solution would be also nice.

2

2 Answers

0
votes
  1. You configure a query in the grafana variable configuration which will return the required values.
  2. You extract the value by a regular expression.

This example will extract all solr prometheus scrape jobs:

Variable Configuration

0
votes

Let me know if this helps

Step 1 - Add Prometheus scraping in your code for different metrics
Step 2 - Verify that the metrics can be seen from Prometheus
Step 3 - Create a new dashboard and write your own query. Choose Prometheus from the dropdown.

enter image description here