checkcommands.conf templates for check_postgres.pl

From: "Brian A(dot) Seklecki" <lavalamp(at)spiritual-machines(dot)org>
To: Nagios Discussion <nagios-users(at)lists(dot)sourceforge(dot)net>, pgsql-admin(at)postgresql(dot)org
Cc: greg(at)turnstep(dot)com
Subject: checkcommands.conf templates for check_postgres.pl
Date: 2008-04-07 15:53:57
Message-ID: 1207583637.12507.53.camel@soundwave.ws.pitbpa0.priv.collaborativefusion.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


[may be more nagiosplug-devel@ related, but hey!]

It probably wouldn't be a bad idea to include some checkcommands.conf
templates and example service or hostgroup examples. See below.

---- Templates ----

define command {
command_name check_postgres_size
command_line $USER2$/check_postgres.pl -H $HOSTADDRESS$ -u
pgsql -db postgres --action database_size -w $ARG1$ -c $ARG2$
}

define command {
command_name check_postgres_time
command_line $USER2$/check_postgres.pl -H $HOSTADDRESS$ -u
pgsql -db postgres --action timesync -w $ARG1$ -c $ARG2$
}

define command {
command_name check_postgres_backends
command_line $USER2$/check_postgres.pl -H $HOSTADDRESS$ -u
pgsql -db postgres --action backends -w $ARG1$ -c $ARG2$
}

define command {
command_name check_postgres_last_vacuum
command_line $USER2$/check_postgres.pl -H $HOSTADDRESS$ -u
pgsql -db postgres --action last_vacuum -w $ARG1$ -c $ARG2$
}

define command {
command_name check_postgres_bloat
command_line $USER2$/check_postgres.pl -H $HOSTADDRESS$ -u
pgsql -db postgres --action bloat -w $ARG1$ -c $ARG2$
}

define command {
command_name check_postgres_settings_checksum
command_line $USER2$/check_postgres.pl -H $HOSTADDRESS$ -u
pgsql -db postgres --action settings_checksum -c $ARG1$
}

define command {
command_name check_postgres_locks
command_line $USER2$/check_postgres.pl -H $HOSTADDRESS$ -u
pgsql -db postgres --action locks -w $ARG1$ -c $ARG2$
}

---- Service Check Examples ----

[Host Definition]

define service{
use generic-other
host_name dbhost.gtld
service_description dbhost PostgreSQL Service
Database Usage Size
check_command check_postgres_size!256000000!
512000000
}

define service{
use generic-other
host_name dbhost.gtld
service_description dbhost PostgreSQL Service
Database Locks
check_command check_postgres_locks!2!3
}

define service{
use generic-other
host_name dbhost.gtld
service_description dbhost PostgreSQL Service Last
Vacuum
check_command check_postgres_last_vacuum!600!
900
}

define service{
use generic-other
host_name dbhost.gtld
service_description dbhost PostgreSQL Service
Database Configuration Checksum
check_command
check_postgres_settings_checksum!654104dd9397d7032c275a165c33d6e0
}

define service{
use generic-other
host_name dbhost.gtld
service_description dbhost PostgreSQL Service
Database Bloat
check_command check_postgres_bloat!3000000!
9000000
}

define service{
use generic-other
host_name dbhost.gtld
service_description dbhost PostgreSQL Service Active
Backend Threads
check_command check_postgres_backends!40!60
}

define service{
use generic-other
host_name dbhost.gtld
service_description dbhost PostgreSQL Service NTP
Jitter
check_command check_postgres_time!1!2
}

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Marlowe 2008-04-07 16:27:02 Re: Tuning
Previous Message Carol Walter 2008-04-07 15:33:13 Tuning