[check_postgres] [commit] Getting ready for next release.

check_postgres at bucardo.org check_postgres at bucardo.org
Tue Apr 28 14:49:26 UTC 2009


Committed by Greg Sabino Mullane <greg at endpoint.com>

Getting ready for next release.

---
 check_postgres.pl.asc  |    6 +-
 check_postgres.pl.html |  123 +++++++++++++++++++++++++++++++++++++++++-------
 index.html             |    2 +-
 3 files changed, 109 insertions(+), 22 deletions(-)

diff --git a/check_postgres.pl.asc b/check_postgres.pl.asc
index 9ebb368..7c96946 100644
--- a/check_postgres.pl.asc
+++ b/check_postgres.pl.asc
@@ -1,6 +1,6 @@
 -----BEGIN PGP SIGNATURE-----
 
-iEYEABEDAAYFAkn2POAACgkQvJuQZxSWSsjFFwCeNLfR1C0kd4f2YKTnlvaapm3e
-6IsAoJQmPHbo18rsn8fkXSMz5wfMTHla
-=ZZQS
+iEYEABEDAAYFAkn3F10ACgkQvJuQZxSWSsgCsgCeIiceUekr6p+LdPnaVT9nOzuv
+iZEAnjM5MdYK68UwTDhwJ5Ju42DUhqJA
+=r0EB
 -----END PGP SIGNATURE-----
diff --git a/check_postgres.pl.html b/check_postgres.pl.html
index c6ec590..a6595c7 100644
--- a/check_postgres.pl.html
+++ b/check_postgres.pl.html
@@ -57,6 +57,9 @@
 		<li><a href="#listener"><strong>listener</strong></a></li>
 		<li><a href="#locks"><strong>locks</strong></a></li>
 		<li><a href="#logfile"><strong>logfile</strong></a></li>
+		<li><a href="#new_version_cp"><strong>new_version_cp</strong></a></li>
+		<li><a href="#new_version_pg"><strong>new_version_pg</strong></a></li>
+		<li><a href="#prepared_txns"><strong>prepared_txns</strong></a></li>
 		<li><a href="#query_runtime"><strong>query_runtime</strong></a></li>
 		<li><a href="#query_time"><strong>query_time</strong></a></li>
 		<li><a href="#sequence"><strong>sequence</strong></a></li>
@@ -187,7 +190,7 @@ argument, for example:</p>
   --output=simple,MB</pre>
 <p>
 </p>
-<h3><a name="simple_output">Simple output</a></h3>
+<h3><a name="cacti_output">Cacti output</a></h3>
 <p>The Cacti output consists of one or more items on the same line, with a simple name, a colon, and 
 then a number. At the moment, the only action with explicit Cacti output is 'dbstats', and using 
 the --output option is not needed in this case, as Cacti is the only output for this action. For many 
@@ -230,7 +233,7 @@ it defaults to 'postgres'.</p>
 
 <dd>
 <p>Provides the password to connect to the database with. Use of this option is highly discouraged.
-Instead, one should use a .pgpass of pg_service.conf file.</p>
+Instead, one should use a .pgpass or pg_service.conf file.</p>
 </dd>
 <dt><strong><a name="item__2d_2ddbservice_3dname"><strong>--dbservice=NAME</strong></a></strong></dt>
 
@@ -493,7 +496,9 @@ to check that your warm standby is truly 'warm'. The data directory must be set,
 environment variable <code>PGDATA</code>, or passing 
 the <code>--datadir</code> argument. It returns the number of seconds since the last checkpoint 
 was run, as determined by parsing the call to <code>pg_controldata</code>. Because of this, the 
-pg_controldata executable must be available in the current path.</p>
+pg_controldata executable must be available in the current path. Alternatively, you can 
+set the environment variable <code>PGCONTROLDATA</code> to the exact location of the pg_controldata 
+executable, or you can specify <code>PGBINDIR</code> as the directory that it lives in.</p>
 <p>At least one warning or critical argument must be set.</p>
 <p>This action requires the Date::Parse module.</p>
 <p>For MRTG or simple output, returns the number of seconds.</p>
