JMX Exporter in HTTP server

1,423 views
Skip to first unread message

itf...@gmail.com

unread,
Jan 5, 2017, 2:06:20 PM1/5/17
to Prometheus Developers
Hi All,

We are working on Exporter HTTP Server to collect metrics from different Kafka clusters and request help on following:

FYI, JMX Exporter java agent PoC is working fine but we are interested to Pull metrics right now instead of as JavaAgent

Scenario:
1). Kafka-JMX is running on 9990 and we are putting the same port in jmx exporter yml file.
2). Following script on Prometheus server to fetch metrics from Kafka node:
"Java -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=10001 -jar jmx_prometheus_httpserver/target/jmx_prometheus_httpserver-0.6-SNAPSHOT-jar-with-dependencies.jar 10002 config.yml"

3). 10002 port added to prometheus.yml to start prometheus.

Question / Issues:
==================
1). We are not able to see metrics 10002 port, instead, we are getting "getsockopt: connection refused" same error with 10001 port and "EOF error" with 9990.

2). We want to create different graph templates for each kafka cluster, how can we achieve this with one Prometheus Data Source in Grafana.

Thanks,

Brian Brazil

unread,
Jan 5, 2017, 5:56:24 PM1/5/17
to Muhammad Aamer RANA, Prometheus Developers
On 5 January 2017 at 19:06, <itf...@gmail.com> wrote:
Hi All,

We are working on Exporter HTTP Server to collect metrics from different Kafka clusters and request help on following:

FYI, JMX Exporter java agent PoC is working fine but we are interested to Pull metrics right now instead of as JavaAgent

Scenario:
1). Kafka-JMX is running on 9990 and we are putting the same port in jmx exporter yml file.
2). Following script on Prometheus server to fetch metrics from Kafka node:
"Java -Dcom.sun.management.jmxremote.ssl=false                         -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=10001 -jar jmx_prometheus_httpserver/target/jmx_prometheus_httpserver-0.6-SNAPSHOT-jar-with-dependencies.jar 10002 config.yml"

3). 10002 port added to prometheus.yml to start prometheus.

Question / Issues:
==================
1). We are not able to see metrics 10002 port, instead, we are getting "getsockopt: connection refused" same error with 10001 port and "EOF error" with 9990.

Are there any errors logged? That sounds like the port isn't being bound to.

It's recommended to use the jmx exporter as an agent, and there's full instructions at https://www.robustperception.io/monitoring-kafka-with-prometheus/ including a dashboard you can work off.

Brian
 

2). We want to create different graph templates for each kafka cluster, how can we achieve this with one Prometheus Data Source in Grafana.

Thanks,

--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
To post to this group, send email to prometheus-developers@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/89f60f27-0782-41dc-adf3-b113fc95e4b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

itf...@gmail.com

unread,
Jan 5, 2017, 7:17:38 PM1/5/17
to Prometheus Developers, itf...@gmail.com
Error Message on Target Page:
-----------------------------
Get http://xx.xxx.xxx.xx:xxxx/metrics: dial tcp xx.xxx.xxx.xx:xxxx: getsockopt: connection refused

Will check, if we can use javaAgent instead, Thanks for update


