(No output!) problem
Youngblood, Gregory (SAIC)
gyoungblood at saicmail.jsc.nasa.gov
Mon Aug 9 18:24:18 CEST 2004
My nagios was compiled with perl embedded. I have a new installation, with
over 20 hosts and almost 100 services tested. I'm also a new user of Nagios
and writing custom checks. I've written a few custom checks that execute on
the same machine as nagios. Now I'm working on one that is similar in
functionality to "check_by_ssh", but just a little different to deal with my
needs.
I also have a check written in perl that calls an ssh program that runs a
command on a remote machine using the backtick notation ($text =
`some_command`;).
It seems as though the perl program is not completing. Running from the
command line, the program always returns the correct results. Running from a
forced reschedule of all tests on the host, anywhere from 3 to 9 (out of 19)
tests has been returning (No output) messages, with an OK status. I've
confirmed that tests that fail immediately and are retested are the ones
that have no output listed as the response. I've changed the random sleep
time to less than 2 seconds, and now things are running better. Then again,
last week with the original code (3 to 8 seconds) it wasn't having this
problem at all.
In my situation, I'm running a test, and if I don't get a valid result, I
immediately retest in the program. I was also using "sleep" to delay the
immediate retest. The longest execution time, including the maximum sleep
possible, is less than 10 seconds.
Are there problems with nagios embedded perl and using sleep or backtick
command execution? Are there any gotchas that should be avoided? I've read
the plugin development guide, and I am already following the instructions in
the very lean perl section. Is there a more complete guide for perl plugins?
Any advice on this is appreciated.
Thanks,
Greg
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
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