mirror of
https://github.com/librenms/librenms-agent.git
synced 2024-05-09 09:54:52 +00:00
Add PowerDNS Authoritative Agent
This commit is contained in:
22
agent-local/powerdns
Executable file
22
agent-local/powerdns
Executable file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
from subprocess import check_output
|
||||||
|
|
||||||
|
vars = [ 'corrupt-packets', 'deferred-cache-inserts', 'deferred-cache-lookup',
|
||||||
|
'latency', 'packetcache-hit', 'packetcache-miss', 'packetcache-size',
|
||||||
|
'qsize-q', 'query-cache-hit', 'query-cache-miss', 'recursing-answers',
|
||||||
|
'recursing-questions', 'servfail-packets', 'tcp-answers', 'tcp-queries',
|
||||||
|
'timedout-packets', 'udp-answers', 'udp-queries', 'udp4-answers',
|
||||||
|
'udp4-queries', 'udp6-answers', 'udp6-queries' ]
|
||||||
|
|
||||||
|
rvars = {}
|
||||||
|
|
||||||
|
for l in check_output(['/usr/bin/pdns_control', 'show', '*']).rstrip().split(','):
|
||||||
|
v = l.split('=')
|
||||||
|
if len(v) > 1:
|
||||||
|
rvars[v[0]] = v[1]
|
||||||
|
|
||||||
|
print "<<<app-powerdns>>>"
|
||||||
|
|
||||||
|
for k in vars:
|
||||||
|
print rvars[k]
|
Reference in New Issue
Block a user