@@ -640,6 +645,44 @@ space. The items are:</p>
 </dl>
 <p>Note that ret, fetch, ins, upd, and del items will always be 0 if Postgres is version 8.2 or lower, as those stats were 
 not available in those versions.</p>
+<p>If the dbname argument is given, seven additional items are returned:</p>
+<dl>
+<dt><strong><a name="item_idx_scan">idx_scan</a></strong></dt>
+
+<dd>
+<p>Total number of user index scans.</p>
+</dd>
+<dt><strong><a name="item_idx_tup_read">idx_tup_read</a></strong></dt>
+
+<dd>
+<p>Total number of user index entries returned.</p>
+</dd>
+<dt><strong><a name="item_idx_tup_fetch">idx_tup_fetch</a></strong></dt>
+
+<dd>
+<p>Total number of rows fetched by simple user index scans.</p>
+</dd>
+<dt><strong><a name="item_idx_blks_read">idx_blks_read</a></strong></dt>
+
+<dd>
+<p>Total number of disk blocks read for all user indexes.</p>
+</dd>
+<dt><strong><a name="item_idx_blks_hit">idx_blks_hit</a></strong></dt>
+
+<dd>
+<p>Total number of buffer hits for all user indexes.</p>
+</dd>
+<dt><strong><a name="item_seq_scan">seq_scan</a></strong></dt>
+
+<dd>
+<p>Total number of sequential scans against all user tables.</p>
+</dd>
+<dt><strong><a name="item_seq_tup_read">seq_tup_read</a></strong></dt>
+
+<dd>
+<p>Total number of tuples returned from all user tables.</p>
+</dd>
+</dl>
 <p>Example 1: Grab the stats for a database named &quot;products&quot; on host &quot;willow&quot;:</p>
 <pre>
   check_postgres_dbstats --dbhost willow --dbname products</pre>
@@ -698,9 +741,7 @@ warning and <strong>95%</strong> for the critical.</p>
 <p>Example 1: Give a warning when our cluster has used up 76% of the free-space pageslots, with pg_freespacemap installed in database robert</p>
 <pre>
   check_postgres_fsm_pages --dbname=robert --warning=&quot;76%&quot;</pre>
-<p>While you need to pass in the name of the database where pg_freespacemap is installed (and optionally a schema name if you have
-installed the module in a non-standard schema), you only need to run this check once per cluster. Also, checking this information
-does require obtaining special locks on the free-space-map, so it is recommend you do not run this check with short intervals.</p>
+<p>While you need to pass in the name of the database where pg_freespacemap is installed, you only need to run this check once per cluster. Also, checking this information does require obtaining special locks on the free-space-map, so it is recommend you do not run this check with short intervals.</p>
 <p>For MRTG output, returns the percent of free-space-map on the first line, and the number of pages currently used on 
 the second line.</p>
 <p>
@@ -711,11 +752,11 @@ This action will only work for databases of 8.2 or higher, and it requires the c
 installed. The <em>--warning</em> and <em>--critical</em> options should be expressed as percentages. The number of used relations 
 in the free-space-map is determined by looking in the pg_freespacemap_relations view. The default values are <strong>85%</strong> for 
 the warning and <strong>95%</strong> for the critical.</p>
-<p>Example 1: Give a warning when our cluster has used up 80% of the free-space relations, with pg_freespacemap installed in database dylan, in non-standard schema emma</p>
+<p>Example 1: Give a warning when our cluster has used up 80% of the free-space relations, with pg_freespacemap installed in database dylan</p>
 <pre>
-  check_postgres_fsm_relations --dbname=dylan --warning=&quot;75%&quot; --schema=emma</pre>
-<p>While you need to pass in the name of the database where pg_freespacemap is installed (and optionally a schema name
-if you have installed the module in a non-standard schema), you only need to run this check once per cluster. Also,
+  check_postgres_fsm_relations --dbname=dylan --warning=&quot;75%&quot;</pre>
+<p>While you need to pass in the name of the database where pg_freespacemap is installed, you only need to run this check 
+once per cluster. Also,
 checking this information does require obtaining special locks on the free-space-map, so it is recommend you do not
 run this check with short intervals.</p>
 <p>For MRTG output, returns the percent of free-space-map on the first line, the number of relations currently used on 
@@ -861,6 +902,42 @@ options should <em>not</em> be used.</p>
 failure, the fourth line will provide more detail on the failure encountered.</p>
 <p>
 </p>
+<h2><a name="new_version_cp"><strong>new_version_cp</strong></a></h2>
+<p>(<code>symlink: check_postgres_new_version_cp</code>) Checks if a newer version of this program 
+(check_postgres.pl) is available, by grabbing the version from a small text file 
+on the main page of the home page for the project. Returns a warning if the returned 
+version does not match the one you are running. Recommended interval to check is 
+once a day.</p>
+<p>
+</p>
+<h2><a name="new_version_pg"><strong>new_version_pg</strong></a></h2>
+<p>(<code>symlink: check_postgres_cp_new_version_pg</code>) Checks if a newer revision of Postgres 
+exists for each database connected to. Note that this only checks for revision, e.g. 
+going from 8.3.6 to 8.3.7. Revisions are always 100% binary compatible and involve no 
+dump and restore to upgrade. Revisions are made to address bugs, so upgrading as soon 
+as possible is always recommended. Returns a warning if you do not have the latest revision.
+It is recommended this check is run at least once a day.</p>
+<p>
+</p>
+<h2><a name="prepared_txns"><strong>prepared_txns</strong></a></h2>
+<p>(<code>symlink: check_postgres_prepared_txns</code>) Check on the age of any existing prepared transactions. 
+Note that most people will NOT use prepared transactions, as they are part of two-part commit 
+and complicated to maintain. They should also not be confused with prepared STATEMENTS, which is 
+what most people think of when they hear prepare. The default value for a warning is 1 second, to 
+detect any use of prepared transactions, which is probably a mistake on most systems. Warning and 
+critical are the number of seconds a prepared transaction has been open before an alert is given.</p>
+<p>Example 1: Give a warning on detecting any prepared transactions:</p>
+<pre>
+  check_postgres_prepared_txns -w 0</pre>
+<p>Example 2: Give a critical if any prepared transaction has been open longer than 10 seconds, but allow 
+up to 360 seconds for the database 'shrike':</p>
+<pre>
+  check_postgres_listener --critical=10 --exclude=shrike
+  check_postgres_listener --critical=360 --include=shrike</pre>
+<p>For MRTG output, returns the number of seconds the oldest transaction has been open as the first line, 
+and which database is came from as the final line.</p>
+<p>
+</p>
 <h2><a name="query_runtime"><strong>query_runtime</strong></a></h2>
 <p>(<code>symlink: check_postgres_query_runtime</code>) Checks how long a specific query takes to run, by executing a &quot;EXPLAIN ANALYZE&quot; 
 against it. The <em>--warning</em> and <em>--critical</em> options are the maximum amount of 
@@ -897,7 +974,7 @@ assumed to be seconds.</p>
   check_postgres_query_time --port=5432 --exclude=~^template</pre>
 <p>Example 3: Warn if user 'don' has a query running over 20 seconds</p>
 <pre>
-  check_postgres_query_time --port=5432 --inclucdeuser=don --warning=20s</pre>
+  check_postgres_query_time --port=5432 --includeuser=don --warning=20s</pre>
 <p>For MRTG output, returns the length in seconds of the longest running query on the first line. The fourth 
 line gives the name of the database.</p>
 <p>
