zabbix 监控 ElasticSearch
vim /etc/zabbix/scripts/elastizabbix.py#!/usr/bin/python
import os
import sys
import json
import urllib2
import time
import errno
ttl = 60
#url更换成你的es地址
stats = {
'cluster': 'http://elasticsearch.es.cn:19200/_cluster/stats',
'nodes': 'http://elasticsearch.es.cn:19200/_nodes/stats',
'indices': 'http://elasticsearch.es.cn:19200/_stats',
'health' : 'http://elasticsearch.es.cn:19200/_cluster/health'
}
页:
[1]