Zabbix autodiscovery template and externalscript for monitoring Apache Flume via http.
$ chmod +x /usr/lib/zabbix/externalscripts/check_flume_metrics.py
usage: check_flume_metrics.py [-h] [--discover type] [--check FLOW METRIC]
[--diff FLOW METRIC1 METRIC2]
[--address ADDRESS] [--port PORT]
Simple python script for checking flume metrcis via http
optional arguments:
-h, --help show this help message and exit
--discover type, -d type
Discover all flume flows by type
--check FLOW METRIC, -c FLOW METRIC
Check specified metric
--diff FLOW METRIC1 METRIC2, -f FLOW METRIC1 METRIC2
Check difference between two specified metrics
--address ADDRESS, -a ADDRESS
Flume address. Default is: localhost
--port PORT, -p PORT Flume http port. Default is: 41414
If you installed zabbix_get package, you may run :
zabbix_get -s flumehost1 -k flume.check[41414,"CHANNEL.prod-channel","ChannelFillPercentage"]
Discovery:
$ sudo -u zabbix /etc/zabbix/externalscripts/check_flume_metrics.py --discover SOURCE
{"data": [{"{#NAME}": "SOURCE.test-source"}, {"{#NAME}": "SOURCE.prod-source"}, {"{#NAME}": "SOURCE.third-source"}]}
Check:
$ sudo -u zabbix /etc/zabbix/externalscripts/check_flume_metrics.py --check SOURCE.test-source KafkaEventGetTimer
28030074