Hi everybody,<br><br><div class="gmail_quote">On Thu, Nov 25, 2010 at 12:04 AM, Stuart Browne <span dir="ltr"><<a href="mailto:stuart.browne@ausregistry.com.au">stuart.browne@ausregistry.com.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">> -----Original Message-----<br>
> From: Alexander Haas [mailto:<a href="mailto:alex@geloet.de">alex@geloet.de</a>]<br>
> Subject: [Nagios-users] No output returned from plugin<br>
><br>
> Hi list,<br>
><br>
> it's me again :)<br>
><br>
> I wrote a plug-in which does work great. It works from the shell as<br>
> root, from the shell as nagios and from nagios executed as plug-in.<br>
><br>
> The only problem is when there is an error returned. It does not work<br>
> when i execute it from nagios as a plug-in and there is an error (=><br>
> return code != 0). Every time my plug-in returns anything but zero,<br>
> Nagios tells me that there is "No output returned from plugin". It does<br>
> not matter if my script does output its error message on STDOUT or<br>
> STDERR. Of cause there is an error message visible when I execute my<br>
> plug-in from a shell.<br>
<br>
</div>Nagios doesn't capture anything sent to STDERR, so make sure it is sending its output to STDOUT.  Also make sure that the first line returned when an error occurs is not an empty line; an empty line is considered "No output".<br>

<br>
Perhaps you'd like to run the plugin (as nagios) when it is erroring and show us the output?<br>
<div class="im"><br>
<br></div></blockquote></div>I was just about to ask the same question, when this thread appeared. I have exactly the same problem. In my case it is a Python script. The output is fine for the OK state, but missing for other states. I have confirmed:<br>
1) It writes to STDOUT<br>2) There is no space or black line in the output<br>3) It works when run from the command line as nagios in the error state<br><br>Any suggestions?<br><br>Regards<br>Marius<br>