Newbie question

39 views
Skip to first unread message

Rob Pijpers

unread,
Aug 8, 2020, 1:02:59 PM8/8/20
to Prometheus Users
Let me start to tell that I'm a newbie with Prometheus.

I have Prometheus and Grafana running on a Windows server and is used to collect data from my Homey domotica system, this works fine.
Now I want to collect data via an API call from a source using a web request via curl.
The output is in JSON format and looks as below:

{"ok":true,"type":"response","time":0.00040627799171489,"rv":{"value":8251.514},"systime":1596905673,"seq":1,"error":false}

I want to collect the "value" content in Prometheus every minute or so, but I don't know how to get this done.
So I really need some help from you.

Regards, Rob

Stuart Clark

unread,
Aug 8, 2020, 1:32:13 PM8/8/20
to Rob Pijpers, Prometheus Users
You will need an exporter to convert that format into the Prometheus text format to allow it to be scraped.

I don't know if there is something already available, but if not it should be fairly straightforward to create something using the language of your choice and one of the Prometheus client libraries (eg. Python)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Ben Kochie

unread,
Aug 8, 2020, 2:45:20 PM8/8/20
to Stuart Clark, Rob Pijpers, Prometheus Users

--
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 prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/81D53E3E-E635-4976-ABC2-2524478E0000%40Jahingo.com.

Rob Pijpers

unread,
Aug 8, 2020, 3:16:21 PM8/8/20
to Prometheus Users
Hi Ben,

Could you help me getting started with this exporter, for example should this be installed on a separate server or in a container?

Thx, Rob

Op zaterdag 8 augustus 2020 20:45:20 UTC+2 schreef Ben Kochie:
On Sat, Aug 8, 2020 at 7:32 PM Stuart Clark <stuar...@jahingo.com> wrote:
You will need an exporter to convert that format into the Prometheus text format to allow it to be scraped.

I don't know if there is something already available, but if not it should be fairly straightforward to create something using the language of your choice and one of the Prometheus client libraries (eg. Python)

On 8 August 2020 18:02:59 BST, Rob Pijpers <oetae...@gmail.com> wrote:
Let me start to tell that I'm a newbie with Prometheus.

I have Prometheus and Grafana running on a Windows server and is used to collect data from my Homey domotica system, this works fine.
Now I want to collect data via an API call from a source using a web request via curl.
The output is in JSON format and looks as below:

{"ok":true,"type":"response","time":0.00040627799171489,"rv":{"value":8251.514},"systime":1596905673,"seq":1,"error":false}

I want to collect the "value" content in Prometheus every minute or so, but I don't know how to get this done.
So I really need some help from you.

Regards, Rob


--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

--
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 promethe...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages