From f9972e73af05518d20712e9a3544714881ec5aa4 Mon Sep 17 00:00:00 2001
From: Greg Sabino Mullane check_postgres.pl - a Postgres monitoring script for Nagios, MRTG, and others
-This documents describes check_postgres.pl version 2.3.4
NAME
custom_query argument, and should be kept as simple as possible
a view or a function to keep things easier to manage. The query should return one or two columns: the first
is the result that will be checked, and the second is any performance data you want sent.
At least one warning or critical argument must be specified. What these are set to depends on the type of
-query you are running. There are four types of custom_queries that can be run, specified by the checktype
+query you are running. There are four types of custom_queries that can be run, specified by the valtype
argument. If none is specified, this action defaults to 'integer'. The four types are:
integer: Does a simple integer comparison. The first column should be a simple integer, and the warning and @@ -492,10 +492,10 @@ value. However, an option of --reverse will trigger the alert if the re lower than or equal to the critical or warning value.
Example 1: Warn if any relation over 100 pages is named "rad":
- check_postgres_custom_query --checktype=string -w "rad" --query="SELECT relname FROM pg_class WHERE relpages > 100" --port=5432+ check_postgres_custom_query --valtype=string -w "rad" --query="SELECT relname FROM pg_class WHERE relpages > 100" --port=5432
Example 2: Give a critical if the "foobar" function returns a number over 5MB:
- check_postgres_custom_query --port=5432 --critical='5MB'--checktype=size --query="SELECT foobar()"+ check_postgres_custom_query --port=5432 --critical='5MB'--valtype=size --query="SELECT foobar()"
Example 2: Warn if the function "snazzo" returns less than 42:
check_postgres_custom_query --port=5432 --critical=42 --query="SELECT snazzo()" --reverse@@ -1119,6 +1119,13 @@ feature requests, and commit notices, send email to HISTORY
Items not specifically attributed are by Greg Sabino Mullane.
+ Change option 'checktype' to 'valtype' to prevent collisions with -c[ritical] + Better handling of errors.+
check_postgres.pl is a script for checking the state of one or more Postgres databases and reporting back in a Nagios-friendly manner. It was developed by Greg Sabino Mullane of End Point Corporation and is BSD-licensed. The latest version is 2.3.4, and was released on October 09, 2008.
+check_postgres.pl is a script for checking the state of one or more Postgres databases and reporting back in a Nagios-friendly manner. It was developed by Greg Sabino Mullane of End Point Corporation and is BSD-licensed. The latest version is 2.3.5, and was released on October 09, 2008.
The latest development version can be downloaded via git:
-- 2.39.5