1
0
mirror of https://github.com/librenms/librenms-agent.git synced 2024-05-09 09:54:52 +00:00

PowerDNS Recursor agent

This commit is contained in:
Tony Murray
2016-07-22 15:33:16 -05:00
parent bfdf71d699
commit 9a3846cac3

12
agent-local/powerdns-recursor Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/python
import json, subprocess
input = subprocess.check_output(['rec_control', 'get-all'])
data = []
for line in input.splitlines():
item = line.split()
data.append({'name': item[0].decode(), 'value': int(item[1].decode())})
print('<<<powerdns-recursor>>>')
print(json.dumps(data))