From: Christoph Berg Date: Thu, 26 May 2016 11:59:18 +0000 (+0200) Subject: Run "make html" X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=51acc620d4a015c47e09d95b4c639284ec10d645;p=check_postgres.git Run "make html" "make html" had not been run for some time, do that now. --- diff --git a/check_postgres.pl.html b/check_postgres.pl.html index 09304672f..dd7e1c0d3 100644 --- a/check_postgres.pl.html +++ b/check_postgres.pl.html @@ -7,7 +7,7 @@ - + @@ -111,7 +111,7 @@

check_postgres.pl - a Postgres monitoring script for Nagios, MRTG, Cacti, and others

-

This documents describes check_postgres.pl version 2.22.0

+

This documents describes check_postgres.pl version 2.22.1

SYNOPSIS

@@ -428,13 +428,25 @@

archive_ready

-

(symlink: check_postgres_archive_ready) Checks how many WAL files with extension .ready exist in the pg_xlog/archive_status directory, which is found off of your data_directory. This action must be run as a superuser, in order to access the contents of the pg_xlog/archive_status directory. The minimum version to use this action is Postgres 8.1. The --warning and --critical options are simply the number of .ready files in the pg_xlog/archive_status directory. Usually, these values should be low, turning on the archive mechanism, we usually want it to archive WAL files as fast as possible.

+

(symlink: check_postgres_archive_ready) Checks how many WAL files with extension .ready exist in the pg_xlog/archive_status directory, which is found off of your data_directory. If the --lsfunc option is not used then this action must be run as a superuser, in order to access the contents of the pg_xlog/archive_status directory. The minimum version to use this action is Postgres 8.1. The --warning and --critical options are simply the number of .ready files in the pg_xlog/archive_status directory. Usually, these values should be low, turning on the archive mechanism, we usually want it to archive WAL files as fast as possible.

If the archive command fail, number of WAL in your pg_xlog directory will grow until exhausting all the disk space and force PostgreSQL to stop immediately.

-

Example 1: Check that the number of ready WAL files is 10 or less on host "pluto"

+

To avoid connecting as a database superuser, a wrapper function around pg_ls_dir() should be defined as a superuser with SECURITY DEFINER, and the --lsfunc option used. This example function, if defined by a superuser, will allow the script to connect as a normal user nagios with --lsfunc=ls_archive_status_dir

-
  check_postgres_archive_ready --host=pluto --critical=10
+
  BEGIN;
+  CREATE FUNCTION ls_archive_status_dir()
+      RETURNS SETOF TEXT
+      AS $$ SELECT pg_ls_dir('pg_xlog/archive_status') $$
+      LANGUAGE SQL
+      SECURITY DEFINER;
+  REVOKE ALL ON FUNCTION ls_archive_status_dir() FROM PUBLIC;
+  GRANT EXECUTE ON FUNCTION ls_archive_status_dir() to nagios;
+  COMMIT;
+ +

Example 1: Check that the number of ready WAL files is 10 or less on host "pluto", using a wrapper function ls_archive_status_dir to avoid the need for superuser permissions

+ +
  check_postgres_archive_ready --host=pluto --critical=10 --lsfunc=ls_archive_status_dir

For MRTG output, reports the number of ready WAL files on line 1.

@@ -1158,6 +1170,8 @@

To replace the old stored file with the new version, use the --replace argument.

+

If you need to write the stored file to a specific direectory, use the --audit-file-dir argument.

+

To enable snapshots at various points in time, you can use the "--suffix" argument to make the filenames unique to each run. See the examples below.

Example 1: Verify that two databases on hosts star and line are the same:

@@ -1315,13 +1329,25 @@

wal_files

-

(symlink: check_postgres_wal_files) Checks how many WAL files exist in the pg_xlog directory, which is found off of your data_directory, sometimes as a symlink to another physical disk for performance reasons. This action must be run as a superuser, in order to access the contents of the pg_xlog directory. The minimum version to use this action is Postgres 8.1. The --warning and --critical options are simply the number of files in the pg_xlog directory. What number to set this to will vary, but a general guideline is to put a number slightly higher than what is normally there, to catch problems early.

+

(symlink: check_postgres_wal_files) Checks how many WAL files exist in the pg_xlog directory, which is found off of your data_directory, sometimes as a symlink to another physical disk for performance reasons. If the --lsfunc option is not used then this action must be run as a superuser, in order to access the contents of the pg_xlog directory. The minimum version to use this action is Postgres 8.1. The --warning and --critical options are simply the number of files in the pg_xlog directory. What number to set this to will vary, but a general guideline is to put a number slightly higher than what is normally there, to catch problems early.

Normally, WAL files are closed and then re-used, but a long-running open transaction, or a faulty archive_command script, may cause Postgres to create too many files. Ultimately, this will cause the disk they are on to run out of space, at which point Postgres will shut down.

-

Example 1: Check that the number of WAL files is 20 or less on host "pluto"

+

To avoid connecting as a database superuser, a wrapper function around pg_ls_dir() should be defined as a superuser with SECURITY DEFINER, and the --lsfunc option used. This example function, if defined by a superuser, will allow the script to connect as a normal user nagios with --lsfunc=ls_xlog_dir

-
  check_postgres_wal_files --host=pluto --critical=20
+
  BEGIN;
+  CREATE FUNCTION ls_xlog_dir()
+      RETURNS SETOF TEXT
+      AS $$ SELECT pg_ls_dir('pg_xlog') $$
+      LANGUAGE SQL
+      SECURITY DEFINER;
+  REVOKE ALL ON FUNCTION ls_xlog_dir() FROM PUBLIC;
+  GRANT EXECUTE ON FUNCTION ls_xlog_dir() to nagios;
+  COMMIT;
+ +

Example 1: Check that the number of ready WAL files is 10 or less on host "pluto", using a wrapper function ls_xlog_dir to avoid the need for superuser permissions

+ +
  check_postgres_archive_ready --host=pluto --critical=10 --lsfunc=ls_xlog_dir

For MRTG output, reports the number of WAL files on line 1.

@@ -1511,7 +1537,21 @@
-
Version 2.22.0
+
Version 2.22.1 Released ????
+
+ +
  Add Spanish message translations
+    (Luis Vazquez)
+
+  Allow a wrapper function to run wal_files and archive_ready actions as
+  non-superuser
+    (Joshua Elsasser)
+
+  Add some defensive casting to the bloat query
+    (Greg Sabino Mullane)
+ +
+
Version 2.22.0 June 30, 2015
  Add xact timestamp support to hot_standby_delay.