From b4d9f32859689658379b91a2ee114fd725bc0a06 Mon Sep 17 00:00:00 2001 From: Dave Fennell Date: Fri, 21 Dec 2012 10:37:29 +0000 Subject: [PATCH] Updated new pgbouncer plugins with license information and added MUNIN_CAP_DIRTYCONFIG support. --- plugins/postgresql/pgbouncer_client_connections | 12 ++++++++---- plugins/postgresql/pgbouncer_maxwait | 12 ++++++++---- plugins/postgresql/pgbouncer_server_connections | 13 ++++++++----- 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/plugins/postgresql/pgbouncer_client_connections b/plugins/postgresql/pgbouncer_client_connections index a9471364..0f774911 100755 --- a/plugins/postgresql/pgbouncer_client_connections +++ b/plugins/postgresql/pgbouncer_client_connections @@ -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) -# dbserver='' # '-h localhost' dbuser='postgres' @@ -46,7 +46,11 @@ if [ "$1" = "config" ]; then echo ${pool}.type GAUGE 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 looks like this: diff --git a/plugins/postgresql/pgbouncer_maxwait b/plugins/postgresql/pgbouncer_maxwait index ea9a8ade..2d77c4f3 100755 --- a/plugins/postgresql/pgbouncer_maxwait +++ b/plugins/postgresql/pgbouncer_maxwait @@ -5,15 +5,15 @@ # Author: # Dave Fennell # +# License: +# GPL-2 +# # Created: # 20th December 2012 # # Usage: # Place in /etc/munin/plugins/ (or link it there using ln -s) # -# Parameters: -# config (required) -# dbserver='' # '-h localhost' dbuser='postgres' @@ -46,7 +46,11 @@ if [ "$1" = "config" ]; then echo ${pool}.type GAUGE 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 looks like this: diff --git a/plugins/postgresql/pgbouncer_server_connections b/plugins/postgresql/pgbouncer_server_connections index 865fa70c..26868122 100755 --- a/plugins/postgresql/pgbouncer_server_connections +++ b/plugins/postgresql/pgbouncer_server_connections @@ -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) -# dbserver='' # '-h localhost' dbuser='postgres' @@ -46,7 +46,11 @@ if [ "$1" = "config" ]; then echo ${pool}.type GAUGE 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 looks like this: @@ -63,4 +67,3 @@ do echo ${pool}.value ${total} done -