postgres check: works from cmd line but not from nagios
Fred Blaise
fred.blaise at excilan.com
Mon Jan 3 18:18:32 CET 2005
Hello
I am trying to make this postgres check to work.. it works from command
line, bit not via the nagios check. Please see below the results and
config info. Your help is greatly appreciated :)
server: Nagios 1.3 Debian testing.
services.cfg snip:
-----
define service{
use generic-service ; Name
of service template to use
host_name hhhh
service_description Postgres DB
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups global-admins
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command check_pgsql!dddd!uuuu
}
-----
pgsql.conf (I added the ARG1 and ARG2, to pass the db name and username.
Can i do that?)
------
define command{
command_name check_pgsql
command_line /usr/lib/nagios/plugins/check_pgsql -H
$HOSTADDRESS$ -d $ARG1$ -l $ARG2$
}
------
result via nagios:
PGSQL: CRITICAL - no connection to 'template1' (FATAL: no pg_hba.conf
entry for host "81.201.101.5", user "nagios", database "template1", SSL
off
Via commandline:
-----
host:/etc/nagios-plugins/config# /usr/lib/nagios/plugins/check_pgsql -H
<serverip> -d dddd -l uuuu
PGSQL: ok - database excilan (0 sec.)
-----
Can anyone explain to me why that is? Let me know if you need additional
info.
Thanks a lot
Fred
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050103/7b3c0f11/attachment.sig>
More information about the Users
mailing list