From: Greg Sabino Mullane Date: Tue, 28 Apr 2009 14:49:02 +0000 (-0400) Subject: Getting ready for next release. X-Git-Tag: 2.9.0~54 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=80e6159c6a571d92b0b8d103d7b0fa0de0ac5673;p=check_postgres.git Getting ready for next release. --- diff --git a/check_postgres.pl.asc b/check_postgres.pl.asc index 9ebb368ba..7c969460c 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 c6ec590cb..a6595c773 100644 --- a/check_postgres.pl.html +++ b/check_postgres.pl.html @@ -57,6 +57,9 @@
  • listener
  • locks
  • logfile
  • +
  • new_version_cp
  • +
  • new_version_pg
  • +
  • prepared_txns
  • query_runtime
  • query_time
  • sequence
  • @@ -187,7 +190,7 @@ argument, for example:

    --output=simple,MB

    -

    Simple output

    +

    Cacti output

    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'.

    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.

    +Instead, one should use a .pgpass or pg_service.conf file.

    --dbservice=NAME
    @@ -493,7 +496,9 @@ to check that your warm standby is truly 'warm'. The data directory must be set, environment variable PGDATA, or passing the --datadir argument. It returns the number of seconds since the last checkpoint was run, as determined by parsing the call to pg_controldata. Because of this, the -pg_controldata executable must be available in the current path.

    +pg_controldata executable must be available in the current path. Alternatively, you can +set the environment variable PGCONTROLDATA to the exact location of the pg_controldata +executable, or you can specify PGBINDIR as the directory that it lives in.

    At least one warning or critical argument must be set.

    This action requires the Date::Parse module.

    For MRTG or simple output, returns the number of seconds.

    @@ -640,6 +645,44 @@ space. The items are:

    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.

    +

    If the dbname argument is given, seven additional items are returned:

    +
    +
    idx_scan
    + +
    +

    Total number of user index scans.

    +
    +
    idx_tup_read
    + +
    +

    Total number of user index entries returned.

    +
    +
    idx_tup_fetch
    + +
    +

    Total number of rows fetched by simple user index scans.

    +
    +
    idx_blks_read
    + +
    +

    Total number of disk blocks read for all user indexes.

    +
    +
    idx_blks_hit
    + +
    +

    Total number of buffer hits for all user indexes.

    +
    +
    seq_scan
    + +
    +

    Total number of sequential scans against all user tables.

    +
    +
    seq_tup_read
    + +
    +

    Total number of tuples returned from all user tables.

    +
    +

    Example 1: Grab the stats for a database named "products" on host "willow":

       check_postgres_dbstats --dbhost willow --dbname products
    @@ -698,9 +741,7 @@ warning and 95% for the critical.

    Example 1: Give a warning when our cluster has used up 76% of the free-space pageslots, with pg_freespacemap installed in database robert

       check_postgres_fsm_pages --dbname=robert --warning="76%"
    -

    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.

    +

    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.

    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.

    @@ -711,11 +752,11 @@ This action will only work for databases of 8.2 or higher, and it requires the c installed. The --warning and --critical 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 85% for the warning and 95% for the critical.

    -

    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

    +

    Example 1: Give a warning when our cluster has used up 80% of the free-space relations, with pg_freespacemap installed in database dylan

    -  check_postgres_fsm_relations --dbname=dylan --warning="75%" --schema=emma
    -

    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="75%" +

    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.

    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 not be used.

    failure, the fourth line will provide more detail on the failure encountered.

    +

    new_version_cp

    +

    (symlink: check_postgres_new_version_cp) 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.

    +

    +

    +

    new_version_pg

    +

    (symlink: check_postgres_cp_new_version_pg) 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.

    +

    +

    +

    prepared_txns

    +

    (symlink: check_postgres_prepared_txns) 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.

    +

    Example 1: Give a warning on detecting any prepared transactions:

    +
    +  check_postgres_prepared_txns -w 0
    +

    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':

    +
    +  check_postgres_listener --critical=10 --exclude=shrike
    +  check_postgres_listener --critical=360 --include=shrike
    +

    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.

    +

    +

    query_runtime

    (symlink: check_postgres_query_runtime) Checks how long a specific query takes to run, by executing a "EXPLAIN ANALYZE" against it. The --warning and --critical options are the maximum amount of @@ -897,7 +974,7 @@ assumed to be seconds.

    check_postgres_query_time --port=5432 --exclude=~^template

    Example 3: Warn if user 'don' has a query running over 20 seconds

    -  check_postgres_query_time --port=5432 --inclucdeuser=don --warning=20s
    + check_postgres_query_time --port=5432 --includeuser=don --warning=20s

    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.

    @@ -1043,7 +1120,7 @@ value. Due to the non-exact nature of this test, values of '0' or '1' are not re

    The string returned shows the time difference as well as the time on each side written out.

    Example 1: Check that databases on hosts ankh, morpork, and klatch are no more than 3 seconds off from the local time:

    -  check_postgres_timesync --host=ankh,morpork.klatch --critical=3
    + check_postgres_timesync --host=ankh,morpork,klatch --critical=3

    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.

    @@ -1252,19 +1329,29 @@ feature requests, and commit notices, send email to HISTORY

    Items not specifically attributed are by Greg Sabino Mullane.

    -
    Version 2.8.0 (March ??, 2009)
    +
    Version 2.8.0 (April ??, 2009)
    -  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)
    + 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)
    Version 2.7.3 (February 10, 2009)
    diff --git a/index.html b/index.html index 817b8c48c..e7331f197 100644 --- a/index.html +++ b/index.html @@ -21,7 +21,7 @@ h1 {

    check_postgres.pl

    -

    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.8.0, and was released on February 23, 2009.

    +

    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.8.0, and was released on April 28, 2009.