summaryrefslogtreecommitdiffstats
path: root/plugins/check_pgsql.c
AgeCommit message (Collapse)AuthorFilesLines
2014-01-20Capitalize "Monitoring" when it's the first wordHolger Weiss1-1/+1
2014-01-19Project rename initial commit.Monitoring Plugins Development Team1-4/+4
This is an initial take at renaming the project to Monitoring Plugins. It's not expected to be fully complete, and it is expected to break things (The perl module for instance). More testing will be required before this goes mainline.
2013-09-19check_pgsql: Don't exit UNKNOWN instead of OKHolger Weiss1-1/+1
Since commit 912df3ef9b188c82893dace1e9b56c42a558fdba, check_pgsql exited UNKNOWN instead of OK if the new --query option was *not* specified. This bug is fixed now.
2013-08-17check_pgsql: Add missing printf(3) argumentHolger Weiss1-1/+1
2013-08-17check_pgsql: Remove -4/-6 flags from help outputHolger Weiss1-1/+1
The -4/-6 options are currently not supported.
2013-08-17Merge remote-tracking branch 'github/tokkee/sh/check_pgsql'Holger Weiss1-32/+202
* github/tokkee/sh/check_pgsql: check_pgsql: Determine connection time in µs-resolution. check_pgsql: Leave 'min' value in query perfdata empty. check_pgsql: Updated copyright. check_pgsql: Added support for the -o command line option. check_pgsql: Removed -4/-6 flags from help output. check_pgsql: Allow UNIX socket directories as hostname as well. check_pgsql: Use PQconnectdb() rather than PQsetdbLogin(). check_pgsql: Fixed query perfdata output for empty warn/crit ranges. check_pgsql: Added support for executing queries. Conflicts: plugins/check_pgsql.c
2012-11-28unified ipv4/6 usage and help textSven Nierlein1-1/+1
2012-07-05check_pgsql: Determine connection time in µs-resolution.refs/pull/16/headSebastian Harl1-7/+15
… thus, treat "elapsed time" and the thresholds as floating point values.
2012-07-05check_pgsql: Leave 'min' value in query perfdata empty.Sebastian Harl1-1/+1
There is no reasonable default value for that.
2012-07-05check_pgsql: Updated copyright.Sebastian Harl1-2/+2
2012-07-05check_pgsql: Added support for the -o command line option.Sebastian Harl1-5/+22
This option may be used to specify further connection parameters to be passed to PQconnectdb(). For example, this may be used to specify a service name in pg_service.conf to be used for additional connection parameters: -o 'service=<name>' or to specify the SSL mode: -o 'sslmode=require'. See the chapter "libpq - C Library" in the PostgreSQL manual for details.
2012-07-05check_pgsql: Removed -4/-6 flags from help output.Sebastian Harl1-2/+0
These options are not currently supported.
2012-07-05check_pgsql: Allow UNIX socket directories as hostname as well.Sebastian Harl1-1/+1
PostgreSQL accepts the directory name of its UNIX socket as hostname as well, e.g. /var/run/postgresql/.
2012-07-05check_pgsql: Use PQconnectdb() rather than PQsetdbLogin().Sebastian Harl1-7/+48
This is more flexible and the recommended way to connect to a PostgreSQL database. Also, the verbose output now includes detailed information about the connection.
2012-07-05check_pgsql: Fixed query perfdata output for empty warn/crit ranges.Sebastian Harl1-1/+3
Previously, "(null)" was printed (when using GNU's libc). This has been changed to print the empty string instead.
2012-07-05check_pgsql: Added support for executing queries.Sebastian Harl1-11/+115
The query result (the double value of the first column in the first row, to be precise) will be checked against threshold ranges specified using the -C and -W options. Note that this also allows to query PostgreSQL internal values using the information available from the database daemon's "statistics collector" -- see the chapter "Monitoring Database Activity" in the PostgreSQL manual for details.
2012-06-29Die when asprintf failsAnders Kaseorg1-1/+1
Fixes many instances of warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2010-04-22Add newline after "Usage:" in --helpThomas Guyot-Sionnest1-1/+1
2010-04-22Standardize the extra-opts notesThomas Guyot-Sionnest1-6/+0
2010-04-14Fix translations when extra-opts aren't enabledThomas Guyot-Sionnest1-9/+9
Bug #2832884 reported problem with translations outputting pot file headers. This is caused by "" matching the header of the translation files. This patch moves gettext macros inside utils macros and update some french translations.
2009-06-01Whitespace indent fixes for check_pgsqlMatthias Eble1-22/+22
2009-06-01Added verbose output to check_pgsql (#2799281 - Jun Kuriyama)Matthias Eble1-1/+20
check_pgsql displayed the -v flag in help output, but didn't accept the verbosity argument. Added -v and basic verbose output.
2008-11-23Removing CVS/SVN tags and replacing with git-based versioningThomas Guyot-Sionnest1-6/+2
For contrib/, full tags have been imported from subversion git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2091 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-19Bulk EOL cleanupThomas Guyot-Sionnest1-3/+3
$ git diff --ignore-space-change|diffstat 0 files changed git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2087 f882894a-f735-0410-b71e-b25c423dba1c
2008-05-07Added support for --extra-opts in all C plugins (disabled by default, see ↵Thomas Guyot-Sionnest1-0/+10
configure --help) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1991 f882894a-f735-0410-b71e-b25c423dba1c
2008-04-27--help output cleanup (plus removal of spaces on blank lines)Thomas Guyot-Sionnest1-0/+2
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1984 f882894a-f735-0410-b71e-b25c423dba1c
2008-02-13check_pgsql now builds with postgres lib v8.3 (Jan Wagner #1878972)Matthias Eble1-0/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1934 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-31Bump plugin/ to GPLv3 (check_overcr to check_users)Thomas Guyot-Sionnest1-24/+21
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1917 f882894a-f735-0410-b71e-b25c423dba1c
2007-01-28Don't try to print `optarg' (which will be a NULL pointer) if an unknownHolger Weiss1-1/+1
command line option was used, as this leads to a segfault on some systems. The unknown option will be printed by getopt(3) anyway. So, simply call print_usage() and exit UNKNOWN via the new usage5() instead. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1590 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-19first pass at cleaning localization for new releaseBenoit Mortier1-14/+30
first pass at making all the headre be the same licence, plugin, etc... git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1499 f882894a-f735-0410-b71e-b25c423dba1c
2006-06-17cleaning up help and usageBenoit Mortier1-27/+27
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1433 f882894a-f735-0410-b71e-b25c423dba1c
2006-06-06modify the is_pg_dbname() function to allow databases with '-' in their name.M. Sean Finney1-2/+2
reference: sf tracker #1500752 git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1414 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-25various fixes for localizationBenoit Mortier1-4/+2
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1061 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-10Fixing broken compileMatthew Kent1-4/+4
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1021 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03reverting my changes from !=TRUE to == ERROR, that's not good ;-( sorryBenoit Mortier1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@998 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03print_help and print_usage() cleanupBenoit Mortier1-2/+2
other misc cleanups git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@996 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03remove UT_HLP_VRS from print_usageBenoit Mortier1-3/+1
this was not a good idea ;-) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@994 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03fixes for internationalizationBenoit Mortier1-8/+5
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@990 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03Localization fixesBenoit Mortier1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@988 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03correcting copyright and remaning int result = STATE_UNKNOWN;Benoit Mortier1-1/+2
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@987 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03bump copyright yearBenoit Mortier1-9/+12
initialize result to STATE_UNKNOW in place of STATE_OK git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@982 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-02More internationalization workBenoit Mortier1-3/+2
new usage4 function to permit localisation of think like check_ssh: xxxxx git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@979 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-02return of process_arguments() is TRUE not OK !Benoit Mortier1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@978 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-02changed Error: by CRITICAL -Benoit Mortier1-1/+1
more localization fixes git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@971 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-01standardize localization stringBenoit Mortier1-19/+21
standardize unknow arguments git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@969 f882894a-f735-0410-b71e-b25c423dba1c
2004-11-24Making messages more consistentTon Voon1-2/+2
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@930 f882894a-f735-0410-b71e-b25c423dba1c
2004-03-14use fperfdataKarl DeBisschop1-8/+8
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@849 f882894a-f735-0410-b71e-b25c423dba1c
2003-11-17add perfdataKarl DeBisschop1-13/+12
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@769 f882894a-f735-0410-b71e-b25c423dba1c
2003-08-22- bindtextdomain for gettext, a few other smale cleanups here and thereKarl DeBisschop1-0/+4
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@690 f882894a-f735-0410-b71e-b25c423dba1c
2003-08-10the last round of pedantic compiler warningsKarl DeBisschop1-101/+110
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@676 f882894a-f735-0410-b71e-b25c423dba1c