From 939846c4a856356ef5d4c4b16b47ea88455feefa Mon Sep 17 00:00:00 2001
From: Greg Sabino Mullane
Date: Thu, 17 Apr 2008 21:01:58 -0400
Subject: [PATCH] Add sample Nagios configuration items, from Brian A. Seklecki
---
check_postgres.pl | 36 +++++++++++++++++++++++++++++++++++-
check_postgres.pl.html | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 71 insertions(+), 1 deletion(-)
diff --git a/check_postgres.pl b/check_postgres.pl
index f230a4dc2..ba69e2529 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -3286,7 +3286,6 @@ Some actions require access to external programs. If psql is not explicitly
specified, the command B is used to find it. The program B
is needed by the B action.
-
=head1 DEVELOPMENT
Development happens using the git system. You can clone the latest version by doing:
@@ -3299,6 +3298,10 @@ Items not specifically attributed are by Greg Sabino Mullane.
=over 4
+=item B
+
+Add example Nagios configuration settings (Brian A. Seklecki)
+
=item B (April 16, 2008)
Add the --includeuser and --excludeuser options. Documentation cleanup.
@@ -3387,6 +3390,37 @@ Please report any problems to greg@endpoint.com.
Greg Sabino Mullane
+
+=head1 NAGIOS EXAMPLES
+
+Some example Nagios configuration settings using this script:
+
+ 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_locks
+ command_line $USER2$/check_postgres.pl -H $HOSTADDRESS$ -u pgsql -db postgres --action locks -w $ARG1$ -c $ARG2$
+ }
+
+
+ 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
+ }
+
+
=head1 LICENSE AND COPYRIGHT
Copyright (c) 2007-2008 Greg Sabino Mullane .
diff --git a/check_postgres.pl.html b/check_postgres.pl.html
index 02698836a..b5285f106 100644
--- a/check_postgres.pl.html
+++ b/check_postgres.pl.html
@@ -31,6 +31,7 @@
HISTORY
BUGS AND LIMITATIONS
AUTHOR
+ NAGIOS EXAMPLES
LICENSE AND COPYRIGHT
@@ -1014,6 +1015,12 @@ is needed by the check_disk_space action.
Items not specifically attributed are by Greg Sabino Mullane.
+- Version 1.5.1
+
+
-
+
Add example Nagios configuration settings (Brian A. Seklecki)
+
+
- Version 1.5.0 (April 16, 2008)
-
@@ -1140,6 +1147,35 @@ in your pg_xlog directory.
+
+Some example Nagios configuration settings using this script:
+
+ 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_locks
+ command_line $USER2$/check_postgres.pl -H $HOSTADDRESS$ -u pgsql -db postgres --action locks -w $ARG1$ -c $ARG2$
+ }
+
+ 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
+ }
+
+
+
Copyright (c) 2007-2008 Greg Sabino Mullane <greg@endpoint.com>.
Redistribution and use in source and binary forms, with or without
--
2.39.5