JMX Exporter Kafka Cluster

526 views
Skip to first unread message

dustin.c...@banno.com

unread,
Jun 21, 2018, 12:50:58 PM6/21/18
to Prometheus Users
Having some trouble on specific object names when using the jmx_exporter. I have the following rule defined:

```
- pattern : kafka.cluster<type=Partition, name=(ReplicasCount|InSyncReplicasCount|UnderReplicated), partition=(.+), topic=(.+)><>Value
```

And when turning on the logging for jmx_exporter, it does say it is scraping it:

```
...
Jun 21, 2018 4:26:07 PM io.prometheus.jmx.JmxScraper logScrape
FINE: scrape: 'kafka.cluster:type=Partition,name=ReplicasCount,topic=my-topic,partition=0'_'Value': process
Jun 21, 2018 4:26:07 PM io.prometheus.jmx.JmxScraper logScrape
FINE: scrape: 'kafka.cluster{type=Partition, name=ReplicasCount, topic=my-topic, partition=0}Value': 0
Jun 21, 2018 4:26:07 PM io.prometheus.jmx.JmxScraper logScrape
FINE: scrape: 'kafka.cluster:type=Partition,name=InSyncReplicasCount,topic=my-topic,partition=38'_'Value': process
Jun 21, 2018 4:26:07 PM io.prometheus.jmx.JmxScraper logScrape
FINE: scrape: 'kafka.cluster{type=Partition, name=InSyncReplicasCount, topic=my-topic, partition=38}Value': 0
Jun 21, 2018 4:26:07 PM io.prometheus.jmx.JmxScraper doScrape
FINE: TIME: 561404 ns for kafka.cluster:type=Partition,name=InSyncReplicasCount,topic=my-topic,partition=38
...
```

But when the `/metrics` path is queried on the exporter, the `kafka_cluster_...` metrics do not show up. There are other rules and whitelisted objects being used:

```
whitelistObjectNames: ["kafka.server:*","kafka.controller:*","java.lang:*","kafka.cluster:*"]
```

With their own rules, all of which show up as metrics, but I cannot get the `kafka_cluster_...` cluster metrics to show up at all. Is there something else that I might be missing, or should this just be filed as a bug with the jmx_exporter? I've checked and double checked things, but nothing is popping out at me as to why these would not be showing.

Brian Brazil

unread,
Jun 21, 2018, 1:08:47 PM6/21/18
to dustin.c...@banno.com, Prometheus Users
On 21 June 2018 at 17:50, <dustin.c...@banno.com> wrote:
Having some trouble on specific object names when using the jmx_exporter. I have the following rule defined:

```
- pattern : kafka.cluster<type=Partition, name=(ReplicasCount|InSyncReplicasCount|UnderReplicated), partition=(.+), topic=(.+)><>Value
```

And when turning on the logging for jmx_exporter, it does say it is scraping it:

```
...
Jun 21, 2018 4:26:07 PM io.prometheus.jmx.JmxScraper logScrape
FINE: scrape: 'kafka.cluster:type=Partition,name=ReplicasCount,topic=my-topic,partition=0'_'Value': process
Jun 21, 2018 4:26:07 PM io.prometheus.jmx.JmxScraper logScrape

topic and partition are the other way around here.

Brian
 
FINE: scrape: 'kafka.cluster{type=Partition, name=ReplicasCount, topic=my-topic, partition=0}Value': 0
Jun 21, 2018 4:26:07 PM io.prometheus.jmx.JmxScraper logScrape
FINE: scrape: 'kafka.cluster:type=Partition,name=InSyncReplicasCount,topic=my-topic,partition=38'_'Value': process
Jun 21, 2018 4:26:07 PM io.prometheus.jmx.JmxScraper logScrape
FINE: scrape: 'kafka.cluster{type=Partition, name=InSyncReplicasCount, topic=my-topic, partition=38}Value': 0
Jun 21, 2018 4:26:07 PM io.prometheus.jmx.JmxScraper doScrape
FINE: TIME: 561404 ns for kafka.cluster:type=Partition,name=InSyncReplicasCount,topic=my-topic,partition=38
...
```

But when the `/metrics` path is queried on the exporter, the `kafka_cluster_...` metrics do not show up. There are other rules and whitelisted objects being used:

```
whitelistObjectNames: ["kafka.server:*","kafka.controller:*","java.lang:*","kafka.cluster:*"]
```

With their own rules, all of which show up as metrics, but I cannot get the `kafka_cluster_...` cluster metrics to show up at all. Is there something else that I might be missing, or should this just be filed as a bug with the jmx_exporter? I've checked and double checked things, but nothing is popping out at me as to why these would not be showing.

--
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-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/05b96ebf-099f-47cf-8148-03805e24a2ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Dustin Chaloupka

unread,
Jun 21, 2018, 2:11:04 PM6/21/18
to Brian Brazil, Prometheus Users
Wow, thanks. I didn't pay enough attention to the fact that the order might actually matter in the pattern. Switching the two around worked!

On Thu, Jun 21, 2018 at 12:08 PM Brian Brazil <brian....@robustperception.io> wrote:
On 21 June 2018 at 17:50, <dustin.c...@banno.com> wrote:
Having some trouble on specific object names when using the jmx_exporter. I have the following rule defined:

```
- pattern : kafka.cluster<type=Partition, name=(ReplicasCount|InSyncReplicasCount|UnderReplicated), partition=(.+), topic=(.+)><>Value
```

And when turning on the logging for jmx_exporter, it does say it is scraping it:

```
...
Jun 21, 2018 4:26:07 PM io.prometheus.jmx.JmxScraper logScrape
FINE: scrape: 'kafka.cluster:type=Partition,name=ReplicasCount,topic=my-topic,partition=0'_'Value': process
Jun 21, 2018 4:26:07 PM io.prometheus.jmx.JmxScraper logScrape

topic and partition are the other way around here.

Brian
 
FINE: scrape: 'kafka.cluster{type=Partition, name=ReplicasCount, topic=my-topic, partition=0}Value': 0
Jun 21, 2018 4:26:07 PM io.prometheus.jmx.JmxScraper logScrape
FINE: scrape: 'kafka.cluster:type=Partition,name=InSyncReplicasCount,topic=my-topic,partition=38'_'Value': process
Jun 21, 2018 4:26:07 PM io.prometheus.jmx.JmxScraper logScrape
FINE: scrape: 'kafka.cluster{type=Partition, name=InSyncReplicasCount, topic=my-topic, partition=38}Value': 0
Jun 21, 2018 4:26:07 PM io.prometheus.jmx.JmxScraper doScrape
FINE: TIME: 561404 ns for kafka.cluster:type=Partition,name=InSyncReplicasCount,topic=my-topic,partition=38
...
```

But when the `/metrics` path is queried on the exporter, the `kafka_cluster_...` metrics do not show up. There are other rules and whitelisted objects being used:

```
whitelistObjectNames: ["kafka.server:*","kafka.controller:*","java.lang:*","kafka.cluster:*"]
```

With their own rules, all of which show up as metrics, but I cannot get the `kafka_cluster_...` cluster metrics to show up at all. Is there something else that I might be missing, or should this just be filed as a bug with the jmx_exporter? I've checked and double checked things, but nothing is popping out at me as to why these would not be showing.

--
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 post to this group, send email to promethe...@googlegroups.com.



--
Reply all
Reply to author
Forward
0 new messages