Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id F0DC12E0038 for ; Mon, 7 Apr 2008 13:00:59 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 87058-06 for ; Mon, 7 Apr 2008 13:00:49 -0300 (ADT) X-Greylist: delayed 00:06:46.70943 by SQLgrey-1.7.5 Received: from mail.digitalfreaks.org (arbitor.digitalfreaks.org [216.151.95.158]) by developer.postgresql.org (Postfix) with ESMTP id 74A362E004F for ; Mon, 7 Apr 2008 13:00:49 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by mail.digitalfreaks.org (Postfix) with ESMTP id 6B48017DB2; Mon, 7 Apr 2008 11:54:01 -0400 (EDT) Received: from mail.digitalfreaks.org ([127.0.0.1]) by localhost (mail.digitalfreaks.org [127.0.0.1]) (amavisd-maia, port 10024) with ESMTP id 03658-20; Mon, 7 Apr 2008 11:53:57 -0400 (EDT) Received: from [192.168.2.161] (pr40.pitbpa0.pub.collaborativefusion.com [206.210.89.202]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.digitalfreaks.org (Postfix) with ESMTP id C5D7E17DAB; Mon, 7 Apr 2008 11:53:57 -0400 (EDT) Subject: checkcommands.conf templates for check_postgres.pl From: "Brian A. Seklecki" To: Nagios Discussion , pgsql-admin@postgresql.org Cc: greg@turnstep.com Content-Type: text/plain Date: Mon, 07 Apr 2008 11:53:57 -0400 Message-Id: <1207583637.12507.53.camel@soundwave.ws.pitbpa0.priv.collaborativefusion.com> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 (2.12.3-3.fc8) Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.2 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/53 X-Sequence-Number: 28817 [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 }