监控elssticSearch健康状态
[4ajr@elk1 scripts]$ curl 172.30.210.175:9200/_cat/health
[4ajr@elk1 scripts]$ cat check_es_healthy.py
import commands
command = '172.30.210.175:9200/_cat/health'
(a, b) = commands.getstatusoutput(command)
status = b.split(' ')
if status=='red':
healthy=0
else:
healthy=1
print healthy
UserParameter=es_healthy,python /soft/zabbix_agent/scripts/check_es_healthy.py
zabbix模板,应用集,监控项,报警,图形