mesos_exporter
mesos_exporter copied to clipboard
Classic Incorrect Label Values Problem
After a discussion with SuperQ on IRC he concluded the following:
There are labels for "percent", "total", "free", and "used". This makes using Prometheus harder.
If they correctly used the metric, it would look like this:
(mesos_master_allocator_resources_free_cpus + mesos_master_allocator_resources_used_cpus) and mesos_master_elected == 1
At a minimum, they should just delete the percent and total so you could do it this way:
sum without (type) (mesos_master_allocator_resources_cpus) and mesos_master_elected == 1
I guess the request is to follow prometheus exporter best practices.
I would probably do these two metrics:
mesos_master_allocator_resources_used_cpus
mesos_master_allocator_resources_total_cpus
This way it's easier to derive things:
- Used ratio:
mesos_master_allocator_resources_used_cpus / mesos_master_allocator_resources_total_cpus
- Free ratio
1 - (mesos_master_allocator_resources_used_cpus / mesos_master_allocator_resources_total_cpus)
- Free:
mesos_master_allocator_resources_total_cpus - mesos_master_allocator_resources_used_cpus
It also makes it easier to join like pointed out above, and reduces the number of metrics that need to be stored.
This is very similar to #11. I'm in favor of both of these issues, however we need to consider backwards compatibility for everyone who already has dashboards built on the current metrics.