prometheus-junkyard / mesos_exporter

Prometheus exporter for Mesos, deprecated.
Apache License 2.0
42 stars 22 forks source link

Add metrics from /metrics/snapshot endpoint for master and slaves #11

Closed pvdissel closed 8 years ago

pvdissel commented 9 years ago

To gather more in-depth metrics, metrics from the default provided /metrics/snapshot endpoint is now also collected. This is based on the /metrics/snapshot response of Mesos 0.22.1

Master is just as important as the slaves, therefor now collecting the master and slave metrics from the /metrics/snapshot endpoint.

The first scrape was only done after the first interval, this is now fixed to also do an initial scrape on startup.

ps. This is my first-time with Go, so there are probably things that could be done cleaner. But it works :smile:

brian-brazil commented 9 years ago

I'm wondering if this should be two separate exporters, as you're monitoring two very different types of job.

pvdissel commented 9 years ago

I believe I've adjusted all your feedback items, can you take a look. FYI, things changed:

brian-brazil commented 9 years ago

How are you distinguishing the master and slaves at the label level? What you really want is two scrape configs so that they end up with different job labels.

daya commented 9 years ago

Hi, I am wondering what's preventing this pull request from being merged ? Is it just merge conflicts?

fabxc commented 9 years ago

There a several open comments that have to be addressed.

daya commented 9 years ago

@fabxc while we are waiting for the merge, is there a way to configure the exporter to scrape both master and slave metrics from /metrics/snapshot ?

discordianfish commented 8 years ago

Hi everyone. Some time ago I started working on a new mesos-exporter which works for slave and master exposition and has support for the snapshot labels (although lot of those aren't prometheus idiomatic so they might change in the future). I want to replace this mesos_exporter by the other one soon as well (about to kick off a discussion about that). Just so you know before spending time fixing the open comments.

pvdissel commented 8 years ago

Sorry for the long silence, I'm not able to work on this for atleast a couple of more weeks. So maybe just close this one as @discordianfish wants to replace this one anyway. What do you think @discordianfish, best to close this one?

discordianfish commented 8 years ago

I'd say yes. Check out the exporter I'm working on which has this feature: https://github.com/mesosphere/mesos_exporter Right now it blindly exposes every metrics, but I'll change that and massage the data to fit better into the prometheus model (like creating labels for things that sum up to totals when aggregated etc). So expect changes in the metric names if you want to use it today.

Still, thanks a lot for the PR. I know it's frustrating if you spend the time on it and it gets replaced.

StephanErb commented 8 years ago

Looks like no replacement has landed. Could/should this one here be re-opened?