I am also experiencing this fault with 2.1.2. I have not tried SVN yet.
* The error only occurs against pager addresses attached to a user, if the
pager address is attached to a group, it operates correctly.
* I have traced through the code as far back as ZenModel/UserSettings.py where
I have found the following behaviour:
I have set up an alerting rule against a group that triggers both a Pager and
Email alert. I then trigger an event (by taking down a monitored service on
another machine).
This is the released code:
Code:
def getPagerAddresses(self):
if self.pager.strip():
return [self.pager.strip()]
return []
def getEmailAddresses(self):
if self.email.strip():
return [self.email]
return []
getEmailAddresses returns "[EMAIL PROTECTED]", getPagerAddresses returns
nothing as demonstrated in the following zenaction log entries:
Code:
WARNING zen.ZenActions: SMS Recip: []
WARNING zen.ZenActions: failed to page Test Group on rule SMS Alert:
Unspecified address.
WARNING zen.ZenActions: eMail Recip: ['[EMAIL PROTECTED]']
I made the following code modifications. The code from the point these
functions return forward seems to work correctly:
Code:
def getPagerAddresses(self):
return ['12345']
This causes the following zenaction log entries:
Code:
WARNING zen.ZenActions: SMS Recip: ['12345']
WARNING zen.ZenActions: eMail Recip: ['[EMAIL PROTECTED]']
Interestingly, if I return self.pager from within getEmailAddresses then the
pager address is correctly returned:
Code:
def getPagerAddresses(self):
if self.pager.strip():
return [self.pager.strip()]
return []
def getEmailAddresses(self):
return [self.pager]
This causes the following in the zenaction log:
Code:
WARNING zen.ZenActions: SMS Recip: []
WARNING zen.ZenActions: failed to page Test Group on rule SMS Alert:
Unspecified address.
WARNING zen.ZenActions: eMail Recip: ['+64 21 123 1234']
This suggests that the population of the object with the pager information is
to blame. It is interesting to note that self.pager is populated when an email
alert is processed, but not when a pager alert is processed. The self.email
variable is always correctly populated. I will keep look at this; however,
with my VERY limited knowledge of Python I a probably reaching the limit of
what I can successfully trace through. Input from the Zenoss devs would be
great.
Cheers,
Patrick Brennan
-------------------- m2f --------------------
Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=17069#17069
-------------------- m2f --------------------
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users