We have a Prometheus, a Grafana service and multiple exporters. This is prometheus.yaml config:
scrape_configs:
- job_name: app1
scrape_interval: 30s
scheme: http
static_configs:
- targets: ['x.y.z.10:7380']
- job_name: app2
scrape_interval: 30s
scheme: http
static_configs:
- targets: ['x.y.z.11:7380']
- job_name: app3
scrape_interval: 30s
scheme: http
static_configs:
- targets: ['x.y.z.12:7380']
from Grafana's point of view, those scrapes will be accessed as a single data source. However, to make different dashboards for every application (app1, app2 and app3) we separated them by appending job filter {job="appX"} to queries/metrics.
This makes two problems, the first one is, we have to add {job="appX"} after every metric. The second one is, the list of metrics are populated of unrelated items from another jobs.
Is there any method in Prometheus or Grafana to make each job as separated as a data source? In which we don't have to add {job="appX"} to metrics. Let's say we don't have any access to another job's metrics in a specific dashboard.