[Nagiosplug-help] check_log via nrpe problem

Claudio Kuenzler ck at claudiokuenzler.com
Fri Mar 2 08:29:45 CET 2012


Hi,

How long is the execution time of the following command?

[libexec]# ./check_log -F /tmp/testlog.log -O /tmp/testlog.log-tmp -q

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.

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.
You can check that by launching the same command as above (./check_log....)
as nobody or sudo it as with nobody.

On Fri, Mar 2, 2012 at 1:52 AM, Almus <almus at thealmus.com> wrote:

> I'm having trouble with nrpe and the check_log plugin
> nrpe is working, as is the check_log plugin, however when I try to run
> check_log via nrpe I get a socket timeout.
>
> here is my nrpe.cfg:
> # cat nrpe.cfg
> log_facility=daemon
> pid_file=/var/run/nrpe.pid
> server_port=5666
> nrpe_user=nobody
> nrpe_group=nobody
> allowed_hosts=127.0.0.1,10.96.12.31
> dont_blame_nrpe=0
> debug=0
> command_timeout=60
> connection_timeout=300
> command[check_users]=/opt/nagios/libexec/check_users -w 8 -c 12
> command[check_load]=/opt/nagios/libexec/check_load -w 16,12,8 -c 24,16,12
> command[check_disk_home]=/opt/nagios/libexec/check_disk -w 12% -c 8% -M
> /home
> command[check_disk_opt]=/opt/nagios/libexec/check_disk -w 12% -c 8% -M /opt
> command[check_disk_root]=/opt/nagios/libexec/check_disk -w 12% -c 8% -M /
> command[check_disk_usr]=/opt/nagios/libexec/check_disk -w 12% -c 8% -M /usr
> command[check_disk_var]=/opt/nagios/libexec/check_disk -w 12% -c 8% -M /var
> command[check_zombie_procs]=/opt/nagios/libexec/check_procs -w 4 -c 8 -s Z
> command[check_total_procs]=/opt/nagios/libexec/check_procs -w 256 -c 320
> command[check_mstg_mem]=/opt/nagios/libexec/check_log -F
> /tmp/testlog.log -O /tmp/testlog.log-tmp -q "Not enough memory"
>
> Here are the commands I am trying (all from the local machine, but I
> will be running the nrpe from the nagios server once I get it
> working):
>
> [libexec]# ./check_nrpe -H localhost
> NRPE v2.12
>
> [libexec]# ./check_procs -w 256 -c 320
> PROCS OK: 133 processes
>
> [libexec]# ./check_nrpe -H localhost -c check_total_procs
> PROCS OK: 136 processes
>
> [libexec]# ./check_log -F /tmp/testlog.log -O /tmp/testlog.log-tmp -q
> "Not enough memory"
> Log check ok - 0 pattern matches found
>
> [libexec]# ./check_nrpe -H localhost -c check_mstg_mem
> CHECK_NRPE: Socket timeout after 10 seconds.
>
>
> seems very strange to me that I can run check_log directly, but I cant
> run it via nrpe..
>
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20120302/9bc78bf2/attachment.html>


More information about the Help mailing list