Need some help w/custom plug-in, please

Scott Whitney swhitney at journyx.com
Wed Apr 9 18:35:14 CEST 2003


Dean,
I thought of that, but the thing runs just fine.  If you run it from the
command line.  The permissions are all the same for this plug-in as well as
all the others in that directory.  Also, if I su to nagios, it runs fine (as
well as as root).  It just keeps saying "No Output".

My resource config file says:
$USER1$=/var/www/nagios/libexec

My command file(check_virus_dat.cfg) says:
define command {
  command_name                    check_virus_dat
  command_line                    $USER1$/check_virus_dat
}

The service file for the box it's on (camel) says:
####################### BEGIN SERVICE DEFINITION #######################
define service {
  use                             int-service

  host_name                       camel
  service_description             virus_dat
  check_command                   check_virus_dat
}
######################## END SERVICE DEFINITION ########################

There shouldn't be any more to it, I would think.

Anyone????????????  This is killing me!


----- Original Message -----
From: "Dean Bishop" <dbishop at ehvert.com>
To: "'Scott Whitney'" <swhitney at journyx.com>;
<nagios-users at lists.sourceforge.net>
Sent: Wednesday, April 09, 2003 8:04 AM
Subject: RE: [Nagios-users] Need some help w/custom plug-in, please


Could it be a permissions problem??

-----Original Message-----
From: Scott Whitney [mailto:swhitney at journyx.com]
Sent: April 8, 2003 4:24 PM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] Need some help w/custom plug-in, please

I have a simple plug in.  It calculates the age of the virus files based on
"now" and alerts you if outside your acceptable range.

It's called check_virus_dat.  It returns statusText of "Virus files are ___
days old." via sys.stdout and exits with exit code 0,1 or 2 based on good,
warn, critical.

Now, it's python-based, but the last 2 lines are all that matter.  My
command is:
define command {
  command_name                    check_virus_dat
  command_line                    $USER1$/check_virus_dat
}

The last 2 lines are:
print StatusText, status
sys.exit(status)

It returns the statusText ok, and I can see the exit code it's about to use.
Other scripts I've written are using these same exits fine.

When I run locally, I get (No output!)
When I run via nrpe, I get "Return code 32 is out of bounds."

Can anyone help me on this, please?

Scott Whitney






-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
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


-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.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



-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.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