Skip to content

add xentop text collector script #102

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oe1rfc
Copy link

@oe1rfc oe1rfc commented Sep 19, 2021

This adds a script to parse the values of xentop as prometheus metrics.

gawk is probably needed for FPAT, which is used because xentop reports unset limits as no limit, which breaks whitespace-based field separation.

Signed-off-by: Clemens Hopfer <[email protected]>
@dswarbrick
Copy link
Member

Are you aware of https://github.com/bwesterb/go-xentop, which includes a sample Prometheus exporter?

@oe1rfc
Copy link
Author

oe1rfc commented Mar 22, 2023

@dswarbrick I think at the time of writing this I was not aware of go-xentop, but I'm also not sure if it is still a maintained project since it depends on a prometheus/client_golang client release from 2019.
Personally I think that having to run a webserver as root on a virtualization host for statistics is not a good idea, but I can close this PR if there is no interest in it.

@dswarbrick
Copy link
Member

It would probably be pretty trivial to enhance go-xentop to optionally use sudo to call xentop, to avoid running the exporter as root.

Is there no way of getting machine-readable stats from Xen, e.g. in JSON format? Parsing the human-readable output of utils is often pretty fragile, as cosmetic changes to the output format can often break such approaches.

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

Successfully merging this pull request may close these issues.

2 participants