.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "CHECK_PGBACKREST 1" .TH CHECK_PGBACKREST 1 "2022-06-14" "2.3" "" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" check_pgbackrest \- pgBackRest backup check plugin for Nagios .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& check_pgbackrest [\-s|\-\-service SERVICE] [\-S|\-\-stanza NAME] \& check_pgbackrest [\-l|\-\-list] \& check_pgbackrest [\-\-help] .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" check_pgbackrest is designed to monitor pgBackRest (2.33 and above) backups from Nagios. .IP "\fB\-s\fR, \fB\-\-service\fR \s-1SERVICE\s0" 4 .IX Item "-s, --service SERVICE" The Nagios service to run. See section \s-1SERVICES\s0 for a description of available services or use \f(CW\*(C`\-\-list\*(C'\fR for a short service and description list. .IP "\fB\-S\fR, \fB\-\-stanza\fR \s-1NAME\s0" 4 .IX Item "-S, --stanza NAME" Name of the stanza to check. .IP "\fB\-\-repo\fR \s-1REPOSITORY\s0" 4 .IX Item "--repo REPOSITORY" Repository index to operate on. If no \f(CW\*(C`\-\-repo\*(C'\fR argument is provided, the service will operate on all repositories defined, checking for inconsistencies across multiple repositories. When using multiple repositories, it is recommended to also define checks using the \f(CW\*(C`\-\-repo\*(C'\fR argument to verify the sanity of each repository separately. .IP "\fB\-O\fR, \fB\-\-output\fR \s-1OUTPUT_FORMAT\s0" 4 .IX Item "-O, --output OUTPUT_FORMAT" The output format. Supported outputs are: \f(CW\*(C`human\*(C'\fR, \f(CW\*(C`json\*(C'\fR, \f(CW\*(C`nagios\*(C'\fR (default), \&\f(CW\*(C`nagios_strict\*(C'\fR and \f(CW\*(C`prtg\*(C'\fR. .Sp The \f(CW\*(C`nagios_strict\*(C'\fR output format will filter out unsupported types of values from the performance data. .IP "\fB\-C\fR, \fB\-\-command\fR \s-1FILE\s0" 4 .IX Item "-C, --command FILE" pgBackRest executable file (default: \*(L"pgbackrest\*(R"). .IP "\fB\-c\fR, \fB\-\-config\fR \s-1CONFIGURATION_FILE\s0" 4 .IX Item "-c, --config CONFIGURATION_FILE" pgBackRest configuration file. .IP "\fB\-P\fR, \fB\-\-prefix\fR \s-1COMMAND\s0" 4 .IX Item "-P, --prefix COMMAND" Some prefix command to execute the pgBackRest info command (eg: \*(L"sudo \-iu postgres\*(R"). .IP "\fB\-l\fR, \fB\-\-list\fR" 4 .IX Item "-l, --list" List available services. .IP "\fB\-\-debug\fR" 4 .IX Item "--debug" Print some debug messages. .IP "\fB\-V\fR, \fB\-\-version\fR" 4 .IX Item "-V, --version" Print version and exit. .IP "\fB\-?\fR, \fB\-\-help\fR" 4 .IX Item "-?, --help" Show this help page. .SS "\s-1SERVICES\s0" .IX Subsection "SERVICES" Descriptions and parameters of available services. .IP "\fBretention\fR" 4 .IX Item "retention" Fail when the number of full backups is less than the \&\f(CW\*(C`\-\-retention\-full\*(C'\fR argument. .Sp Fail when the number of differential backups is less than the \&\f(CW\*(C`\-\-retention\-diff\*(C'\fR argument. .Sp Fail when the number of incremental backups is less than the \&\f(CW\*(C`\-\-retention\-incr\*(C'\fR argument. .Sp Fail when the newest backup is older than the \f(CW\*(C`\-\-retention\-age\*(C'\fR argument. .Sp Fail when the newest full backup is older than the \&\f(CW\*(C`\-\-retention\-age\-to\-full\*(C'\fR argument. .Sp Fail when the oldest backup is newer than the \&\f(CW\*(C`\-\-retention\-age\-to\-oldest\*(C'\fR argument. .Sp The following units are accepted (not case sensitive): s (second), m (minute), h (hour), d (day). You can use more than one unit per given value. .Sp Arguments are not mandatory to only show some information. .IP "\fBarchives\fR" 4 .IX Item "archives" Check if all archived WALs exist between the oldest and the latest \&\s-1WAL\s0 needed for the recovery. .Sp Use the \f(CW\*(C`\-\-wal\-segsize\*(C'\fR argument to set the \s-1WAL\s0 segment size. .Sp The following units are accepted (not case sensitive): b (Byte), k (\s-1KB\s0), m (\s-1MB\s0), g (\s-1GB\s0), t (\s-1TB\s0), p (\s-1PB\s0), e (\s-1EB\s0) or Z (\s-1ZB\s0). Only integers are accepted. Eg. \f(CW\*(C`1.5MB\*(C'\fR will be refused, use \f(CW\*(C`1500kB\*(C'\fR. .Sp The factor between units is 1024 bytes. Eg. \f(CW\*(C`1g = 1G = 1024*1024*1024.\*(C'\fR .Sp Use the \f(CW\*(C`\-\-ignore\-archived\-before\*(C'\fR argument to ignore the archived WALs generated before the provided interval. Used to only check the latest archives. .Sp Use the \f(CW\*(C`\-\-ignore\-archived\-after\*(C'\fR argument to ignore the archived WALs generated after the provided interval. .Sp The \f(CW\*(C`\-\-latest\-archive\-age\-alert\*(C'\fR argument defines the max age of the latest archived \s-1WAL\s0 as an interval before raising a critical alert. .Sp The following units are accepted as interval (not case sensitive): s (second), m (minute), h (hour), d (day). You can use more than one unit per given value. If not set, the last unit is in seconds. Eg. \*(L"1h 55m 6\*(R" = \*(L"1h55m6s\*(R". .Sp All the missing archives are only shown in the \f(CW\*(C`\-\-debug\*(C'\fR mode. .Sp Use \f(CW\*(C`\-\-list\-archives\*(C'\fR in addition with \f(CW\*(C`\-\-debug\*(C'\fR to print the list of all the archived \s-1WAL\s0 segments. .Sp Use \f(CW\*(C`\-\-list\-boundaries\*(C'\fR in addition with \f(CW\*(C`\-\-debug\*(C'\fR to print the list of all the boundary \s-1WAL\s0 segments fetched from the history files. .Sp By default, all the archives older than the oldest backup start archive or newer than the max_wal returned by the pgBackRest info command are ignored. .Sp Use the \f(CW\*(C`\-\-extended\-check\*(C'\fR argument to force a full check of the found archives and raise warnings in case of inconsistencies. .Sp When \s-1WAL\s0 archives on different timelines are found, .history files are parsed to find the switch point and define the boundary \s-1WAL.\s0 .Sp Use the \f(CW\*(C`\-\-max\-archives\-check\-number\*(C'\fR to prevent infinite \s-1WAL\s0 archives check when boundary \s-1WAL\s0 can't be defined properly. .Sp In case of pgBackRest db history change (after a successful stanza-upgrade), only the latest db system/version will be checked. .IP "\fBcheck_pgb_version\fR" 4 .IX Item "check_pgb_version" Check if this script is running a given version. .Sp You must provide the expected version using \f(CW\*(C`\-\-target\-version\*(C'\fR. .SH "CONTRIBUTING" .IX Header "CONTRIBUTING" check_pgbackrest is an open project. Any contribution to improve it is welcome. .SH "VERSION" .IX Header "VERSION" check_pgbackrest version 2.3, released on Tue May 31 2022. .SH "LICENSING" .IX Header "LICENSING" This program is open source, licensed under the PostgreSQL license. For license terms, see the \s-1LICENSE\s0 file. .SH "AUTHORS" .IX Header "AUTHORS" Author: Stefan Fercot. .PP Logo: Damien Cazeils (www.damiencazeils.com). .PP Copyright: (c) 2018\-2020, Dalibo / 2020\-2022, Stefan Fercot.