Prometheus adds "job" and "instance" labels to all scraped metrics.
Therefore, show some examples of your metrics once they have been stored in Prometheus: what is in the "instance" label? Does it not already distinguish them? If not, then show your Prometheus scrape job configuration. On Friday, 8 September 2023 at 15:37:14 UTC+1 sneha wrote: > Hi Brian, > > thanks it worked , using curl i am able to scrape individual database. > any idea that is it possible in openshift to distinguish that metrics is > of which instance. > > Regards, > Sneha > > On Monday, September 4, 2023 at 4:05:47 PM UTC+5:30 Brian Candler wrote: > >> On Monday, 4 September 2023 at 10:15:06 UTC+1 sneha wrote: >> >> i tried adding multiple db instance in .my.cnf file with mysql exporter >> version 0.15.0 but it only scrape DB instance only. >> is there any sample to use mutliple DB instance for single exporter >> >> >> Yes, there is an example Prometheus config at >> https://github.com/prometheus/mysqld_exporter/#multi-target-support >> (see under "On the prometheus side ... ") >> >> It sets the `target` parameter for each scrape to the DB of interest, >> whilst setting __address__ to point to the exporter itself. >> >> Before doing this, make sure you're able to scrape the exporter directly >> using curl, i.e. >> curl 'http://localhost:9104/probe?target=server1:3306' >> curl 'http://localhost:9104/probe?target=server2:3306' >> should give you metrics for the two servers. >> >> and how to distinguish scrape data is of which instance. >> >> >> In a label. The example config that I linked above copies >> "__param_target" to "instance", so the "instance" label tells you which DB >> target was being scraped. >> > -- 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/5c178dfd-60c8-431b-936c-a90d2d4ee898n%40googlegroups.com.

