Path : /proc/2/root/proc/2/root/var/lib/zabbix/ |
Current File : //proc/2/root/proc/2/root/var/lib/zabbix/elastic_status.py |
#!/usr/bin/env python """ This script gets Elasticsearch status info """ import json import sys import urllib2 URL = 'http://localhost:9200/_cluster/health' try: response = urllib2.urlopen(URL).read() status = json.loads(response) print status[sys.argv[1]] except IndexError: print "Program requires parameter" except KeyError: print "Please provide valis key"