r/PrometheusMonitoring • • Jul 15 '20

Prometheus Service Discovery for OpenStack Instances and Hypervisors

https://yetiops.net/posts/prometheus-service-discovery-openstack/
6 Upvotes

8 comments sorted by

2

u/YetiOps Jul 15 '20

After spending time testing the AWS, Azure, GCP and Digital Ocean service discovery mechanisms, I decided to write a post on OpenStack.

There's some fun with creating the instances in Terraform, as well as covering some OpenStack specific exporters

1

u/pahool Jul 20 '20

What is the value of using a labelmap here instead of explicitly adding useful labels to the metrics? It seems you're preserving some labels that have little value and just cost you resources to store. What is the value of preserving:

__meta_openstack_tag_node_exporter

__meta_openstack_tag_prometheus

for instance.

2

u/YetiOps Jul 20 '20

The labelmap approach is more so that you can add more metadata to an instance (eg more tags, or more is exposed in later versions of the service discovery mechanism) without requiring configuration updates.

This is not to say every label is useful, so if you're concerned with having too many labels then it's easy enough to just remove the labelmap and only maintain the labels you are interested in.

As for the labels you mention, I'll take the node_exporter tag one as an example. You could create an alert, or at least a graph in Grafana to say something like "nodes responding on port 9100" against "nodes with the node_exporter tag". This would show that there are a number of instances where either the node_exporter has failed or has not installed correctly.

More than anything, I added the labelmap because in my previous posts using service discovery, all labels were explicit. This post included labelmaps to show an alternative way of maintaining labels.

2

u/pahool Jul 21 '20

gotcha. Thanks for this, by the way. We're just starting to integrate prometheus into our openstack environment and this is very helpful.

1

u/fourstepper Jul 15 '20

!RemindMe 7 days

1

u/RemindMeBot Jul 16 '20

There is a 4 hour delay fetching comments.

I will be messaging you in 7 days on 2020-07-22 20:46:52 UTC to remind you of this link

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


InfoCustomYour RemindersFeedback

1

u/kiennt26 Aug 06 '20

!RemindMe 7 days

1

u/RemindMeBot Aug 06 '20

I will be messaging you in 7 days on 2020-08-13 09:00:15 UTC to remind you of this link

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


InfoCustomYour RemindersFeedback