[Nagiosplug-devel] [PATCH/PULL] Various improvements and fixes for check_pgsql
Sebastian Harl
sh at teamix.net
Thu Jul 5 11:53:55 CEST 2012
Hi,
while going through my nagios-plugins repo, I noticed the following
branch still sitting there ;-)
While the query support is a bit redundant with the check_dbi plugin by
now, I still think that could also be included in check_pgsql (after all
the code is already there, it's not that complex/much and I'm willing to
support it ;-)). Comments, flames, whatever about that would be much
appreciated, though. If people disagree, I'll extract the other patches.
The branch is now available at
<https://github.com/tokkee/nagios-plugins/tree/sh/check_pgsql>.
Any comments, feedback?
Cheers,
Sebastian
On Fri, Apr 08, 2011 at 11:31:32AM +0200, Sebastian Harl wrote:
> I'm not sure about the preferred way to submit patches, so I'll just go
> for a "pull request" for now. Please feel free to beat me to whatever
> you prefer most ;-)
>
> Anyway … I've got a few changes to the check_pgsql plugin sitting in the
> sh/check_pgsql branch at git://oss.teamix.org/nagiosplug.git:
>
> check_pgsql: Added support for executing queries.
> check_pgsql: Fixed query perfdata output for empty warn/crit ranges.
> check_pgsql: Use PQconnectdb() rather than PQsetdbLogin().
> check_pgsql: Allow UNIX socket directories as hostname as well.
> check_pgsql: Removed -4/-6 flags from help output.
> check_pgsql: Added support for the -o command line option.
> check_pgsql: Updated copyright.
> check_pgsql: Leave 'min' value in query perfdata empty.
> check_pgsql: Determine connection time in µs-resolution.
>
> The most important changes are the following:
>
> check_pgsql: Added support for executing queries.
>
> 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.
>
> (diff: <http://oss.teamix.org/projects/nagiosplug/repository/diff?rev=8a55b5215a1194335455594e39ac2004e4eea754&rev_to=1bc7a4a198aefde2389c9c1685baed0da7856bf5>)
>
> check_pgsql: Added support for the -o command line option.
>
> 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.
>
> (diff: <http://oss.teamix.org/projects/nagiosplug/repository/diff?rev=a02b463ff6c923d2432fe8ab6536262a250b330d&rev_to=5d7f78dd28b747a9117853a1465aebd767396329>)
>
> I'd be happy for any feedback and comments.
>
> Cheers,
> Sebastian
>
--
Sebastian Harl
Consultant, Trainer
teamix GmbH
Südwestpark 35
90449 Nürnberg
fon: +49 911 30999-0
fax: +49 911 30999-99
mail: sh at teamix.de
web: http://www.teamix.de
Amtsgericht Nürnberg, HRB 18320
Geschäftsführer: Oliver Kügow, Richard Müller
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://nagios-plugins.org/archive/devel/attachments/20120705/e70166bd/attachment.sig>
More information about the Devel
mailing list