From 17fd283a948527e37f1d76937cbeb655953d40dc Mon Sep 17 00:00:00 2001 From: Marcel Haerry Date: Tue, 5 Aug 2008 17:38:46 +0200 Subject: factored postgres plugins into the postgres module --- files/plugins/pg_conn | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100755 files/plugins/pg_conn (limited to 'files/plugins/pg_conn') diff --git a/files/plugins/pg_conn b/files/plugins/pg_conn deleted file mode 100755 index aa2ebb7..0000000 --- a/files/plugins/pg_conn +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -# -# Plugin to monitor PostgreSQL connections. -# -# Parameters: -# -# config (required) -# autoconf (optional - only used by munin-config) -# Based on netstat plugin -# $Log$ -# eric@ohmforce.com -# -# -# Magic markers (optional - used by munin-config and some installation -# scripts): -#%# family=auto -#%# capabilities=autoconf - - - -if [ "$1" = "autoconf" ]; then - if ( netstat -s 2>/dev/null >/dev/null ); then - echo yes - exit 0 - else - if [ $? -eq 127 ] - then - echo "no (netstat program not found)" - exit 1 - else - echo no - exit 1 - fi - fi -fi - -if [ "$1" = "config" ]; then - - echo 'graph_title PostgreSQL' - echo 'graph_args -l 0 ' - echo 'graph_vlabel Number of PostgreSQL connections' - echo 'graph_category postgresql' - echo 'graph_period second' - echo 'graph_info This graph shows the number of opened connections on PostgreSQL.' - echo 'established.label established' - echo 'established.type GAUGE' - echo 'established.max 500' - echo 'established.info The number of currently open connections.' - exit 0 -fi -netstat -a | awk '{ print $4 }'| grep postgres | wc -l | xargs echo established.value -- cgit v1.2.3