Adding multiple datacenter's to Prometheus


I’m very new to icinga.

We have icinga, prometheus and Grifana for monitoring our cloud servers.

may i ask how to classify the cloud servers into different datacenters ?

ex: qa cloud servers into datacenter=“dc01”
dev cloud servers into datacenter =“dc02”

Thanks in advance.


welcome to the community. Just a few tips beforehand: Always choose a matching category for your questions, #community doesn’t fit here, so I’ve moved it to #icinga-2-core.

In terms of your question, I’m not sure about the purpose of “classification”. Is that for views on your web interface, a specific notification rule, or something else? The most simplest solution for a preliminary classification would be “host groups”, where these hosts can be a member of.

With the power of assign where expressions, this can be achieved either with the host name pattern, or just by using custom variable providers in the host object.

object Host "obviously-qa-server" {
  vars.server_type = "qa"

object HostGroup "qa-servers" {
  assign where host.vars.server_type == "qa"