On Thursday, January 5, 2017 at 2:56:24 PM UTC-8, Brian Brazil wrote:
> On 5 January 2017 at 19:06, <itf...@gmail.com> wrote:
> Hi All,
>
>
>
> We are working on Exporter HTTP Server to collect metrics from different Kafka clusters and request help on following:
>
>
>
> FYI, JMX Exporter java agent PoC is working fine but we are interested to Pull metrics right now instead of as JavaAgent
>
>
>
> Scenario:
>
> 1). Kafka-JMX is running on 9990 and we are putting the same port in jmx exporter yml file.
>
> 2). Following script on Prometheus server to fetch metrics from Kafka node:
>
> "Java -Dcom.sun.management.jmxremote.ssl=false                         -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=10001 -jar jmx_prometheus_httpserver/target/jmx_prometheus_httpserver-0.6-SNAPSHOT-jar-with-dependencies.jar 10002 config.yml"
>
>
>
> 3). 10002 port added to prometheus.yml to start prometheus.
>
>
>
> Question / Issues:
>
> ==================
>
> 1). We are not able to see metrics 10002 port, instead, we are getting "getsockopt: connection refused" same error with 10001 port and "EOF error" with 9990.
>
>
>
> Are there any errors logged? That sounds like the port isn't being bound to.
>
>
> It's recommended to use the jmx exporter as an agent, and there's full instructions at https://www.robustperception.io/monitoring-kafka-with-prometheus/ including a dashboard you can work off.
>
>
> Brian
>  
>
>
> 2). We want to create different graph templates for each kafka cluster, how can we achieve this with one Prometheus Data Source in Grafana.
>
>
>
> Thanks,
>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
>
> To post to this group, send email to prometheus...@googlegroups.com.

itf...@gmail.com

unread,
Jan 6, 2017, 12:33:22 PM1/6/17
to Prometheus Developers, itf...@gmail.com
Hi Brian,

We want to use JMX Exporter with HTTP Server as remote Pull instead of JavaAgent as finally we are planning a similar implementation with Kubernates and and will move existing infra to Kubernates.

With Kubernates, infrastructure will have different applications e.g. Kafka / Spark / Cassandra /etc. where we are not expecting to use JavaAgent.

Thanks,

Brian Brazil

unread,
Jan 6, 2017, 1:47:50 PM1/6/17
to Muhammad Aamer RANA, Prometheus Developers
On 6 January 2017 at 17:33, <itf...@gmail.com> wrote:
Hi Brian,

We want to use JMX Exporter with HTTP Server as remote Pull instead of JavaAgent as finally we are planning a similar implementation with Kubernates and and will move existing infra to Kubernates.

With Kubernates, infrastructure will have different applications e.g. Kafka / Spark / Cassandra /etc. where we are not expecting to use JavaAgent.

That doesn't make a difference on Kubernetes, it's all command lines at the end of the day.

Brian
 

Thanks,
> > To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.

> >
> > To post to this group, send email to prometheus...@googlegroups.com.
> >
> > To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/89f60f27-0782-41dc-adf3-b113fc95e4b4%40googlegroups.com.
> >
> > For more options, visit https://groups.google.com/d/optout.
> >
> >
> >
> >
> >
> > --
> >
> >
> > Brian Brazil
> > www.robustperception.io

--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
To post to this group, send email to prometheus-developers@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/7fcb2812-c266-4517-861a-37ba957eda39%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

mdou...@gmail.com

unread,
Jun 9, 2017, 3:30:11 PM6/9/17
to Prometheus Developers, itf...@gmail.com
> > > To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
>
> > >
>
> > > To post to this group, send email to prometheus...@googlegroups.com.
>
> > >
>
> > > To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/89f60f27-0782-41dc-adf3-b113fc95e4b4%40googlegroups.com.
>
> > >
>
> > > For more options, visit https://groups.google.com/d/optout.
>
> > >
>
> > >
>
> > >
>
> > >
>
> > >
>
> > > --
>
> > >
>
> > >
>
> > > Brian Brazil
>
> > > www.robustperception.io
>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
>
> To post to this group, send email to prometheus...@googlegroups.com.
>
> To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/7fcb2812-c266-4517-861a-37ba957eda39%40googlegroups.com.
>
>
>
> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
>
> --
>
>
> Brian Brazil
> www.robustperception.io

Is there a solution to this? I'm seeing the same issue, and I need to pull from an existing jmx on port 9997. Does it work without running as an agent?

thanks,

--Matt

buba....@utg.edu.gm

unread,
Oct 11, 2017, 6:23:08 PM10/11/17
to Prometheus Developers
Any solution for this issue? I'm having the same "connection refused" error for this issue. Anyone already got a solution?
Reply all
Reply to author
Forward
0 new messages