Path : /proc/3/cwd/var/lib/zabbix/ |
Current File : //proc/3/cwd/var/lib/zabbix/exabgp_healthcheck.py |
#!/usr/bin/env python import ConfigParser import json CONF = "/etc/exabgp/healthcheck.conf" Config = ConfigParser.ConfigParser() Config.read(CONF) sections = Config.sections() sections.remove('global') OUTPUT = {"data": []} for section in sections: OUTPUT["data"].append({"{#SECTION}": section}) print json.dumps(OUTPUT)