On Saturday, 3 October 2020 22:18:08 UTC+1, Erick wrote:
>
> You're right I should have looked into these labels more, looks like I was 
> summing without these labels to get rid of them.
>

> https://www.robustperception.io/controlling-the-instance-label
> The relabel config solution in this post is one solution I was looking 
> for. The other one would be to make node-exporter and process-exporter be 
> scraped under the same job, so that they have the same job label. 
> I'll have to look into which solution is preferred, if either.
>
>
You should have separate jobs, especially if you're manipulating the 
instance label.  This is in case there are two metrics which happen to have 
the same name: if they are in separate jobs you can guarantee they will be 
in separate timeseries.

blah{instance="foo",job="node"}
blah{instance="foo",job="process"}

It also allows for better concurrency in collection.

I guess the real question I should have asked first, is why don't they have 
> any labels in common in the first place.
>

Perhaps it would have been better if the port number had been a separate 
attribute (e.g. metrics_port, like metrics_path), so that __address__ only 
contained the address, not the address+port.  But I think it's unlikely 
that will change.

Regards,

Brian. 

-- 
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 prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/d4d237a9-bc55-4d66-9c91-425116f07914o%40googlegroups.com.

Reply via email to