监控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模板,应用集,监控项,报警,图形

猜你喜欢

转载自www.cnblogs.com/charon2/p/10349719.html