I'm running 3.0 upgraded from 2.x (whatever the latest pre 3 version was). I realized we weren't getting
any alerts today. I checked, and zenactions is down. It will not start. The log entries are below.
Line 13 is a transform line I added. It adds circuit IDs and phone numbers to e-mail alerts. Not all devices
have something in the comments field. I got this same complaint when I ran the pre 3.0 upgrade zenpack.
I removed the transform, upgraded, and then put it back in. It hasn't caused any apparent issues for a
week or so. It ran fine on previous versions of Zenoss. Now it seems to be causing a big problem. I
searched the archives. I found something about deleting pickles, but that didn't apply for me. I found
something about referencing non existent fields. That shouldn't apply to me, unless it is unhappy about
processing events for devices that have no entries in the comments field.
Any ideas?
Thanks,
Matthew
2010-07-28 21:46:09,488 WARNING zen.Events: Error processing transform/mapping on Event Class /
Problem on line 13: AttributeError: 'NoneType' object has no attribute 'comments'
evt.message = evt.message + ('\n') + str(device.comments)
Transform:
0 # Suppress any non-ping, non-clear events from devices that have outstanding
1 # ping down events.
2 #
3 # This transform is sensitive to the event cache timeout. If the ping down
4 # event comes in less than "timeout" seconds before the subsequent events, the
5 # subsequent events will not be suppressed. You can find the event cache
6 # timeout setting on the Event Manager page in the web interface.
7 if getattr(evt, 'severity', 0) > 0 \
8 and getattr(evt, 'eventClass', '/Unknown') != '/Status/Ping' \
9 and device and device.getPingStatus() > 0:
10 evt.eventState = 2
11
12 #add comments to email
13 evt.message = evt.message + ('\n') + str(device.comments)
*bump*
Any chance someone can help me out? I'm dead in the water right now. This feature is critical for me.
Does your transform need to be in /Events or can it be moved to a specific event class? Also, don't you need to add 'import re' if you're going to use a regex in your transform?
# description
import re
evt.message = some transform that uses a regex
John
I think it would be fine for it to be on ping. It is for when a
router/circuit is down. IS that a better place for it? Thank you for the
reply!!
It needs to go in the event class that your down alerts are in, most likely /Status/Ping.
EDIT - I say needs to but probably better to say it should go in the best fitting class.
You didn't mention if you added "import re" to the transform, does that affect it?
John
I am curious about another thing here, is the first transform in the /Status/Ping class also? Your error says line 13 which makes me wonder if it is. If it is, it should be moved to /Events so it can do what it's designed to do - suppress other alerts when a ping-down alert already exists for a given device.
John
Sorry, I was using the mailing list, and it didn't show your comments
regarding "import re". I did not put that in, yet. I'm trying things one
step at a time.
Both the transforms were on /Events only.
I moved the comments transform to Ping, and the daemon is started now.
I'm looking for a site I can take down briefly to see if everything is
working as I hope. I should know something in a minute.
I moved it to Ping, and all seems fine now. I have no idea why it suddenly quit working. Thank you for oyur help!
|
Follow Us On Twitter »
|
Latest from the Zenoss Blog » |
|
Community | Products | Services Resources | Customers Partners | About Us | |
|
|
|
Copyright © 2005-2010 Zenoss, Inc.
|
||||||