@@ -1043,7 +1120,7 @@ value. Due to the non-exact nature of this test, values of '0' or '1' are not re
 <p>The string returned shows the time difference as well as the time on each side written out.</p>
 <p>Example 1: Check that databases on hosts ankh, morpork, and klatch are no more than 3 seconds off from the local time:</p>
 <pre>
-  check_postgres_timesync --host=ankh,morpork.klatch --critical=3</pre>
+  check_postgres_timesync --host=ankh,morpork,klatch --critical=3</pre>
 <p>For MRTG output, returns one the first line the number of seconds difference between the local 
 time and the database time. The fourth line returns the name of the database.</p>
 <p>
@@ -1252,19 +1329,29 @@ feature requests, and commit notices, send email to <a href="mailto:check_postgr
 <h1><a name="history">HISTORY</a></h1>
 <p>Items not specifically attributed are by Greg Sabino Mullane.</p>
 <dl>
-<dt><strong><a name="item_0"><strong>Version 2.8.0</strong> (March ??, 2009)</a></strong></dt>
+<dt><strong><a name="item_0"><strong>Version 2.8.0</strong> (April ??, 2009)</a></strong></dt>
 
 <dd>
 <pre>
-  Added the 'disabled_triggers' check
-  Added internationalization support
+  Added internationalization support (Greg)
+  Added the 'disabled_triggers' check (Greg)
+  Added the prepared_txns' check (Greg)
+  Added the 'new_version_cp' and 'new_version_pg' checks (Greg)
   French translations (Guillaume Lelarge)
   Make the backends search return ok if no matches due to inclusion rules,
-    per report by Guillaume Lelarge
-  Begin adding comprehensive unit tests
+    per report by Guillaume Lelarge (Greg)
+  Added comprehensive unit tests (Greg, Jeff Boes, Selena Decklemann)
+  Make fsm_pages and fsm_relatins handle 8.4 servers smoothly. (Greg)
   Fix missing 'upd' field in show_dbstats (Andras Fabian)
+  Allow ENV{PGCONTROLDATA} and ENV{PGBINDIR}. (Greg)
+  Fix incorrect regex in txn_wraparound (Greg)
+  For txn_wraparound: consistent ordering and fix duplicates in perf output (Andras Fabian)
   Add in missing exabyte regex check (Selena Deckelmann)
-  Set stats to zero if we bail early due to USERWHERECLAUSE (Andras Fabian)</pre>
+  Set stats to zero if we bail early due to USERWHERECLAUSE (Andras Fabian)
+  Add additional items to dbstats output (Andras Fabian)
+  Remove --schema option from the fsm_ checks. (Greg Mullane and Robert Treat)
+  Various fixes. (Jeff Boes)
+  Fix --dbservice: check version and use ENV{PGSERVICE} for old versions (Cédric Villemain)</pre>
 </dd>
 <dt><strong><a name="item_3"><strong>Version 2.7.3</strong> (February 10, 2009)</a></strong></dt>
 
diff --git a/index.html b/index.html
index 817b8c4..e7331f1 100644
--- a/index.html
+++ b/index.html
@@ -21,7 +21,7 @@ h1 {
 
 <h1>check_postgres.pl</h1>
 
-<p><b>check_postgres.pl</b> 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 <a href="http://www.endpoint.com/">End Point Corporation</a> and is BSD-licensed. The latest version is <b>2.8.0</b>, and was released on February 23, 2009.</p>
+<p><b>check_postgres.pl</b> 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 <a href="http://www.endpoint.com/">End Point Corporation</a> and is BSD-licensed. The latest version is <b>2.8.0</b>, and was released on April 28, 2009.</p>
 
 <ul>
  <li><a href="/check_postgres/check_postgres.pl.html">Documentation for check_postgres 2.8.0</a></li>
-- 
1.6.0.5



More information about the Check_postgres mailing list