So I installed the prometheus plugin for jenkins, but now I am not sure how to create custom jenkins metrics that will be exposed in the /prometheus endpoint. What would be the best way to have custom metrics?
So I installed the prometheus plugin for jenkins, but now I am not sure how to create custom jenkins metrics that will be exposed in the /prometheus endpoint. What would be the best way to have custom metrics?
I would say your easiest option is to write a plugin. https://www.baeldung.com/jenkins-custom-plugin
Another approach is to build your own Jenkins fork https://github.com/jenkinsci/jenkins which I probably wouldn't do.