<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
matthias eble wrote:
<blockquote cite="mid:1224594623.6739.24.camel@de101315" type="cite">
  <pre wrap="">On Tue, 2008-10-21 at 09:22 +0200, Tarjei Huse wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Ingo Lantschner wrote: 
    </pre>
    <blockquote type="cite">
      <pre wrap="">Am 20.10.2008 um 16:32 schrieb Tarjei Huse:

  
      </pre>
      <blockquote type="cite">
        <pre wrap="">My problem is that when I use this plugin from nagios it ends up  
saying
that the reported output was "(null)". Now, I've tested the plugin on
the commandline, as a nagios user without problems.
    
        </pre>
      </blockquote>
      <pre wrap="">Are you using NRPE or Nagios directly?
  
      </pre>
    </blockquote>
    <pre wrap="">It uses Nagios directly.
    </pre>
    <blockquote type="cite">
      <pre wrap="">Does your plugin write to stdout?
  
      </pre>
    </blockquote>
    <pre wrap="">Yes
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Stack traces are written to stderdd so I'd suppose
you run in an uncaught exception.

you can add 
2>&1 | cat  
  </pre>
</blockquote>
That solved it! This one should be in the manual under debugging :)<br>
<br>
It ended up being a problem with the python egg cache. I ended up
adding:<br>
if 'root' in cache:<br>
    
os.environ['PYTHON_EGG_CACHE']=os.path.expanduser("~nagios")+"/.python-eggs"<br>
     pkg_resources.cleanup_resources()<br>
     pkg_resources.set_extraction_path(os.environ['PYTHON_EGG_CACHE'])<br>
     pkg_resources.cleanup_resources()<br>
<br>
This solved the problem.<br>
<br>
Thanks for helping me solve this one. I've been scratching my head for
quite some time.<br>
<br>
regards,<br>
Tarjei<br>
<br>
<blockquote cite="mid:1224594623.6739.24.camel@de101315" type="cite">
  <pre wrap="">to your check command. Tracebacks are printed in the UI then.
However your exit code won't be appropriate. Maybe someone has a smarter
solution to get stderr also printed in nagios.

HTH
Matthias





-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
<a class="moz-txt-link-freetext" href="http://moblin-contest.org/redirect.php?banner_id=100&url=/">http://moblin-contest.org/redirect.php?banner_id=100&url=/</a>
_______________________________________________________
Nagios Plugin Development Mailing List <a class="moz-txt-link-abbreviated" href="mailto:Nagiosplug-devel@lists.sourceforge.net">Nagiosplug-devel@lists.sourceforge.net</a>
Unsubscribe at <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel">https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel</a>
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null
  </pre>
</blockquote>
<br>
</body>
</html>