Btw., googling turned up
https://github.com/project-sunbird/prometheus-jsonpath-exporter - I don't
know this one at all, but if your REST endpoint serves JSON, it looks like
you could use this existing exporter to convert the JSON format to
Prometheus metrics via some configuration rules.

On Fri, May 1, 2020 at 11:25 AM Julius Volz <[email protected]> wrote:

> Yes, it sounds like you probably will need to build a custom exporter for
> that to transform your custom REST format into the Prometheus metrics
> format.
>
> You can see a huge list of example exporters at
> https://prometheus.io/docs/instrumenting/exporters/, and general
> guidelines for writing exporters at
> https://prometheus.io/docs/instrumenting/writing_exporters/.
>
> On Thu, Apr 30, 2020 at 5:04 PM Ketan Talreja <[email protected]>
> wrote:
>
>> Hi All,
>>
>> I have a use-case where I need to collect rest endpoint output metric
>> i.e. let's say the output/response of rest endpoint is some value which I
>> need to export to prometheus for calculating how many times the endpoint
>> returned the 'x' value
>>
>> For example -
>> GET /<endpoint>/users - return list of users which need to be exported to
>> prometheus for metric calculation
>>
>> Question -
>>
>> Does anyone know how would I capture the endpoint results values and
>> export to prometheus? Do I need to consider implementing custom exporter to
>> do this job? If yes, could you help in providing some samples.
>>
>> Thank you,
>>
>> Ketan
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Prometheus Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/prometheus-users/fa5a3aa6-5ec4-49d3-9058-5a8583fd183b%40googlegroups.com
>> <https://groups.google.com/d/msgid/prometheus-users/fa5a3aa6-5ec4-49d3-9058-5a8583fd183b%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CA%2BT6YowxUFq3EG-gUYtqytq2cN0XOU4%2B7bq71SM5iUrhQACJGg%40mail.gmail.com.

Reply via email to