check_logfiles HPUX
check_logfiles HPUX
Hello,
I have to monitoring a log in a machine HPUX B.11.00. I defined config file:
$seekfilesdir = '/opt/tools/capmau/log';
@logs = (
{
tag => 'sybase',
logfile => '/opt/sybase/ASE-12_0/install/errorlog',
criticalpatterns =>[
'.*Severity: 21.*',
],
},
);
and defined in nrpe.cfg:
command[check_logfiles]=/opt/tools/capmau/libexec/check_logfiles -f /opt/tools/capmau/check_logfile.cfg
but not find perl:
interpreter "/opt/nagios/bin/perl" not found
ksh: /opt/tools/capmau/libexec/check_logfiles: not found
Any idea? I have monitoring machines Linux, are monitoring correctly.
I have to monitoring a log in a machine HPUX B.11.00. I defined config file:
$seekfilesdir = '/opt/tools/capmau/log';
@logs = (
{
tag => 'sybase',
logfile => '/opt/sybase/ASE-12_0/install/errorlog',
criticalpatterns =>[
'.*Severity: 21.*',
],
},
);
and defined in nrpe.cfg:
command[check_logfiles]=/opt/tools/capmau/libexec/check_logfiles -f /opt/tools/capmau/check_logfile.cfg
but not find perl:
interpreter "/opt/nagios/bin/perl" not found
ksh: /opt/tools/capmau/libexec/check_logfiles: not found
Any idea? I have monitoring machines Linux, are monitoring correctly.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_logfiles HPUX
Do you have perl installed on the HPUX machine?msanbrug wrote:interpreter "/opt/nagios/bin/perl" not found
Code: Select all
which perlThe next error,
makes it look like it cannot find the file /opt/tools/capmau/libexec/check_logfilemsanbrug wrote:ksh: /opt/tools/capmau/libexec/check_logfiles: not found
does it exist on this machine?
Re: check_logfiles HPUX
Hello,
Perl is installed in the machine
which perl
/usr/bin/perl
I don't know if nor find check_logfiles, because not find perl:
/opt/tools/capmau/libexec/check_logfiles
interpreter "/opt/nagios/bin/perl" not found
ksh: /opt/tools/capmau/libexec/check_logfiles: not found
check_logfiles exist in tha machine:
-rwxr-xr-x 1 capmau capmau 97254 Apr 22 2008 /opt/tools/capmau/libexec/check_logfiles
Regards.
Perl is installed in the machine
which perl
/usr/bin/perl
I don't know if nor find check_logfiles, because not find perl:
/opt/tools/capmau/libexec/check_logfiles
interpreter "/opt/nagios/bin/perl" not found
ksh: /opt/tools/capmau/libexec/check_logfiles: not found
check_logfiles exist in tha machine:
-rwxr-xr-x 1 capmau capmau 97254 Apr 22 2008 /opt/tools/capmau/libexec/check_logfiles
Regards.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_logfiles HPUX
O would open the file /opt/tools/capmau/libexec/check_logfiles in an editor and see what the top line looks like
You are going to need to make it look like
You are going to need to make it look like
Code: Select all
#!/usr/bin/perlRe: check_logfiles HPUX
In file check_logfiles appear, this: #! /usr/bin/perl -w
How I can modify this file?
Regards,
How I can modify this file?
Regards,
Re: check_logfiles HPUX
I edit the file and put: #!/usr/bin/perl -w.
If I execute command line in local machine:
/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
but in Nagios appear this:
Current Status: CRITICAL
Status Information: CHECK_NRPE: Socket timeout after 10 seconds.
nrpe is is working properly, as I have in the file nrpe.cfg, process definitions and filesystems, they are working properly.
In nrpe.cfg, timeout is: command_timeout=60
Regards.
If I execute command line in local machine:
/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
but in Nagios appear this:
Current Status: CRITICAL
Status Information: CHECK_NRPE: Socket timeout after 10 seconds.
nrpe is is working properly, as I have in the file nrpe.cfg, process definitions and filesystems, they are working properly.
In nrpe.cfg, timeout is: command_timeout=60
Regards.
Re: check_logfiles HPUX
After, modify that I explained in the previous post, I activated debug in nrpe.cfg, and I have seen in syslog, this:
Jan 27 14:41:26 maresme nrpe[16853]: Could not read request from client, bailing out...
Jan 27 14:42:03 maresme nrpe[17560]: Could not read request from client, bailing out...
Jan 27 14:44:26 maresme nrpe[21627]: Could not read request from client, bailing out...
Any idea?
Regards.
Jan 27 14:41:26 maresme nrpe[16853]: Could not read request from client, bailing out...
Jan 27 14:42:03 maresme nrpe[17560]: Could not read request from client, bailing out...
Jan 27 14:44:26 maresme nrpe[21627]: Could not read request from client, bailing out...
Any idea?
Regards.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_logfiles HPUX
From your Nagios server can you run the following
and post the output
and also
Code: Select all
cd /usr/local/nagios/libexec
./check_nrpe -H <IP_ADDRESS>
and also
Code: Select all
cd /usr/local/nagios/libexec
./check_nrpe -H <IP_ADDRESS> -c check_logfiles
Re: check_logfiles HPUX
This is the output:
[capmau@monitor01 libexec]$ ./check_nrpe -H 10.17.32.28 -c check_logfiles
CHECK_NRPE: Received 0 bytes. Are we allowed to connect to the host?
I checked other, tat is ok in Nagios
[capmau@monitor01 libexec]$ ./check_nrpe -H 10.17.32.47 -c check_logfiles
CHECK_NRPE: Error receiving data from host.
If it helps you, in my machine 10.17.32.2, only no working, monitoring log. I monitoring process and filesystems and it's ok:
command[check_procs_cron]=/opt/iexpress/nagios/libexec/check_procs -c 1: -a cron
command[check_procs_sendmail]=/opt/iexpress/nagios/libexec/check_procs -c 1: -a sendmail
command[check_disk_/]=/opt/iexpress/nagios/libexec/check_disk -w 10% -c 5% -p /
command[check_disk_/stand]=/opt/iexpress/nagios/libexec/check_disk -w 10% -c 5% -p /stand
Regards,
[capmau@monitor01 libexec]$ ./check_nrpe -H 10.17.32.28 -c check_logfiles
CHECK_NRPE: Received 0 bytes. Are we allowed to connect to the host?
I checked other, tat is ok in Nagios
[capmau@monitor01 libexec]$ ./check_nrpe -H 10.17.32.47 -c check_logfiles
CHECK_NRPE: Error receiving data from host.
If it helps you, in my machine 10.17.32.2, only no working, monitoring log. I monitoring process and filesystems and it's ok:
command[check_procs_cron]=/opt/iexpress/nagios/libexec/check_procs -c 1: -a cron
command[check_procs_sendmail]=/opt/iexpress/nagios/libexec/check_procs -c 1: -a sendmail
command[check_disk_/]=/opt/iexpress/nagios/libexec/check_disk -w 10% -c 5% -p /
command[check_disk_/stand]=/opt/iexpress/nagios/libexec/check_disk -w 10% -c 5% -p /stand
Regards,
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_logfiles HPUX
Do you have check_logfiles defined in each of the clients nrpe.cfg files?
Did you restart nrpe after adding it?
Did you add the server IP to the allowed list in each client?
Did you restart nrpe after adding it?
Did you restart nrpe after adding it?
Did you add the server IP to the allowed list in each client?
Did you restart nrpe after adding it?