From b3a3ffe5cea57cddeaa06c3f37e5c02e1382975b Mon Sep 17 00:00:00 2001 From: Jehan-Guillaume de Rorthais Date: Fri, 17 Jun 2016 17:23:18 +0200 Subject: [PATCH] Release 2.0_rc1 --- CHANGELOG.md | 8 ++- README.rst | 163 ++++++++++++++++++++++++++++-------------- check_pgactivity | 4 +- check_pgactivity.spec | 7 +- 4 files changed, 125 insertions(+), 57 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da215c8d..e8ac0090 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,12 @@ Changelog ========= -WIP 2.0: + +2016-06-17 2.0: - support various output format + - add output format "nagios_strict" + - add output format "debug" + - add output format "binary" + - add output format "human" - force UTF8 encoding - fix a bug where pod2usage couldn't find the original script - fix wal size computation for 9.3+ (255 -vs- 256 seg of 16MB) @@ -11,6 +16,7 @@ WIP 2.0: - add service "table_unlogged" - add basic support to timeline cross in service archive_folder - add service "settings" + - add service "invalid_indexes" 2016-01-28 1.25: - add service pg_dump_backup diff --git a/README.rst b/README.rst index 6154d4d9..8df46ca7 100644 --- a/README.rst +++ b/README.rst @@ -108,6 +108,21 @@ offers many options to measure and monitor useful performance metrics. +\ **-F**\ , \ **--format**\ OUTPUT_FORMAT + + The output format. Supported output are: \ ``binary``\ , \ ``debug``\ , \ ``human``\ , + \ ``nagios``\ and \ ``nagios_strict``\ . + + Using the \ ``binary``\ format, the results are written in a binary file (using perl + module \ ``Storable``\ ) given in argument \ ``--output``\ . If no output is given, + defaults to file \ ``check_pgactivity.out``\ in the same directory as the script. + + The \ ``nagios_strict``\ format is equivalent to the \ ``nagios``\ format. The only + difference is that it enforces the unit follow the strict nagios specs: B, c, s + or %. Any unit not beeing in this list is dropped (Bps, Tps, etc). + + + \ **--tmpdir**\ DIRECTORY Path to a directory where the script can create temporary files. The @@ -135,6 +150,14 @@ offers many options to measure and monitor useful performance metrics. +\ **--dump-bin-file**\ [PATH] + + Dump the content of the given binary file previously created using + \ ``--format binary``\ . If no path is given, defaults to file + \ ``check_pgactivity.out``\ in the same directory as the script. + + + \ **-t**\ , \ **--timeout**\ TIMEOUT Timeout to use (default: "30s"). It can be specified as raw (in seconds) or as @@ -454,7 +477,7 @@ Descriptions and parameters of available services. Warning and Critical thresholds are ignored. Specific parameters are : - \ ``--work_mem``\ , \ ``--maintenance_work_mem``\ , \ ``--shared_buffers``\ ,\ ``-- wal_buffers``\ , + \ ``--work_mem``\ , \ ``--maintenance_work_mem``\ , \ ``--shared_buffers``\ ,\ ``--wal_buffers``\ , \ ``--checkpoint_segments``\ , \ ``--effective_cache_size``\ , \ ``--no_check_autovacuum``\ , \ ``--no_check_fsync``\ , \ ``--no_check_enable``\ , \ ``--no_check_track_counts``\ . @@ -474,7 +497,7 @@ Descriptions and parameters of available services. Perform the given user query. - The query is specified with the \ ``--query parameter``\ . The first column will be + The query is specified with the \ ``--query``\ parameter. The first column will be used to perform the test for the status if warning and critical are provided. The warning and critical arguments are optional. They can be of format integer @@ -482,9 +505,16 @@ Descriptions and parameters of available services. Warning and Critical will be raised if they are greater than the first column, or less if the \ ``--reverse``\ option is used. - All other columns will be used to generate the perfdata. The query must - display them in the perfdata format, with unit if required (eg. "size=35B"). - If a field contains multiple values, they must be separated by a space. + All other columns will be used to generate the perfdata. Each field name is used + as the name of the perfdata. The field value must contain your perfdata value + and its unit append to it. You can add as many field as needed. Eg.: + + + .. code-block:: perl + + SELECT pg_database_size('postgres'), + pg_database_size('postgres')||'B' AS db_size + @@ -537,28 +567,6 @@ Descriptions and parameters of available services. This service raise a Critical if it doesn't find exactly ONE valid master cluster (ie. critical when 0 or 2 and more masters). -\ **invalid_indexes**\ (8.4+) - -Check if there is any invalid indexes in a database. - -A critical alert is raised if an invalid index is detected. - - This service supports both \ ``--dbexclude``\ and \ ``--dbinclude``\ parameters. - -This service supports a \ ``--exclude ``\ parameter to exclude indexes -matching the given regular expression. The regular expression applies to -"database.schema_name.index_name". This allows you to filter either on a -relation name for all schemas and databases, filter on a qualified named -index (schema + index) for all databases or filter on a qualified named -index in only one database. - -You can use multiple \ ``--exclude ``\ parameters. - -Perfdata will return the number of invalid indexes per database. - -A list of invalid indexes detail will be returned after the -perfdata. This list contains the fully qualified index name. If -excluded index is set, the number of exclude index is returned. \ **is_hot_standby**\ (9.0+) @@ -582,6 +590,31 @@ excluded index is set, the number of exclude index is returned. +\ **invalid_indexes**\ + + Check if there is any invalid indexes in a database. + + A critical alert is raised if an invalid index is detected. + + This service supports both \ ``--dbexclude``\ and \ ``--dbinclude``\ parameters. + + This service supports a \ ``--exclude REGEX``\ parameter to exclude indexes + matching the given regular expression. The regular expression applies to + "database.schema_name.index_name". This allows you to filter either on a + relation name for all schemas and databases, filter on a qualified named + index (schema + index) for all databases or filter on a qualified named + index in only one database. + + You can use multiple \ ``--exclude REGEX``\ parameters. + + Perfdata will return the number of invalid indexes per database. + + A list of invalid indexes detail will be returned after the + perfdata. This list contains the fully qualified index name. If + excluded index is set, the number of exclude index is returned. + + + \ **is_replay_paused**\ (9.1+) Checks if the replication is paused. The service will return UNKNOWN if @@ -861,6 +894,29 @@ excluded index is set, the number of exclude index is returned. +\ **settings**\ (9.2+) + + Check if the settings changed compared to the known ones from postgresql.conf + file (and auto + included ones). + + The "known" settings are recorded during the very first call of the service. + To update the known settings after a configuration change, call this service + again with the argument \ ``--save``\ . + + This service needs to execute \ ``postgres -C PARAMETER_NAME``\ . You can use the + \ ``--path PATH_TO_POSTGRES``\ if the \ ``postgres``\ binary is not in the path. + + No perfdata. + + Critical and Warning thresholds are ignored. + + A WARNING is raised if at least one parameter changed. + + A CRITICAL is raised if the configuration could not been parsed, because of a + syntax error as instance. + + + \ **streaming_delta**\ (9.1+) Check the data delta between a cluster and its standbys in Streaming Replication. @@ -890,6 +946,34 @@ excluded index is set, the number of exclude index is returned. +\ **table_unlogged**\ + + Check if table are changed to unlogged. In 9.5, you can switch between logged and unlogged. + + Without \ ``--critical``\ or \ ``--warning``\ parameters, this service attempts to fetch + all unlogged tables. + + A critical alert is raised if an unlogged table is detected. + + This service supports both \ ``--dbexclude``\ and \ ``--dbinclude``\ parameters. + + This service supports a \ ``--exclude REGEX``\ parameter to exclude relations + matching the given regular expression. The regular expression applies to + "database.schema_name.relation_name". This allows you to filter either on a + relation name for all schemas and databases, filter on a qualified named relation + (schema + relation) for all databases or filter on a qualified named relation in + only one database. + + You can use multiple \ ``--exclude REGEX``\ parameters. + + Perfdata will return the number of unlogged tables per database. + + A list of the unlogged tables detail will be returned after the + perfdata. This list contains the fully qualified table name. If + excluded table is set, the number of exclude table is returned. + + + \ **table_bloat**\ Estimate bloat on tables. @@ -922,31 +1006,6 @@ excluded index is set, the number of exclude index is returned. perfdata. This list contains the fully qualified bloated table name, the estimated bloat size, the table size and the bloat percentage. -\ **table_unlogged**\ (9.5+) - - Check if table are changed to unlogged. In 9.5+, you can switch between logged and unlogged. - - Without \ ``--critical``\ or \ ``--warning``\ parameters, this service attempts - to fetch all ``unlogged`` table - - A critical alert is raised if an unlogged table is detected. - - This service supports both \ ``--dbexclude``\ and \ ``--dbinclude``\ parameters. - - This service supports a \ ``--exclude REGEX``\ parameter to exclude relations - matching the given regular expression. The regular expression applies to - "database.schema_name.relation_name". This allows you to filter either on a - relation name for all schemas and databases, filter on a qualified named relation - (schema + relation) for all databases or filter on a qualified named relation in - only one database. - - You can use multiple \ ``--exclude REGEX``\ parameters. - - Perfdata will return the number of unlogged tables per database. - - A list of the unlogged tables detail will be returned after the - perfdata. This list contains the fully qualified table name. If - excluded table is set, the number of exclude table is returned. \ **temp_files**\ (8.1+) diff --git a/check_pgactivity b/check_pgactivity index cd66d6b0..3a0f8c0e 100755 --- a/check_pgactivity +++ b/check_pgactivity @@ -52,7 +52,7 @@ setlocale( LC_ALL, 'C' ); $| = 1; -$VERSION = '2.0dev'; +$VERSION = '2.0_rc1'; $PROGRAM = 'check_pgactivity'; my $PG_VERSION_MIN = 70400; @@ -6487,7 +6487,7 @@ __END__ =head2 VERSION -check_pgactivity version 1.25, released on Thu Jan 28 2016. +check_pgactivity version 2.0_rc1, released on Fri Jun 17 2016. =head2 LICENSING diff --git a/check_pgactivity.spec b/check_pgactivity.spec index 2edd6ccf..bb7ccb1c 100644 --- a/check_pgactivity.spec +++ b/check_pgactivity.spec @@ -1,7 +1,7 @@ -%global _tag REL1_25 +%global _tag REL2_0_RC1 Name: nagios-plugins-pgactivity -Version: 1.25 +Version: 2.0~rc1 Release: 1 Summary: PostgreSQL monitoring plugin for Nagios License: PostgreSQL @@ -32,6 +32,9 @@ install -D -p -m 0755 check_pgactivity %{buildroot}/%{_libdir}/nagios/plugins/ch %doc README.rst LICENSE %changelog +* Fri Jun 17 2016 Jehan-Guillaume de Rorthais 2.0~rc1-1 +- update to release 2.0~rc1 + * Thu Jan 28 2016 Jehan-Guillaume de Rorthais 1.25-1 - update to release 1.25