Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add exporter runtime metrics #9

Closed
pryorda opened this issue Jun 29, 2018 · 8 comments · May be fixed by finkr/vmware_exporter#2 or #128
Closed

add exporter runtime metrics #9

pryorda opened this issue Jun 29, 2018 · 8 comments · May be fixed by finkr/vmware_exporter#2 or #128

Comments

@pryorda
Copy link
Owner

pryorda commented Jun 29, 2018

From @wtip on September 12, 2017 21:17

It would be nice to add some exporter runtime metrics.
For example at the moment it would be really useful if I knew how long the exporter is taking to scrape vmware for metrics.

Copied from original issue: rverchere/vmware_exporter#17

@pryorda
Copy link
Owner Author

pryorda commented Oct 20, 2018

@wtip Are the logs enough or do we want it to be exposed as an actual metric? I have no real preference here.

@wtip
Copy link
Contributor

wtip commented Oct 20, 2018

If you don't expose it as a prometheus metric you can't monitor the scrape duration with prometheus.
I'm in favor of having an actual metric.

@dannyk81
Copy link
Collaborator

dannyk81 commented Nov 9, 2018

@wtip actually, scrape duration are automatically exposed as metrics by prometheus itself (scrape_duration_seconds metric) you just need to make sure your prometheus server scrapes its own metrics.

Other "self" metrics could be relevant to monitor things like cpu usage, memory usage, threads, etc... the prometheus python_client should be able to provide all that.

@brian-brazil
Copy link

you just need to make sure your prometheus server scrapes its own metrics.

That's not required for scrape_duration_seconds, it's put into the TSDB as part of the scrape just like up.

@dannyk81
Copy link
Collaborator

@brian-brazil you're right! even better 💯

@pryorda
Copy link
Owner Author

pryorda commented Dec 20, 2018

@brian-brazil++

@pryorda pryorda closed this as completed May 17, 2019
@finkr
Copy link
Contributor

finkr commented Jul 24, 2019

This exporter actually has multiple collectors running in parallel, it would be nice to have metrics to track how each one is behaving. node_exporter is doing that (see node_scrape_collector_duration_seconds at demo.robustperception.io ).

Also, the python_client metrics aren't available yet.

finkr added a commit to finkr/vmware_exporter that referenced this issue Jul 24, 2019
Use the global REGISTRY, in order : 
1) add exporter runtime metrics (fix  pryorda#9 )
2) add more metrics later (collection time for each object type)

This patch is intended to expose internal metrics on `/metrics` only for the default section (so people with multiple sections `?section=something` don't get duplicate metrics).
@finkr
Copy link
Contributor

finkr commented Jul 25, 2019

Instead of the globabl registry, we could use an alternate endpoint for internal metrics. usualy

from prometheus_client.twisted import MetricsResource
[..]
root.putChild(b'metrics', VMWareMetricsResource(args))
root.putChild(b'healthz', HealthzResource())
root.putChild(b'metrics2', MetricsResource())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants