I've written a Nagios compatible plugin script to perform some checks on a 
given path (supplied via command line option). I want to have this script run 
on each file system on each device in a particular class of devices. I'm having 
trouble getting this to work. Here's what I've got so far:

Zenoss 1.1.2 on FC6, running fine doing SNMP and ping monitoring of a bunch of 
hosts.

I've written the plugin script in Perl and followed the standards for Nagios 
plugins (single line of output, formatted correctly, exit status, etc.). The 
script works correctly when run as root and as any non-root user. It includes a 
command line option to tell the script to log it's progress in a log file in 
/tmp for debugging purposes. All this works perfectly when run by hand. 
However, integrating it with Zenoss isn't going so well.

After reading some incomplete wiki articles and some posts in the forums, I 
tried getting the script to work for a single file system on a single device. I 
navigate to the target device, go to the OS tab, select a file system, select 
it's PerfConf tab, add a new datasource with the following parameters:

Name: writeable
Source Type: command
Enabled: True
Use SSH: False
Component: filesystem
Event Class: /Status
Event Key: mykey
Severity: Warning
Cycle Time: 60
Command Template:
/usr/share/myzenoss-plugins/check_pathwrite --log=/tmp/write.log --path=/tmp

I saved the datasource and waited a few minutes. I get nothing in the 
/tmp/write.log, which should contain something to indicate the script was run, 
whether or not the test was successful.

So what am I doing wrong? Assuming I can get this simple test working, the next 
change I'll make is to get command template to specify the filesystem with a 
substitution for my "path" option (how do you do that?).

-Tab

------------------------
 Tab Bennedum




-------------------- m2f --------------------

Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=6702#6702

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to