So if you have two instances of the same application you'd normally only have a single job with two instances listed.
What are you trying to do in Grafana? That looks a bit like the variables page rather than a panel in the dashboard. On 26 November 2021 14:56:35 GMT, Mohammad Khoschnasar <[email protected]> wrote: >Sorry @stuartclark > >I have sent mistakenly a private message to you. > >In case other users can also follow, I have two Traefik instances and >respectively I have defined two jobs for them in my prometheus.yml . > >So I'm able to reach the jobs in the dashboard's setting by: >label_value(job) >But a combination like label_values(service, job) doesn't work and I'm >still getting all services. Please check the pic: > >[image: Bildschirmfoto 2021-11-26 um 15.45.19.png] > >I'm sort of looking for an AND between the job_name and the services >related to the specific job. > > >On Friday, November 26, 2021 at 3:27:17 PM UTC+1 Stuart Clark wrote: > >> On 26/11/2021 14:08, Mohammad Khoschnasar wrote: >> > Hi all, >> > >> > I'm a newbie in prometheus. So go easy on me please. >> > >> > So I have two apps with similar metrics, which I want to scrape >> > metrics to prometheus. My prometheus is installed on OS (no k8s). I >> > have defined jobs for these two apps in my prometheus.yml and then >> > defined another datasource in grafana. >> > >> > The problem is that metrics are being mixed, because they're coming to >> > one prometheus datasource(I have no idea how to route the metrics for >> > second app to the second datasource). >> > >> > I also tried to separate them into different dashboards with the help >> > of adding query (instance) to the PromQL section in grafana, but no >> > luck. I don't know if this is the right thing to do. >> > >> > So please someone explain to me, how this situations in real world works. >> > >> A datasource in Grafana is for connecting to a particular Prometheus >> instance, so in your case you'd only have a single one as you only have >> one Prometheus server. >> >> You can then use PromQL to query your metrics. Each job automatically >> gets both instance & job labels added, so you'd be able to differentiate >> between your two apps. >> >> -- >> Stuart Clark >> >> > >-- >You received this message because you are subscribed to the Google Groups >"Prometheus Users" group. >To unsubscribe from this group and stop receiving emails from it, send an >email to [email protected]. >To view this discussion on the web visit >https://groups.google.com/d/msgid/prometheus-users/599d7e25-6e4f-472f-8c0d-b84b52279c60n%40googlegroups.com. -- Sent from my Android device with K-9 Mail. Please excuse my brevity. -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/FA43EE9C-EBB7-4777-A695-90B2C4195BD8%40Jahingo.com.

