Feb 7, 2011 10:58 AM
ZenCommand not saving performance data
-
Like (0)
I'm having a problem getting zencommand to store my performance data.
I've created the following monitoring template.
NAME: IBMDS4000LogicalDrive
TYPE: COMMAND
ENABLED: CHECKED
SEVERITY: WARNING
EVENT CLASS: /cmd/fail
CYCLE TIME: 300
PARSER: Auto
COMMAND TEMPLATE: /usr/local/zenoss/zenoss/ZenPacks/ZenPacks.TadSmith.IBMDS4000/ZenPacks/TadSmith/IBMDS4000/lib/IBMDS4000LogicalDrivePerformance.pl ${here/titleOrId}
I've then created a very basic Perl script just to try and output some data.
#!/usr/bin/env perl
print "|someData=23s;;;;;";
When I view the results of ZenCommand, nothing seems to be being saved. I see that it is getting the correct return from the Perl script, but then it gives me an error of "Dropping useless clear event", and doesn't seem to be saving any data.
2011-02-07 09:56:37,262 DEBUG zen.zencommand: Received exit code: 0
2011-02-07 09:56:37,262 DEBUG zen.zencommand: Command: '/bin/sh -c exec /usr/local/zenoss/zenoss/ZenPacks/ZenPacks.TadSmith.IBMDS4000/ZenPacks/TadSmith/IBMDS4000/lib/IBMDS4000LogicalDrivePerformance.pl MIR-DHS3SS107-T'
2011-02-07 09:56:37,263 DEBUG zen.zencommand: Output: '|someData=23s;;;;;'
2011-02-07 09:56:37,263 DEBUG zen.zencommand: Process IBMDS4000LogicalDrivePerformance.pl MIR-DHS3SS107-T stopped (0), 0.27 seconds elapsed
2011-02-07 09:56:37,263 DEBUG zen.zencommand: Dropping useless clear event {'manager': 'sos-zen01.mn-dhs1.co.dhs', 'eventKey': 'IBMDS4000LogicalDrivePerformance', 'device': '10.1.230.231', 'eventClass': '/Cmd/Fail', 'summary': 'Cmd: /usr/local/zenoss/zenoss/ZenPacks/ZenPacks.TadSmith.IBMDS4000/ZenPacks/TadSmith/IBMDS4000/lib/IBMDS4000LogicalDrivePerformance.pl MIR-DHS3SS107-T - Code: 0 - Msg: Success', 'component': '', 'monitor': 'localhost', 'agent': 'zencommand', 'severity': 0}
2011-02-07 09:56:37,263 DEBUG zen.zencommand: The result of "/usr/local/zenoss/zenoss/ZenPacks/ZenPacks.TadSmith.IBMDS4000/ZenPacks/TadSmith/IBMDS4000/lib/IBMDS4000LogicalDrivePerformance.pl MIR-DHS3SS107-T" was "'|someData=23s;;;;;'"
2011-02-07 09:56:37,265 DEBUG zen.zencommand: Next command in 299 seconds
2011-02-07 09:56:37,265 DEBUG zen.zencommand: Received exit code: 0
Can anyone see what I'm doing wrong? Thanks in advance.
You need to output nagios plugin format.
Datasource|Datapoint=integer
--
James Pulver
Information Technology Area Supervisor
LEPP Computer Group
Cornell University
Can you elaborate what goes in the "Datasource" field? I tried the name of the Datasource and the output was the same. I've also tried dropping the trailing semicolons as the Nagios plug-in development guidelines states they are optional.
#!/usr/bin/env perl
print "IBMDS4000LogicalDrive|someData=23";
2011-02-07 11:54:36,805 DEBUG zen.zencommand: Command: '/bin/sh -c exec /usr/local/zenoss/zenoss/ZenPacks/ZenPacks.TadSmith.IBMDS4000/ZenPacks/TadSmith/IBMDS4000/lib/IBMDS4000LogicalDrivePerformance.pl MIR-DHS3SS703-F'
2011-02-07 11:54:36,805 DEBUG zen.zencommand: Output: 'IBMDS4000LogicalDrive|someData=23'
2011-02-07 11:54:36,806 DEBUG zen.zencommand: Process IBMDS4000LogicalDrivePerformance.pl MIR-DHS3SS703-F stopped (0), 0.05 seconds elapsed
2011-02-07 11:54:36,806 DEBUG zen.zencommand: Dropping useless clear event {'manager': 'sos-zen01.mn-dhs1.co.dhs', 'eventKey': 'IBMDS4000LogicalDrivePerformance', 'device': '10.1.230.231', 'eventClass': '/Cmd/Fail', 'summary': 'Cmd: /usr/local/zenoss/zenoss/ZenPacks/ZenPacks.TadSmith.IBMDS4000/ZenPacks/TadSmith/IBMDS4000/lib/IBMDS4000LogicalDrivePerformance.pl MIR-DHS3SS703-F - Code: 0 - Msg: Success', 'component': '', 'monitor': 'localhost', 'agent': 'zencommand', 'severity': 0}
2011-02-07 11:54:36,806 DEBUG zen.zencommand: The result of "/usr/local/zenoss/zenoss/ZenPacks/ZenPacks.TadSmith.IBMDS4000/ZenPacks/TadSmith/IBMDS4000/lib/IBMDS4000LogicalDrivePerformance.pl MIR-DHS3SS703-F" was "'IBMDS4000LogicalDrive|someData=23'"
2011-02-07 11:54:36,807 DEBUG zen.zencommand: Next command in 299 seconds
2011-02-07 11:54:36,808 DEBUG zen.zencommand: Received exit code: 0
Really it doesn't matter. You just have to have the datapoint for the graph be named someData for your example.
--
James Pulver
Information Technology Area Supervisor
LEPP Computer Group
Cornell University
That was it. I had appended the data source name in the Monitoring Template, but not in the script output. Thanks!
Follow Us On Twitter »
|
Latest from the Zenoss Blog » | Community | Products | Services Resources | Customers Partners | About Us | ||
Copyright © 2005-2011 Zenoss, Inc.
|
||||||||