Perl plugins: No output from plugin

Dennis Hopp dhopp at GOCSC.com
Tue Aug 23 17:04:14 CEST 2005


I got the plugins from:

http://www.manubulon.com/nagios

The first line in the is:

#!/usr/bin/perl -w

So yes, the explicit path.

I did a strace on nagios and I can see where it calls the perl interpreter (at /usr/bin/perl) and I can see the plugin being opened and communicating with the other machine.  After a lot of strace output I see the "No output from plugin" being written by nagios.

--Dennis

> -----Original Message-----
> From: Subhendu Ghosh [mailto:sghosh at sghosh.org]
> Sent: Tuesday, August 23, 2005 9:59 AM
> To: Dennis Hopp
> Cc: nagios-users at lists.sourceforge.net
> Subject: RE: [Nagios-users] Perl plugins: No output from plugin
> 
> 
> How do you start the plugins - explicit path to perl ?
> 
> 
> On Tue, 23 Aug 2005, Dennis Hopp wrote:
> 
> > Here's some more information....
> >
> > If I change the check command to:
> >
> > command_line    echo $USER1$/check_snmp_load.pl -h
> >
> > I get the last two lines of the help output as my Status Information and
> Performance Data respectively.
> >
> > --Dennis
> >
> >> -----Original Message-----
> >> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> >> admin at lists.sourceforge.net] On Behalf Of Dennis Hopp
> >> Sent: Tuesday, August 23, 2005 8:39 AM
> >> To: Lori Adams; nagios-users at lists.sourceforge.net
> >> Subject: RE: [Nagios-users] Perl plugins: No output from plugin
> >>
> >> I changed the check command to echo the output.  In the UI I get this:
> >>
> >> /opt/nagios/plugins/check_snmp_load.pl -H 10.12.10.29 -C public -w
> 2,2,3 -
> >> c 3,3,4 -L
> >>
> >> So then as the nagios user I copied and pasted that....
> >>
> >> -sh-3.00$ /opt/nagios/plugins/check_snmp_load.pl -H 10.12.10.29 -C
> public
> >> -w 2,2,3 -c 3,3,4 -L
> >> Load : 0.00 0.01 0.00 : OK
> >> -sh-3.00$
> >>
> >> As you can see there is output...but for some reason nagios is saying
> >> there isn't when it fires it off on it's own.
> >>
> >> --Dennis
> >>
> >> -----Original Message-----
> >> From: Lori Adams [mailto:ladams at cloudmark.com]
> >> Sent: Monday, August 22, 2005 7:44 PM
> >> To: Dennis Hopp; nagios-users at lists.sourceforge.net
> >> Subject: RE: [Nagios-users] Perl plugins: No output from plugin
> >>
> >> When you ran it by hand as nagios user, did you include all relevant
> >> arguments?
> >> /opt/nagios/plugins/check_snmp_load.pl -H x.x.x.x -C public -w 2,2,3 -c
> >> 3,3,4 -L
> >>
> >> Another trick to verify that you're running it by hand correctly is to
> do
> >> define command{
> >>        command_name    check_linux_load
> >>        command_line    echo $USER1$/check_snmp_load.pl -H $HOSTADDRESS$
> -C
> >> public -w $ARG1$ -c $ARG2$ -L
> >> }
> >> The command will appear in the UI, and then you can run what is shown.
> >>
> >> "No output from plugin" means just that.  Nagios is expecting some kind
> of
> >> statement about the check.  Your check is not outputting anything.
> >>   You're getting a difference between running by hand and running
> >> automatically.  Get those to be the same, it'll be easier to track
> down.
> >>
> >> -Lori
> >>
> >>
> >> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> >> admin at lists.sourceforge.net] On Behalf Of Dennis Hopp
> >> Sent: Monday, August 22, 2005 3:54 PM
> >> To: nagios-users at lists.sourceforge.net
> >> Subject: [Nagios-users] Perl plugins: No output from plugin
> >>
> >> I'm trying to use the check_snmp_load.pl and check_snmp_storage.pl
> >>
> >> I can run the plugin from the command line (as both root and nagios
> user)
> >> and get the right results but when it's fired off automatically I keep
> >> getting "No output from plugin".
> >>
> >> Here are the relevant config:
> >>
> >> define  service{
> >>         use                             generic-service
> >>         hostgroup_name                  LinuxServers
> >>         service_description             LOAD
> >>         is_volatile                     0
> >>         check_period                    24x7
> >>         max_check_attempts              3
> >>         normal_check_interval           5
> >>         retry_check_interval            1
> >>         contact_groups                  domain-admins
> >>         check_command                   check_linux_load!2,2,3!3,3,4
> >> }
> >>
> >>
> >> define command{
> >>         command_name    check_linux_load
> >>         command_line    $USER1$/check_snmp_load.pl -H $HOSTADDRESS$ -C
> >> public -w $ARG1$ -c $ARG2$ -L
> >> }
> >>
> >>
> >> $USER1$=/opt/nagios/plugins
> >>
> >> [root at cartier plugins]# ls -l /opt/nagios/plugins/check_snmp_load.pl
> >> -rwxr-xr-x  1 root root 14168 Aug 22 12:42
> >> /opt/nagios/plugins/check_snmp_load.pl
> >>
> >> Thanks,
> >>
> >> --Dennis
> >> * "Privileged/Confidential Information of Communications Supply Corp.
> may
> >> be contained in this message.  If you are not the addressee of this
> >> message, you may not copy, use or deliver this message to anyone.  In
> such
> >> event, you should destroy the message and kindly notify the sender by
> >> reply e-mail.  It is understood that opinions or conclusions that do
> not
> >> relate to the official business of Communications Supply Corp. are
> neither
> >> given nor endorsed by Communications Supply Corp."
> >>
> >>
> >>
> >>
> >> -------------------------------------------------------
> >> SF.Net email is Sponsored by the Better Software Conference & EXPO
> >> September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> >> Practices
> >> Agile & Plan-Driven Development * Managing Projects & Teams * Testing &
> QA
> >> Security * Process Improvement & Measurement *
> http://www.sqe.com/bsce5sf
> >> _______________________________________________
> >> 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
> >
> >
> > -------------------------------------------------------
> > SF.Net email is Sponsored by the Better Software Conference & EXPO
> > September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> Practices
> > Agile & Plan-Driven Development * Managing Projects & Teams * Testing &
> QA
> > Security * Process Improvement & Measurement *
> http://www.sqe.com/bsce5sf
> > _______________________________________________
> > 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
> >
> 
> --


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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