[check_postgres] Existing active checks, upgrading version, PGSQL9+ compat

Obringer, Adam Adam.Obringer at intermedix.com
Thu Dec 27 15:42:00 UTC 2012


Hi there,

We've been utilizing your check_postgres.pl script for quite a while, primarily for 8.x databases, and have enjoyed the thorough results within our distributed Nagios presence. We've recently started testing the most recent version of your script (2.19.0) assessing forward compatibility with the current version we are using, since we will have some Postgres 9.2 databases within our newly-built environments. A few things in particular are failing, and it seems due directly to things that have changed within the newer versions of the database. For reference, our older version we use production-wise is version 2.12.

Example:

A 'query length' check that we do, like this:

# Check PostgreSQL query runtime
#   $ARG1$ = Warning threshold in minutes
#   $ARG2$ = Critical threshold in minutes

define command {
        command_name    check_postgresql_querytime
        command_line    $USER2$/check_postgres.pl -H $HOSTADDRESS$ -u nagios -db nagios --action query_time -w "$ARG1$ minutes" -crit "$ARG2$ minutes"
}

Outputs this:

POSTGRES_QUERY_TIME UNKNOWN: (host:test1.domain.com) ERROR: column "current_query" does not exist


We know that 'current_query' has been since replaced by 'query', and I've gone as far as a mass find/replace within the perl script, but that hasn't covered it. It seems that this is either not a capability with the newer version of PG, or I'm completely missing something within the script that I can change within our Nagios service commands.


Additionally, we check PG bloat in this fashion:

# Check PostgreSQL bloat
#  NOTE: This check needs a comma separated list of dbs to check
#   $ARG1$ = Warning threshold
#   $ARG2$ = Critical threshold
#   $ARG3$ = Comma separated list of databases to check

define command {
        command_name    check_postgresql_bloat
        command_line    $USER2$/check_postgres.pl -H $HOSTADDRESS$ -u nagios -db $ARG3$ --action bloat -w $ARG1$ -crit $ARG2$
}

Which returns these results:

ERROR: ERROR: function pg_size_pretty(integer) is not unique


Any suggestions for what we can do with newer DB's where these are issues would be amazing. I can provide any level of testing required to assist as well.

Thanks!

--
Adam Obringer, Sr. Systems Engineer
Intermedix
T: 412-422-3463 x4020
M: 724-701-0011
adam.obringer at intermedix.com
www.intermedix.com

The information contained in this message is confidential and may be privileged and/or protected under law. If you received this message in error, please notify us immediately by forwarding a copy to compliance at intermedix.com and then deleting the original message and any attachments.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/check_postgres/attachments/20121227/9de3032e/attachment.html>


More information about the Check_postgres mailing list