diff --git a/plugins/network/dns/bind9_resolver_stats b/plugins/network/dns/bind9_resolver_stats index 3ef69272..7963aff3 100755 --- a/plugins/network/dns/bind9_resolver_stats +++ b/plugins/network/dns/bind9_resolver_stats @@ -8,12 +8,12 @@ # Created: # 20th December 2012 # +# License: +# GPL-2 +# # Usage: # Place in /etc/munin/plugins/ (or link it there using ln -s) # -# Parameters: -# config (required) -# # change those to reflect your bind configuration (use plugin configuration) # stat file @@ -49,7 +49,7 @@ if [ "$1" = "config" ]; then echo 'graph_info '${section}' for the Bind9 Name Server' echo 'graph_scale no' echo 'graph_title Bind9 '${section} - echo 'graph_vlabel requests/sec' + echo 'graph_vlabel requests/${graph_period}' # Output the stat configs. eval ${cmd} | while read num name @@ -70,7 +70,11 @@ if [ "$1" = "config" ]; then echo ${key}.type COUNTER done - exit 0 + # If dirty config capability is enabled then fall through + # to output the data with the config information. + if [ "$MUNIN_CAP_DIRTYCONFIG" = "" ]; then + exit 0 + fi fi # Output the stats. diff --git a/plugins/network/dns/bind9_server_stats b/plugins/network/dns/bind9_server_stats index 800c677d..9bd78c28 100755 --- a/plugins/network/dns/bind9_server_stats +++ b/plugins/network/dns/bind9_server_stats @@ -8,12 +8,12 @@ # Created: # 20th December 2012 # +# License: +# GPL-2 +# # Usage: # Place in /etc/munin/plugins/ (or link it there using ln -s) # -# Parameters: -# config (required) -# # change those to reflect your bind configuration (use plugin configuration) # stat file @@ -49,7 +49,7 @@ if [ "$1" = "config" ]; then echo 'graph_info '${section}' for the Bind9 Name Server' echo 'graph_scale no' echo 'graph_title Bind9 '${section} - echo 'graph_vlabel requests/sec' + echo 'graph_vlabel requests/${graph_period}' # Output the stat configs. eval ${cmd} | while read num name @@ -69,7 +69,11 @@ if [ "$1" = "config" ]; then echo ${key}.type COUNTER done - exit 0 + # If dirty config capability is enabled then fall through + # to output the data with the config information. + if [ "$MUNIN_CAP_DIRTYCONFIG" = "" ]; then + exit 0 + fi fi # Output the stats. diff --git a/plugins/network/dns/bind9_socket_stats b/plugins/network/dns/bind9_socket_stats index c59bc43e..082bb18f 100755 --- a/plugins/network/dns/bind9_socket_stats +++ b/plugins/network/dns/bind9_socket_stats @@ -8,12 +8,12 @@ # Created: # 20th December 2012 # +# License: +# GPL-2 +# # Usage: # Place in /etc/munin/plugins/ (or link it there using ln -s) # -# Parameters: -# config (required) -# # change those to reflect your bind configuration (use plugin configuration) # stat file @@ -49,7 +49,7 @@ if [ "$1" = "config" ]; then echo 'graph_info '${section}' for the Bind9 Name Server' echo 'graph_scale no' echo 'graph_title Bind9 '${section} - echo 'graph_vlabel requests/sec' + echo 'graph_vlabel requests/${graph_period}' # Output the stat configs. eval ${cmd} | while read num name @@ -67,15 +67,13 @@ if [ "$1" = "config" ]; then echo ${key}.type COUNTER done - exit 0 + # If dirty config capability is enabled then fall through + # to output the data with the config information. + if [ "$MUNIN_CAP_DIRTYCONFIG" = "" ]; then + exit 0 + fi fi -# Blank the stats file (else stats are appended not replaced) -rm ${stat_file} - -# Ask to bind to build new one -${rndc} stats - # Output the stats. eval ${cmd} | while read num name do