Is there a way to register a callback that will be called on scrape? #832
Unanswered
scottbelden
asked this question in
Q&A
Replies: 1 comment
-
The easiest way to do this would likely be with a Custom Collector where you create each gauge with your code example. Do note that |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Maybe I'm going about this the wrong way, but I'd like to create dynamic gauges for users logged in to a system and the gauge will track the active jobs they are running. I think I would do this with something like the following:
And then I would like register
update_user_gauges
to get called when a scrape is about to happen (similar to doingGuage.set_function(callable)
).Is there a way to do this? Or am I going about this the wrong way and there is a better approach?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions