[Hawkular-dev] hawkular-agent, prometheus, openshift

John Mazzitelli mazz at redhat.com
Sun Apr 10 00:10:47 EDT 2016


> > OK, I'll look more into the Prometheus protocol. That's the part I was
> > missing. It sounds like essentially we are going to be pulling metrics
> > directly from the components emitting the data (rather than pulling metrics
> > from the Prometheus server itself which is what I originally thought). Now
> > that I think about it, really this sounds just like JMX/Jolokia endpoints
> > or
> > WildFly's remote DMR interface). I just have to learn more about what these
> > Prometheus endpoints look like and what the data looks like over that
> > protocol.
> 
> Yep, exactly. Its all about taking things from one protocol (jolokia,
> prometheus, etc) and being able to send the data contained within that
> protocol into Hawkular Metrics.

OK, this looks very easy to do. I just wrote up a quick PoC that shows we can have a Prometheus protocol endpoint scraper that can pull metrics from any prom protocol endpoint:

https://github.com/hawkular/hawkular-agent/blob/mazz/hwkagent-66-prometheus/prometheus-scraper/src/main/java/org/hawkular/agent/prometheus/Main.java#L40

this doesn't do much - just pulls metrics over HTTP from a prometheus protocol endpoint URL and parses the binary data using a prometheus java client. But it shows me it's easy (given any URL to a prometheus endpoint) to pull metrics data. We'd just push it out to hawkular-metrics (it would work just like our JMX and DMR integrations).

So my task for next week will be to take this and integrate it into hawkular-wildfly-agent.


More information about the hawkular-dev mailing list