Feb 10, 2010 2:10 PM
SSH AIX filesystem Zenpack problem
-
Like (0)
Using Matt Ray's "How to Create an SSH ZenPack" (docs/DOC-2381) and looking at sample Zenpacks I've created my own simple SSH based AIX Zenpack that models and tracks filesystem usage. I've run into one snag that I can't figure out: when checking thresholds zencommand seems to get confused and compares each filesystem's "usedBlocks" against the "availBlocks" of the '/' filesystem.
Command parser output looks good (I've compared line by line with actual "df -kP"). Here's a sample:
values: [(({'componentScanValue': '/'}, 'availBlocks'), 168848.0),
(({'componentScanValue': '/'}, 'usedBlocks'), 44144.0),
(({'componentScanValue': '/usr'}, 'availBlocks'), 1344360.0),
(({'componentScanValue': '/usr'}, 'usedBlocks'), 1637528.0),
(({'componentScanValue': '/var'}, 'availBlocks'), 358156.0),
(({'componentScanValue': '/var'}, 'usedBlocks'), 641268.0),
(({'componentScanValue': '/tmp'}, 'availBlocks'), 486592.0),
(({'componentScanValue': '/tmp'}, 'usedBlocks'), 86848.0),
(({'componentScanValue': '/home'}, 'availBlocks'), 167280.0),
(({'componentScanValue': '/home'}, 'usedBlocks'), 45712.0),
(({'componentScanValue': '/opt'}, 'availBlocks'), 105228.0),
(({'componentScanValue': '/opt'}, 'usedBlocks'), 304372.0),
(({'componentScanValue': '/usr/local'}, 'availBlocks'), 245388.0),
(({'componentScanValue': '/usr/local'}, 'usedBlocks'), 164212.0),
(({'componentScanValue': '/backup'}, 'availBlocks'), 43333964.0),
(({'componentScanValue': '/backup'}, 'usedBlocks'), 456574644.0),
(({'componentScanValue': '/u01'}, 'availBlocks'), 15026224.0),
(({'componentScanValue': '/u01'}, 'usedBlocks'), 11188176.0),
(({'componentScanValue': '/u02'}, 'availBlocks'), 2084104.0),
(({'componentScanValue': '/u02'}, 'usedBlocks'), 13048.0),
(({'componentScanValue': '/u06'}, 'availBlocks'), 7927508.0),
(({'componentScanValue': '/u06'}, 'usedBlocks'), 4491564.0),
(({'componentScanValue': '/u07'}, 'availBlocks'), 3569832.0),
(({'componentScanValue': '/u07'}, 'usedBlocks'), 5670744.0),
(({'componentScanValue': '/u05'}, 'availBlocks'), 32147616.0),
(({'componentScanValue': '/u05'}, 'usedBlocks'), 3438432.0),
(({'componentScanValue': '/u08'}, 'availBlocks'), 25914740.0),
(({'componentScanValue': '/u08'}, 'usedBlocks'), 2658956.0),
(({'componentScanValue': '/u09'}, 'availBlocks'), 7744656.0),
(({'componentScanValue': '/u09'}, 'usedBlocks'), 20632432.0),
(({'componentScanValue': '/u10'}, 'availBlocks'), 2030928.0),
(({'componentScanValue': '/u10'}, 'usedBlocks'), 66224.0),
(({'componentScanValue': '/u11'}, 'availBlocks'), 102859840.0),
(({'componentScanValue': '/u11'}, 'usedBlocks'), 47152064.0),
(({'componentScanValue': '/u03'}, 'availBlocks'), 980100.0),
(({'componentScanValue': '/u03'}, 'usedBlocks'), 1117052.0),
(({'componentScanValue': '/u04'}, 'availBlocks'), 4989276.0),
(({'componentScanValue': '/u04'}, 'usedBlocks'), 1121956.0),
(({'componentScanValue': '/u12'}, 'availBlocks'), 12024512.0),
(({'componentScanValue': '/u12'}, 'usedBlocks'), 205555008.0)]}
Here is a sample of the kind of events I'm seeing. Notice the component is '/' and the current value is that of '/backup' and a Warning is generated:
2010-02-10 13:45:38,477 DEBUG zen.zencommand: Queueing event {'manager': 'zenoss.my.dom', 'eventKey': 'disk|disk_usedBlocks|Full Warning', 'device': 'aixhost.my.dom', 'eventClass':'/Perf/Filesystem', 'summary': 'threshold of Full Warning exceeded: current value 456574644.00', 'component': '/', 'monitor': 'localhost', 'agent': 'zencommand', 'severity': 3}
(Warning threshhold set to 90%, Critical to 95%)
The RRD files are getting populated correctly so I know it's getting the right data. I've looked at my few event transforms (and even disabled them as a test) and they don't seem to be the cause.
Any help appreciated.
Chock
Sounds like a bug. The '/' is probably hard-coded somewhere. Why don't you open a ticket and we'll see about getting it addressed (or even better a patch).
http://dev.zenoss.org/trac/wiki/HowToAddTicket
That said, if you'd like to share your AIX SSH ZenPack, I'm sure other users would be interested.
Thanks,
Matt Ray
Zenoss Community Manager
Thanks for the response.
After much poking around and lots of log.debug()s I made a small change to zencommand.py and have it logging the events correctly now. I need to do more testing though because I'm not seeing my events getting generated at every polling interval (it's as if the servers aren't getting polled at all). Btw, I'm working from an already patched 2.5.0 version.
I'd be happy to share what I've got for a zenpack once I get through some more testing and feel comfortable that's it actually works well enough. Your doc. was very helpful but I have to admit it took me a while to pull all the concepts together and get a functioning parser. It wasn't obvious to me at first how the parser got invoked.
Chock
So there was an issue in the code? If you could submit a ticket with the patch we can get it rolled into the product.
Ticket 6179 opened and patch attached to it.
Chock
Follow Us On Twitter »
|
Latest from the Zenoss Blog » | Community | Products | Services Resources | Customers Partners | About Us | ||
Copyright © 2005-2011 Zenoss, Inc.
|
||||||||