Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upany way to support external user defined functions #4522
Comments
This comment has been minimized.
This comment has been minimized.
|
Thank you for your suggestion. I don't think it's wise to allow any external code inside the Prometheus process, as that'll lead to bug reports caused by code in a non-standard setup which we have little to no ability to debug. The use case you describe is already possible within PromQL. |
This comment has been minimized.
This comment has been minimized.
|
you mean ignoring metrics from maintenance mode hosts? I agreed with the bug reports thing. but it's very limited to only support functions.go. New prometheus versions will be branches to adding use private functions, then it will also cause the problem u just mentioned. it would be great to have plugins, then plugins can be maintained by users themself. they can also share them out if wanted. |
This comment has been minimized.
This comment has been minimized.
Yes, expose a metric indicating it's in maintenance. Then whatever in PromQL to use that.
That doesn't make a difference, it's still arbitrary code outside our control.
Go plugins don't help for the above reasons. We already have a number of integration points. |
gouthamve
added
component/promql
not-as-easy-as-it-looks
labels
Aug 26, 2018
This comment has been minimized.
This comment has been minimized.
RalphSu
commented
Sep 26, 2018
|
Hmm, probably related, i had some function want it available to my user in PromQL, since i'm exposing the PromQL to them. Currently, it looks i had to fork the code, do the code change, compile and deploy, which looks invasive one. @brian-brazil any suggestion on this kind of extension? |
This comment has been minimized.
This comment has been minimized.
|
That's already possible within PromQL. |
This comment has been minimized.
This comment has been minimized.
RalphSu
commented
Sep 26, 2018
•
Do you mean extension is already possible? That would be cool, can you point me a bit of reference? Not find in site docs if i don't miss anything |
alburthoffman commentedAug 21, 2018
Proposal
Use case. Why is this important?
We has to support some validation functions, which are limited to our company only.
like the metrics will be ignored if the host is in maintenance mode, and will be used when host is back.
We also have other private requirements.
it's not a good idea to add those functions to functions.go. communicate does-not need them and we will have to maintain our own prometheus version.
the ideal solution would be we can do something like:
apply_external("plugin.function", metrics)then it can check functions defined in plugin.so, which can be preload or loaded dynamically.