forums.meulie.net

NRPE: unable to read output ?!?!?!?!

i wrote a plugin for nagios in c-shell (csh). it works fine. but when i execute it from the nagiosserver i get the message NRPE: unable to read output

what is wrong??

here is my code:

if ( ($ERR_LOG_FLAG == 1) && ($ERR_JB_FLAG == 1) ) then set exitstatus = $STATE_CRITICAL echo "error in LOG and in hugo" exit $exitstatus else if ( $ERR_LOG_FLAG == 1) then set exitstatus = $STATE_WARNING echo "error in LOG" exit $exitstatus else if ( $ERR_JB_FLAG == 1 ) then set exitstatus = $STATE_WARNING echo "error in hugo" exit $exitstatus else set exitstatus = $STATE_OK echo "OK" exit $exitstatus endif

is it posible to program plugins fof nagios in c-shell???

Ok, I had the same problem under Windows (script bat). I don’t know if it will help you :

@echo off
echo "Hello"
exit 0

NO OUPUT

but with:

@echo off
echo “Hello” from cmd
exit 0

it worked.

Good luck

There are many of the plugins written as shell scripts. Just look at the source code of them, and you might find where you are going wrong.

Hi jakkedup,

can you post me a link to an example or poste a plugin. I can’t find them …

thx
Navigato

huh? When you downloaded the nagios plugins, they are all in source code. You could look at most any one of them, and it will be a shell script. Some are perl, but surely you know where to download nagios plugins.