I'll take a stab at this. First, I am going to assume that you are
trying to run this on your zenoss server, since ssh is disabled. 

I've never played with the file system perfconf, so I am not completely
sure that a zencommand check can be placed here. I think I follow your
logic for why, but you might want to try setting up an identical check
in a local perfconf for your zenoss system, and switch back and forth
which one you have enabled, or at least make minor adjustments to the
log filename.

You can test the command on the server by logging in as the zenoss user,
shutting down the zencommand service (zencommand stop), and running:

zencommand run --device=localhost -v10
   assuming that your zenoss server is labeled in the devices page as
localhost. Adjust accordingly.

Let us know what kind of output you get from this command.

I note that you're checking /tmp and logging to /tmp, so if /tmp is NOT
writable, you wouldn't get a log.

On Wed, 2007-05-23 at 12:44 +0000, tbennedum wrote:
> 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
-- 
James D. Roman
IT Network Administration

Terranet Inc.On contract to:
Science Systems and Applications, Inc.

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

Reply via email to