Oh, apparently we also have a JSON exporter in prometheus-community:
https://github.com/prometheus-community/json_exporter

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

> Or for a custom JSON exporter, see
> https://www.robustperception.io/writing-json-exporters-in-python
>
> On Fri, May 1, 2020 at 11:27 AM Julius Volz <[email protected]> wrote:
>
>> 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%2BT6YoyBt4bPekzTAvTO2a0gzoHjWQCTvFH5j%3DLWiGuh1%2BpARA%40mail.gmail.com.

Reply via email to