helli0n / kafka-monitoring

Kafka monitoring using zabbix and burrow
GNU General Public License v3.0
70 stars 71 forks source link

Value should be a JSON object. #7

Closed ThomasBarach closed 6 years ago

ThomasBarach commented 6 years ago

Hello !

First of all, thanks a lot for you work! My JMX icon turned green, however the discovery rules fail. The error is : Value should be a JSON object.

Is there a way to fix this ?

Thanks Thomas

helli0n commented 6 years ago

Hello, did you try to use scripts to check jmx metrics from the console?

!/usr/bin/env bash

ZBXGET="/usr/bin/zabbix_get" if [ $# != 5 ] then echo "Usage: $0 > " exit; fi QUERY="{\"request\": \"java gateway jmx\",\"conn\": \"$3\",\"port\": $4,\"keys\": [\"$5\"]}" $ZBXGET -s $1 -p $2 -k "$QUERY"

eg.: ./zabb_get_java zabbix-java-gateway-ip 10052 server-test-ip 12345 'jmx[java.lang:type=Threading,PeakThreadCount]'

ThomasBarach commented 6 years ago

Yep, I tried it. But it looks like the JMX item protocol changed (I'm using Zabbix 3.4). I'm figuring out how to make your script works :) I'll get back to you when this is done

helli0n commented 6 years ago

Which kafka version do you use? maybe kafka has changed some JMX metrics?

ThomasBarach commented 6 years ago

I'm using Kafka 1.0.0, the version released on November 1, 2017.

helli0n commented 6 years ago

Probably, the issue is in kafka side, not in Zabbix, because I use Zabbix 3.4 and it works as expected.

20100507 commented 6 years ago

@ThomasBarach I also used kafka1.0.0 and I have the same problem as you. I don't know how you solved it. Have you solved this problem? Can you help me? Thanks!!