2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00
contrib-munin/plugins/network/dns/pdns_latency
Diego Elio Pettenò 0a1524f27f More housecleaning.
Collapse some categories; remove duplicates; move plugins in where
they belong, remove files that are not really plugins at all.
2012-08-06 21:55:44 -07:00

35 lines
805 B
Bash
Executable File

#!/bin/bash
#
# Script to monitor PowerDNS performance
#
# Parameters understood:
#
# config (required)
# autoconf (optional - used by munin-config)
#%# family=auto
#%# capabilities=autoconf
command="/etc/init.d/pdns show"
if [ "$1" = "autoconf" ]; then
echo yes
exit 0
fi
if [ "$1" = "config" ]; then
echo 'graph_title Power DNS latency'
echo 'graph_args -l 0'
echo 'graph_vlabel usec'
echo 'graph_category Power DNS'
echo 'graph_info This graph shows Power DNS latency on the machine.'
echo 'latency.label latency'
echo 'latency.info Average number of microseconds needed to answer a question'
echo 'latency.type GAUGE'
exit 0
fi
echo "latency.value $($command latency | awk -F= '{print $2}')"