mesos_exporter | Prometheus exporter for Mesos | Time Series Database library
kandi X-RAY | mesos_exporter Summary
kandi X-RAY | mesos_exporter Summary
Prometheus exporter for Mesos, deprecated.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of mesos_exporter
mesos_exporter Key Features
mesos_exporter Examples and Code Snippets
./mesos_exporter -exporter.discover-interval=60s -exporter.interval=15s -exporter.scrape-mode=discover -exporter.url=http://mesos.master:5050
./mesos_exporter -exporter.scrape-mode=master -exporter.url=http://127.0.0.1:5050
./mesos_exporter -export
Community Discussions
Trending Discussions on mesos_exporter
QUESTION
I'm trying to modify prometheus mesos exporter to expose framework states: https://github.com/mesos/mesos_exporter/pull/97/files
A bit about mesos exporter - it collects data from both mesos /metrics/snapshot
endpoint, and /state
endpoint.
The issue with the latter, both with the changes in my PR and with existing metrics reported on slaves, is that metrics created lasts for ever (until exporter is restarted).
So if for example a framework was completed, the metrics reported for this framework will be stale (e.g. it will still show the framework is using CPU).
So I'm trying to figure out how I can clear those stale metrics. If I could just clear the entire mesosStateCollector
each time before collect is done it would be awesome.
There is a delete
method for the different p8s vectors (e.g. GaugeVec
), but in order to delete a metric, I need to not only the label name, but also the label value for the relevant metric.
ANSWER
Answered 2020-Jun-24 at 17:10Ok, so seems it was easier than I thought (if only I was familiar with go-lang before approaching this task). Just need to cast the collector to GaugeVec and reset it:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install mesos_exporter
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page