The machine knows its own name, couldn't Prometheus use it?
A blog on monitoring, scale and operational Sanity
The machine knows its own name, couldn't Prometheus use it?
It's often claimed that an advantage of push-based monitoring systems is that, compared to pull-based systems like Prometheus, they don't need service discovery. This isn't true, and I'm going to explain why.
In a previous post I said that rather than adding another label such as host
or alias
to a target to give it a useable name, you should instead change the instance
label. Let's see how you do that.
How should you choose the labels to put on your Prometheus monitoring targets? Let's take a look.
Prometheus labels allow you to model your application deployment in the manner best suited to your organisation. As directly supporting every potential configurations would be impossible, we offer relabelling to give you the flexibility to configure things how you'd like.
Prometheus offers a number of ways to find the targets to scrape, DNS, EC2, Consul, Kubernetes, Zookeeper and Marathon. But what if what you aren't using one of those?
Whether you're on bare metal or using a cloud provider, there's a question you should always be able to answer. What machines do I have, and what is meant to be running on them?
Read more