Prometheus monitoring

Hello,

we’ve been using PrivacyIDEA since some days in one of our kubernetes test clusters and looking into possibilities to monitor it via prometheus.

So far we have found out that there are Event Handlers and the Monitoring API endpoint, but so far we couldn’t make it work, although we have noticed that the output of the endpoint is in json and not the prometheus metrics format.

We tried to get the following data so far:

  • health status of the application
  • failed/sucessful authentication requests

From our understanding we need to write our own modules to scrape the data but we couldn’t find any useful resources for that yet. The documentation was not helpful and lacks of informations and examples.

Does someone already linked PI to prometheus and can share some information on how to bring it to work?

1 Like

privacyIDEA was never ment to provide application-specific (prometheus-specific) data in GET /monitoting. And we will very likely not implement a prometheus-specific REST endpoint. This contradicts our general generic approach.

However, I could think of a kind of filter, that can be plugged in to modify the format of the return values of GET /monitoring/. This way different formats could be implemented without changing the end point structure or even the core code.

If you are interested in contributing and developing, please open an issue at gibhub.

1 Like

Hi, @sbaygithub did you find a way to use Prometheus to scrape PrivacyIDEA metrics?
I was either looking into using the json_exporter [1] or even writing my own Prometheus Exporter.
If you already have a working setup I’d be interested in how you managed it.

[1]