Page 2 of 2

Re: check_logfiles HPUX

Posted: Tue Jan 31, 2012 4:18 am
by msanbrug
Hello,


Yes I defined in nrpe.cfg files in other linux machines, and in NSC.ini file in other Windows machines.

Yes, I restart nrpe, after adding check_logfile line in nrpe.cfg

Yes, I add IP machine and IP server:[/b]

server_address=<ip_maquina>
allowed_hosts=<ip_servidor_nagios>

Other lines in npre.cfg:

server_port=5666
nrpe_user=capmau
nrpe_group=capmau
allowed_hosts=10.17.32.61
dont_blame_nrpe=0
debug=1
command_timeout=60
connection_timeout=300

I restarted again agent:

maresme@capmau$ ps -ef|grep nrpe
maresme@capmau$ ps -ef|grep nrpe
capmau 12126 1 24 10:15:08 ? 0:00 /opt/tools/capmau/etc/nrpe -c /opt/tools/capmau/etc/nrpe.cfg
capmau 12679 26942 1 10:15:16 pts/1 0:00 grep nrpe


but, the output is the same:

CHECK_NRPE: Socket timeout after 90 seconds

and in /var/adm/syslog/syslog.log:

Jan 31 10:17:20 maresme nrpe[15259]: Could not read request from client, bailing out...
Jan 31 10:17:32 maresme nrpe[16220]: Could not read request from client, bailing out...


Regards,

Re: check_logfiles HPUX

Posted: Wed Feb 01, 2012 3:51 pm
by scottwilkerson
What are the file permissions for the file /opt/tools/capmau/libexec/check_logfiles ?
Is the nagios user allowed to execute this?

Re: check_logfiles HPUX

Posted: Thu Feb 02, 2012 2:52 am
by msanbrug
This is the permissions:

maresme@capmau$ ls -ltr /opt/tools/capmau/libexec/check_logfiles
-rwxr-xr-x 1 capmau capmau 97247 Jan 27 08:25 /opt/tools/capmau/libexec/check_logfiles
maresme@capmau$ id
uid=1663(capmau) gid=1663(capmau)

When I executed, logfiles in machine local it's ok:

maresme@capmau$ /opt/tools/capmau/libexec/check_logfiles -f /opt/tools/capmau/check_logfile.cfg
OK - no errors or warnings|sybase_lines=0 sybase_warnings=0 sybase_criticals=0 sybase_unknowns=0

Regards,

Re: check_logfiles HPUX

Posted: Thu Feb 02, 2012 11:14 am
by scottwilkerson
what are the permissions on the file you are trying to read (/opt/sybase/ASE-12_0/install/errorlog)?
Does the capmau user have permissions on this file? How about the config file (/opt/tools/capmau/check_logfile.cfg)

Can you run?

Code: Select all

su capmau -c '/opt/tools/capmau/libexec/check_logfiles -f /opt/tools/capmau/check_logfile.cfg'

Re: check_logfiles HPUX

Posted: Fri Feb 03, 2012 2:25 am
by msanbrug
Hello,

I have this permissions:

$ ls -ltr /opt/sybase/ASE-12_0/install/errorlog
-rw-r--r-- 1 sybase sybase 593198 Dec 19 17:11 /opt/sybase/ASE-12_0/install/errorlog

$ ls -ltr /opt/tools/capmau/check_logfile.cfg
-rw-r--r-- 1 capmau capmau 217 Jan 26 18:37 /opt/tools/capmau/check_logfile.cfg

Output command:

$ su capmau -c '/opt/tools/capmau/libexec/check_logfiles -f /opt/tools/capmau/check_logfile.cfg'
Password:
OK - no errors or warnings|sybase_lines=0 sybase_warnings=0 sybase_criticals=0 sybase_unknowns=0

and check_logfile.cfg information:


$seekfilesdir = '/opt/tools/capmau/log';
@logs = (
{
tag => 'sybase',
logfile => '/opt/sybase/ASE-12_0/install/errorlog',
criticalpatterns =>[
'.*Severity: 21.*',
],
},
);

Permissions log directory:

drwxr-xr-x 2 capmau capmau 96 Jan 26 17:14 log

Regards.

Re: check_logfiles HPUX

Posted: Fri Feb 03, 2012 6:52 am
by msanbrug
I probed to executed:


# Service definition MARESME
define service{
use Servicios-BBDD
host_name MARESME
service_description ALPI_MEDIACIO_BBDD_LOGFILE
check_command check_nrpe_nossl!check_logfiles
retry_check_interval 30
}


and now is running ok.


Command check_nrpe_nossl, is:

$USER1$/check_nrpe_2.7 -n -H $HOSTADDRESS$ -p 5666 -c $ARG1$

Thank you very much for your help and your time.

Re: check_logfiles HPUX

Posted: Fri Feb 03, 2012 8:40 am
by scottwilkerson
Glad we could get one of these Unix items working..