Importing json metrics over http

2,532 views
Skip to first unread message

ancoblancof...@gmail.com

unread,
Mar 4, 2017, 7:21:30 AM3/4/17
to Prometheus Users
Hi,
I've just started to look at prometheus.io to evaluate it for use in one of my projects.
My problem is that my components today expose their metrics as json over http and I have no way of instrument the code with the java client library nor install additional software on the components machines.

I looked at the exporter / integration section in the manual, but as I understand it an exporter is something running on the same machine as the monitored software and expose the softwares metrics in a format readable for prometheus?

Is there a concept/component/configuration that could be applied on the prometheus instance doing the conversion from json/anything  to a prometheus readable format?

Regards
Andreas

Brian Brazil

unread,
Mar 4, 2017, 7:35:17 AM3/4/17
to ancoblancof...@gmail.com, Prometheus Users
On 4 March 2017 at 12:21, <ancoblancof...@gmail.com> wrote:
Hi,
I've just started to look at prometheus.io to evaluate it for use in one of my projects.
My problem is that my components today expose their metrics as json over http and I have no way of instrument the code with the java client library nor install additional software on the components machines.

I looked at the exporter / integration section in the manual, but as I understand it an exporter is something running on the same machine as the monitored software and expose the softwares metrics in a format readable for prometheus?

Yes.
 

Is there a concept/component/configuration that could be applied on the prometheus instance doing the conversion from json/anything  to a prometheus readable format?

No, you need to write an exporter. See https://www.robustperception.io/writing-a-jenkins-exporter-in-python/ for example.

--

ancoblancof...@gmail.com

unread,
Mar 4, 2017, 8:28:01 AM3/4/17
to Prometheus Users, ancoblancof...@gmail.com
Hi,
Thanks for the reply,
I guess I could write the exporter and deploy it on the prometheus instance, let the exporter fetch data over http, convert it and expose to prometheus, did not think of that before. I'll investigate that a bit more.

Thanks.
Andreas

kmu...@gmail.com

unread,
May 20, 2018, 1:28:40 PM5/20/18
to Prometheus Users
You can try using JsonExporter https://github.com/tolleiv/json-exporter

Pete Leese

unread,
May 21, 2018, 4:48:44 PM5/21/18
to Prometheus Users
https://github.com/tolleiv/json-exporter Didn’t meet my requirements of being able to scrape multiple json end-points.

There was another exporter that had a pull request to add this support in but developer has gone quiet.

If anyone wishes to pick this back up I am willing to partially back with some financial incentives if anyone else is willing to get on board or show interest.

Cheers.

Pete
Reply all
Reply to author
Forward
0 new messages