CHECK_NRPE failing to finish running event handler.

Nathan Oyler noyler at khimetrics.com
Thu Jan 6 19:47:19 CET 2005


This is a continuation to the previous problems I've been having. 

I have created an event handler to restart a service on a remote
machine. I am calling the execution of the event handler through
check_nrpe using the -c flag.

The script runs fine on the server when run from the nagios user. The
script starts fine if run through check_nrpe but dies half way through
execution.

I have the timeout set high, and it is not timing out. An strace of the
command being run through check_nrpe shows a broken pipe halfway through
execution.

The script runs small things fine. Here I'm using sleep commands, and it
takes a while for the whole thing to go, and again I'm getting a broken
pipe.

First, Is check_nrpe intended to run event handlers in this manner.

Second, Would there be anything in the code of check_nrpe to fail if a
given time frame was too long?

I get the same error on 2 different check_nrpe plugins. I'm calling it
explicitly with arguments, so the Nagios server is irrelevant.

I can send the whole strace if you'd like, but it's incredibly large.
Anything you could do to assist would be greatly appreciated.

My intention is if I cannot get this working, I'll probably move to
calling the script via an event handler on the Nagios server through ssh
commands with keys. I'd rather not do this, as this is my understanding
to how event handlers should be called.

I do not have a very good understanding of strace output, and had
someone else do the digging through it, but here's the part that he
pointed to.

[ --- STRACE OUTPUT ON SCRIPT RAN THROUGH CHECK_NRPE, SNIPPIT --- ]

21633 write(1, "Using CATALINA_BASE:   /opt/tomc"..., 41) = -1 EPIPE
(Broken pip
e)
21633 --- SIGPIPE (Broken pipe) ---
21630 <... wait4 resumed> [WIFSIGNALED(s) && WTERMSIG(s) == SIGPIPE], 0,
NULL) =
 21633
21630 open("/usr/share/locale/locale.alias", O_RDONLY) = 3
21630 fstat64(3, {st_mode=S_IFREG|0644, st_size=2601, ...}) = 0
21630 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0)

[ --- END STRACE --- ]


Nathan Oyler
Information Technology
480-308-2342 Office
 
Khimetrics Inc.
Maximizing Sales & Profit
Revenue Management from Khimetrics




-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list