Skip to content

Commit

Permalink
Release 2.0_rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
ioguix committed Jun 17, 2016
1 parent c8afeb5 commit b3a3ffe
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 57 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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
Expand Down
163 changes: 111 additions & 52 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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``\ .

Expand All @@ -474,17 +497,24 @@ 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
(default), size or time depending on the \ ``--type``\ argument.
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
Expand Down Expand Up @@ -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+)
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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+)
Expand Down
4 changes: 2 additions & 2 deletions check_pgactivity
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ setlocale( LC_ALL, 'C' );

$| = 1;

$VERSION = '2.0dev';
$VERSION = '2.0_rc1';
$PROGRAM = 'check_pgactivity';

my $PG_VERSION_MIN = 70400;
Expand Down Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions check_pgactivity.spec
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 <jgdr@dalibo.com> 2.0~rc1-1
- update to release 2.0~rc1

* Thu Jan 28 2016 Jehan-Guillaume de Rorthais <jgdr@dalibo.com> 1.25-1
- update to release 1.25

Expand Down

0 comments on commit b3a3ffe

Please sign in to comment.