thanks. 

On Saturday, June 6, 2020 at 7:57:51 AM UTC-4, Brian Candler wrote:
>
> Yes, by adding the common labels to each target group:
>
> [
>   {
>     "targets": [
>       "localhost:9100"
>     ],
>     "labels": {
> *      "env": "production",*
>       "job": "slave"
>     }
>   },
>   {
>     "targets": [
>       "localhost:9200"
>     ],
>     "labels": {
> *      "env": "production",*
>       "job": "master"
>     }
>   }
> ]
>
> (pre-process your JSON if you don't like doing that by hand).  
> Alternatively, if the labels are common to *all* targets in that file, then 
> you can add them using label rewriting in the prometheus job config.
>
> Note though: it is generally not a good idea to override the "job" label.  
> This is one used by prometheus itself to identify the scrape job, and helps 
> to keep metrics unique.
>

-- 
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/8098cd2f-3c73-4463-b21a-4f41f5d65db1o%40googlegroups.com.

Reply via email to