Path : /proc/2/cwd/proc/2/cwd/proc/2/cwd/proc/2/task/2/cwd/var/lib/zabbix/ |
Current File : //proc/2/cwd/proc/2/cwd/proc/2/cwd/proc/2/task/2/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)