Cassandra metrics and Zabbix

46 views
Skip to first unread message

Roman Alekseev

unread,
Nov 7, 2018, 2:06:36 AM11/7/18
to metrics-user
Greetings,

I am trying to utilize metrics-reporter-config in Cassandra to send certain metrics to Zabbix and the config file /etc/cassandra/metrics-reporter-config.yaml looks as below:

zabbix:
  -
    period: 2
    timeunit: 'SECONDS'
    hosts:
      - host: 'my.zabbix.host'
        port: 10051
    predicate:
      color: "white"
      useQualifiedName: true
      patterns:
        - "^org.apache.cassandra.metrics.Storage.Load"


It seems that initialization is happening to some extent, i.e. should I remove zabbix-sender jar from Cassandra libs it will point out on it:

INFO  [main] 2018-11-06 13:01:53,876 CassandraDaemon.java:349 - Trying to load metrics-reporter-config from file: metrics-reporter-config.yaml
ERROR [main] 2018-11-06 13:01:53,902 ZabbixReporterConfig.java:42 - Tried to enable Zabbix Reporter, but class io.github.hengyunabc.zabbix.sender.ZabbixSender was not found
WARN  [main] 2018-11-06 13:01:53,903 ReporterConfig.java:288 - No reporters were succesfully enabled

However that's all I was able to achieve, there is neither error nor attempt to send anything to Zabbix observed on a host running Cassandra. Moreover I tried to set non existing host in configuration and still no error in Cassandra logs.

Should I use console instead of zabbix in /etc/cassandra/metrics-reporter-config.yaml the metric is exposed without any issue.

Could you please suggest if it is a known problem?

Are there any options to enable extended debugging for metrics-reporter-config?

Thank you.

WBR,

Roman

Roman Alekseev

unread,
Dec 3, 2018, 5:10:38 PM12/3/18
to metrics-user
I have finally identified the problem with zabbix reporter - class com.addthis.metrics3.reporter.config.ZabbixReporter extends com.codahale.metrics.ScheduledReporter, however com.addthis.metrics3.reporter.config.ZabbixReporterConfig misses scheduler startup and as a result report() function is never invoked.

Adding reporter.start(getPeriod(), getRealTimeunit()); before reporters.add(reporter); in com.addthis.metrics3.reporter.config.ZabbixReporterConfig fixes it.

One more thing to pay attention to is that Zabbix sender relies on fastjson so you need to have fastjson-1.2.54.jar in classpath.

Hope it helps.
--
WBR,

Roman

среда, 7 ноября 2018 г., 10:06:36 UTC+3 пользователь Roman Alekseev написал:
Reply all
Reply to author
Forward
0 new messages