[check_postgres] Question

Greg Sabino Mullane greg at endpoint.com
Wed May 26 21:37:25 UTC 2010


On Wed, May 26, 2010 at 09:03:05PM +0000, Robert Breault wrote:
>    I am looking at your example for Nagios and just want to make sure I am
>    correctly setting up what the script would look like.
> 
>  define command {
>      command_name    check_postgres_size
>      command_line    postgres/check_postgres.pl -H 127.0.0.1 -u pgsql -db postg
> res --action database_size -w='1 TB'  -c= '1.5 TB'
>  }

The command_line is usually setup a little more generically, to allow the same 
command to be run on multiple hosts, and to allow the ranges to be easily changed.
An example from the docs:

define command {
  command_name    check_postgres_size
  command_line    $USER2$/check_postgres.pl -H $HOSTADDRESS$ -u pgsql -db postgres --action database_size -w $ARG1$ -c $ARG2$
 }

define service {
  service_description    Postgres database size
  check_command          check_postgres_size!1TB!1.5TB
}


-- 
Greg Sabino Mullane greg at endpoint.com
End Point Corporation
PGP Key: 0x14964AC8
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
Url : https://mail.endcrypt.com/pipermail/check_postgres/attachments/20100526/90525a29/attachment.bin 


More information about the Check_postgres mailing list