Skip to content

Set host name as label for all prometheus metrics #162

Closed Answered by burningalchemist
abhi-kapoor asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @abhi-kapoor, sorry for the late answer, I was on a sick leave.

Personally, I'd avoid mixing two different types of instances, but it might work, I just haven't extensively tested it. Have a look at this example? This variant adds instance labels automatically.

As a side note: the main use case for this exporter is usually running it as a sidecar container in Kubernetes. With a small footprint it's not a big deal to collect data from this exporter. Alternative usage is always welcome, but dispatching requests to multiple database instances contradicts with a goal of being simple.

Let me know if it works or what are the issues. 🙂

Kind regards,
Sergei

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by burningalchemist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants