prometheusprometheus-blackbox-exporter

Prometheus Monitoring End-Point SOAP API


I'm trying to explore using prometheus without installing exporter in targetted server ( Outside of Prometheus server )

So the idea is Prometheus will monitor the SOAP API of a certain application with some payload need to be passed in the request parameter.

From my understanding , prometheus scrape the following details as below

promhttp_metric_handler_requests_total{code="200"} 7096
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0

Is there any way for me to monitor the health of that particular API. I'm looking to monitoring the response code from the API and it's latency.

Looking for ideas and suggestion


Solution

  • Prometheus natively understands only it's custom exposition format.

    If you are using Java, you can add a JAX-RS filter which will track all your exposed endpoints and return the metrics to Prometheus in a particular format.

    This will require code change but it is fairly minimal and does not require an additional exporter.

    Here is an example library: https://github.com/ClearPointNZ/connect-java/tree/master/libraries/prometheus-jersey-filter

    There will probably be similar solutions for other languages.

    But there is no way for Prometheus to directly make the calls to your endpoints and monitor it.