Hi,<br><br>How long is the execution time of the following command?<br><br>[libexec]# ./check_log -F /tmp/testlog.log -O /tmp/testlog.log-tmp -q<br><br>If it is longer than 10s, then you don't have to search further. You can then add a "-t 30" after the nrpe command to increase the timeout.<br>
<br>What you also have to check is if your permissions are correct. Maybe the user "nobody", which you are using with nrpe, doesn't have sufficient rights to read the destination logfile which could cause in a simple no-output and hence a timeout in nrpe.<br>
You can check that by launching the same command as above (./check_log....) as nobody or sudo it as with nobody.<br><br><div class="gmail_quote">On Fri, Mar 2, 2012 at 1:52 AM, Almus <span dir="ltr"><<a href="mailto:almus@thealmus.com">almus@thealmus.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm having trouble with nrpe and the check_log plugin<br>
nrpe is working, as is the check_log plugin, however when I try to run<br>
check_log via nrpe I get a socket timeout.<br>
<br>
here is my nrpe.cfg:<br>
# cat nrpe.cfg<br>
log_facility=daemon<br>
pid_file=/var/run/nrpe.pid<br>
server_port=5666<br>
nrpe_user=nobody<br>
nrpe_group=nobody<br>
allowed_hosts=127.0.0.1,10.96.12.31<br>
dont_blame_nrpe=0<br>
debug=0<br>
command_timeout=60<br>
connection_timeout=300<br>
command[check_users]=/opt/nagios/libexec/check_users -w 8 -c 12<br>
command[check_load]=/opt/nagios/libexec/check_load -w 16,12,8 -c 24,16,12<br>
command[check_disk_home]=/opt/nagios/libexec/check_disk -w 12% -c 8% -M /home<br>
command[check_disk_opt]=/opt/nagios/libexec/check_disk -w 12% -c 8% -M /opt<br>
command[check_disk_root]=/opt/nagios/libexec/check_disk -w 12% -c 8% -M /<br>
command[check_disk_usr]=/opt/nagios/libexec/check_disk -w 12% -c 8% -M /usr<br>
command[check_disk_var]=/opt/nagios/libexec/check_disk -w 12% -c 8% -M /var<br>
command[check_zombie_procs]=/opt/nagios/libexec/check_procs -w 4 -c 8 -s Z<br>
command[check_total_procs]=/opt/nagios/libexec/check_procs -w 256 -c 320<br>
command[check_mstg_mem]=/opt/nagios/libexec/check_log -F<br>
/tmp/testlog.log -O /tmp/testlog.log-tmp -q "Not enough memory"<br>
<br>
Here are the commands I am trying (all from the local machine, but I<br>
will be running the nrpe from the nagios server once I get it<br>
working):<br>
<br>
[libexec]# ./check_nrpe -H localhost<br>
NRPE v2.12<br>
<br>
[libexec]# ./check_procs -w 256 -c 320<br>
PROCS OK: 133 processes<br>
<br>
[libexec]# ./check_nrpe -H localhost -c check_total_procs<br>
PROCS OK: 136 processes<br>
<br>
[libexec]# ./check_log -F /tmp/testlog.log -O /tmp/testlog.log-tmp -q<br>
"Not enough memory"<br>
Log check ok - 0 pattern matches found<br>
<br>
[libexec]# ./check_nrpe -H localhost -c check_mstg_mem<br>
CHECK_NRPE: Socket timeout after 10 seconds.<br>
<br>
<br>
seems very strange to me that I can run check_log directly, but I cant<br>
run it via nrpe..<br>
<br>
------------------------------------------------------------------------------<br>
Virtualization & Cloud Management Using Capacity Planning<br>
Cloud computing makes use of virtualization - but cloud computing<br>
also focuses on allowing computing to be delivered as a service.<br>
<a href="http://www.accelacomm.com/jaw/sfnl/114/51521223/" target="_blank">http://www.accelacomm.com/jaw/sfnl/114/51521223/</a><br>
_______________________________________________<br>
Nagiosplug-help mailing list<br>
<a href="mailto:Nagiosplug-help@lists.sourceforge.net">Nagiosplug-help@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagiosplug-help" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagiosplug-help</a><br>
::: Please include plugins version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br>
</blockquote></div><br>