Skip navigation
7434 Views 10 Replies Latest reply: Jul 5, 2009 2:05 PM by en8scl RSS
bigpulla Rank: White Belt 14 posts since
Apr 13, 2008
Currently Being Moderated

May 15, 2009 5:25 AM

Email alert is not working.

Hi All,

Since I upgraded to 2.4 my alert messages are not being sent. When i send a test message it comes through instantaneously. I have checked my mail server logs and there is no mention of my zenoss server trying to connect.

My alerting rules are:

Delay: 0
Severity >= warning
Production State = production
Enabled: True
Repeat: 0
Address: <My address>

All my devices are in production state and set to critical. I have also setup my smtp server in settings.

Is there an alerting log somewhere?
  • jmp242 ZenossMaster 4,060 posts since
    Mar 7, 2007
    Currently Being Moderated
    1. May 15, 2009 1:36 PM (in response to bigpulla)
    Email alert is not working.
    What if you leave your address blank? It should pick up your address
    from your profile, and that space is for an alternate address...

    The alerts are generated from Events, IIRC you might see entries in
    ZenActions log, if you set logseverity 10.
    --
    James Pulver
    Information Technology Area Supervisor
    LEPP Computer Group
    Cornell University



    bigpulla wrote, On 5/15/2009 5:25 AM:

     

     

    Hi All,

    Since I upgraded to 2.4 my alert messages are not being sent. When i send a test message it comes through instantaneously. I have checked my mail server logs and there is no mention of my zenoss server trying to connect.

    My alerting rules are:

    Delay: 0
    Severity >= warning
    Production State = production
    Enabled: True
    Repeat: 0
    Address: <My address>

    All my devices are in production state and set to critical.

    Is there an alerting log somewhere?







    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users

    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users
  • rebelinux Rank: Green Belt 108 posts since
    Jun 6, 2008
    Currently Being Moderated
    2. May 15, 2009 7:09 PM (in response to jmp242)
    Re: Email alert is not working.
    im having the same problem too

    "bigpulla" wrote:

     

    Hi All,

    Since I upgraded to 2.4 my alert messages are not being sent. When i send a test message it comes through instantaneously. I have checked my mail server logs and there is no mention of my zenoss server trying to connect.

    My alerting rules are:

    Delay: 0
    Severity >= warning
    Production State = production
    Enabled: True
    Repeat: 0
    Address: <My address>

    All my devices are in production state and set to critical. I have also setup my smtp server in settings.

    Is there an alerting log somewhere?

  • trondah Rank: White Belt 30 posts since
    Oct 13, 2008
    Currently Being Moderated
    4. May 18, 2009 7:23 PM (in response to bigpulla)
    RE:
    Same problem here:

    http://forums.zenoss.com/viewtopic.php?p=34992
  • en8scl Rank: White Belt 9 posts since
    Jun 30, 2008
    Currently Being Moderated
    5. Jun 29, 2009 1:13 PM (in response to trondah)
    Alerting Problem here too
    Our test emails are going OK but the zenactions log is showing the following errors when trying to send an email when an incident occurs triggering the alert:

    2009-06-29 18:07:40 INFO zen.ZenActions: processed 1 rules in 0.06 secs
    2009-06-29 18:08:40 INFO zen.ZenActions: Processed 0 commands in 0.000024
    2009-06-29 18:08:40 WARNING zen.ZenActions: SELECT firstTime,device)s+Component:+%(component)s+Severity+%(severityString)s+Message:+%(message,component,summary,device,message,severity,summary, evid FROM status WHERE (prodState = 1000) and (eventState = 0) and (severity >= 4) and firstTime + 2 < UNIX_TIMESTAMP() AND evid NOT IN (SELECT evid FROM alert_state WHERE userid='admin' AND rule='test' )
    2009-06-29 18:08:40 ERROR zen.ZenActions: action:test
    Traceback (most recent call last):
    File "/opt/zenoss/Products/ZenEvents/zenactions.py", line 237, in processRules
    self.processEvent(zem, ar, actfunc)
    File "/opt/zenoss/Products/ZenEvents/zenactions.py", line 263, in processEvent
    for result in self.query(q):
    File "/opt/zenoss/Products/ZenEvents/zenactions.py", line 199, in query
    curs.execute(stmt)
    File "/opt/zenoss/lib/python/MySQLdb/cursors.py", line 137, in execute
    self.errorhandler(self, exc, value)
    File "/opt/zenoss/lib/python/MySQLdb/connections.py", line 33, in defaulterrorhandler
    raise errorclass, errorvalue
    ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')s+Component:+%(component)s+Severity+%(severityString)s+Message:+%(message,compo' at line 1")
    2009-06-29 18:08:40 INFO zen.ZenActions: processed 1 rules in 0.06 secs

    This is on 2.4.2 - Any Ideas?
  • Chet Luther ZenossEmployee 1,302 posts since
    May 22, 2007
    Currently Being Moderated
    6. Jun 29, 2009 5:05 PM (in response to en8scl)
    Email alert is not working.
    On Jun 29, 2009, at 1:13 PM, en8scl wrote:

     

     

    Our test emails are going OK but the zenactions log is showing the
    following errors when trying to send an email when an incident
    occurs triggering the alert:

    2009-06-29 18:07:40 INFO zen.ZenActions: processed 1 rules in 0.06
    secs
    2009-06-29 18:08:40 INFO zen.ZenActions: Processed 0 commands in
    0.000024
    2009-06-29 18:08:40 WARNING zen.ZenActions: SELECT firstTime,device)s
    +Component:+%(component)s+Severity+%(severityString)s+Message:+%
    (message,component,summary,device,message,severity,summary, evid
    FROM status WHERE (prodState = 1000) and (eventState = 0) and
    (severity >= 4) and firstTime + 2 < UNIX_TIMESTAMP() AND evid NOT
    IN (SELECT evid FROM alert_state WHERE userid='admin' AND
    rule='test' )
    2009-06-29 18:08:40 ERROR zen.ZenActions: action:test
    Traceback (most recent call last):
    File "/opt/zenoss/Products/ZenEvents/zenactions.py", line 237, in
    processRules
    self.processEvent(zem, ar, actfunc)
    File "/opt/zenoss/Products/ZenEvents/zenactions.py", line 263, in
    processEvent
    for result in self.query(q):
    File "/opt/zenoss/Products/ZenEvents/zenactions.py", line 199, in
    query
    curs.execute(stmt)
    File "/opt/zenoss/lib/python/MySQLdb/cursors.py", line 137, in
    execute
    self.errorhandler(self, exc, value)
    File "/opt/zenoss/lib/python/MySQLdb/connections.py", line 33, in
    defaulterrorhandler
    raise errorclass, errorvalue
    ProgrammingError: (1064, "You have an error in your SQL syntax;
    check the manual that corresponds to your MySQL server version for
    the right syntax to use near ')s+Component:+%(component)s+Severity+%
    (severityString)s+Message:+%(message,compo' at line 1")
    2009-06-29 18:08:40 INFO zen.ZenActions: processed 1 rules in 0.06
    secs

    This is on 2.4.2 - Any Ideas?


    This is quite strange. It looks like the data from the Message tab of
    your alerting rule has found its way into the filter. When you look at
    the filter on the Edit tab of the rule, does it look normal?
    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users
  • Chet Luther ZenossEmployee 1,302 posts since
    May 22, 2007
    Currently Being Moderated
    7. Jun 29, 2009 5:05 PM (in response to Chet Luther)
    Email alert is not working.
    On Jun 29, 2009, at 1:13 PM, en8scl wrote:

     

     

    Our test emails are going OK but the zenactions log is showing the
    following errors when trying to send an email when an incident
    occurs triggering the alert:

    2009-06-29 18:07:40 INFO zen.ZenActions: processed 1 rules in 0.06
    secs
    2009-06-29 18:08:40 INFO zen.ZenActions: Processed 0 commands in
    0.000024
    2009-06-29 18:08:40 WARNING zen.ZenActions: SELECT firstTime,device)s
    +Component:+%(component)s+Severity+%(severityString)s+Message:+%
    (message,component,summary,device,message,severity,summary, evid
    FROM status WHERE (prodState = 1000) and (eventState = 0) and
    (severity >= 4) and firstTime + 2 < UNIX_TIMESTAMP() AND evid NOT
    IN (SELECT evid FROM alert_state WHERE userid='admin' AND
    rule='test' )
    2009-06-29 18:08:40 ERROR zen.ZenActions: action:test
    Traceback (most recent call last):
    File "/opt/zenoss/Products/ZenEvents/zenactions.py", line 237, in
    processRules
    self.processEvent(zem, ar, actfunc)
    File "/opt/zenoss/Products/ZenEvents/zenactions.py", line 263, in
    processEvent
    for result in self.query(q):
    File "/opt/zenoss/Products/ZenEvents/zenactions.py", line 199, in
    query
    curs.execute(stmt)
    File "/opt/zenoss/lib/python/MySQLdb/cursors.py", line 137, in
    execute
    self.errorhandler(self, exc, value)
    File "/opt/zenoss/lib/python/MySQLdb/connections.py", line 33, in
    defaulterrorhandler
    raise errorclass, errorvalue
    ProgrammingError: (1064, "You have an error in your SQL syntax;
    check the manual that corresponds to your MySQL server version for
    the right syntax to use near ')s+Component:+%(component)s+Severity+%
    (severityString)s+Message:+%(message,compo' at line 1")
    2009-06-29 18:08:40 INFO zen.ZenActions: processed 1 rules in 0.06
    secs

    This is on 2.4.2 - Any Ideas?


    This is quite strange. It looks like the data from the Message tab of
    your alerting rule has found its way into the filter. When you look at
    the filter on the Edit tab of the rule, does it look normal?
    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users
  • en8scl Rank: White Belt 9 posts since
    Jun 30, 2008
    Currently Being Moderated
    8. Jun 30, 2009 6:25 PM (in response to Chet Luther)
    Alerts issue
    Ok I removed the alert and started again and it seems to have fixed the issue... however once I edit the message it quickly comes back - think I need some help on how to format the messgaes so that they work with our SMS provider (clickatell). I need to get the message to give the following output (with '+' signs in place of spaces in the 'text:' field as shown

     

     

    user:stuart@mydomain.co.uk
    password:mypasswd
    api_id:39876
    to: 447078456879
    text:Device:earth.mydomain.co.uk+Severity:Error+Time:2009/06/30+23:08:01.000+Message:Unable+to+read+processes+on+device+earth.mydomain.co.uk



    I tried using this code to achieve this in the message body but it is failing with MYSQL errors according to the actions log - doesn't seem to like the + signs

    user:stuart@mydomain.co.uk
    password:mypasswd
    api_id:39876
    to: 447078456879
    text:Device:%(device)s+Severity:%(severityString)s+Time:%(firstTime)s+Message:%(message)s


    error log showing:

     

     

    2009-06-30 23:09:17 WARNING zen.ZenActions: SELECT device,device)sSeverity:%(severityString)sTime:%(firstTime)sMessage:%(message,summary,severity,summary, evid FROM status WHERE (prodState = 1000) and (eventState = 0) and (severity >= 4) AND evid NOT IN (SELECT evid FROM alert_state WHERE userid='admin' AND rule='stuartrules' )
    2009-06-30 23:09:17 ERROR zen.ZenActions: action:stuartrules
    Traceback (most recent call last):
    File "/opt/zenoss/Products/ZenEvents/zenactions.py", line 237, in processRules
    self.processEvent(zem, ar, actfunc)
    File "/opt/zenoss/Products/ZenEvents/zenactions.py", line 263, in processEvent
    for result in self.query(q):
    File "/opt/zenoss/Products/ZenEvents/zenactions.py", line 199, in query
    curs.execute(stmt)
    File "/opt/zenoss/lib/python/MySQLdb/cursors.py", line 137, in execute
    self.errorhandler(self, exc, value)
    File "/opt/zenoss/lib/python/MySQLdb/connections.py", line 33, in defaulterrorhandler
    raise errorclass, errorvalue
    ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')sSeverity:%(severityString)sTime:%(firstTime)sMessage:%(message,summary,severit' at line 1")

  • Chet Luther ZenossEmployee 1,302 posts since
    May 22, 2007
    Currently Being Moderated
    9. Jul 4, 2009 5:54 PM (in response to en8scl)
    Email alert is not working.
    On Jun 30, 2009, at 6:25 PM, en8scl wrote:

     

     

    Ok I removed the alert and started again and it seems to have fixed
    the issue... however once I edit the message it quickly comes back -
    think I need some help on how to format the messgaes so that they
    work with our SMS provider (clickatell). I need to get the message
    to give the following output (with '+' signs in place of spaces in
    the 'text:' field as shown

     

     

    user:stuart@mydomain.co.uk
    password:mypasswd
    api_id:39876
    to: 447078456879
    text:Device:earth.mydomain.co.uk+Severity:Error+Time:
    2009/06/30+23:08:01.000+Message:Unable+to+read+processes+on+device+earth.mydomain.co.uk


    I tried using this code to achieve this in the message body but it
    is failing with MYSQL errors according to the actions log - doesn't
    seem to like the + signs



    I was able to replicate this one. You're right about it not liking the
    + signs. More specifically it is looking for whitespace between one
    variables and the next. This definitely isn't a requirement for the
    parser as it could be a lot more intelligent about it and handle the +
    signs or anything else. I've opened up the ticket below to have this
    corrected.

    Ticket #5276: Alerting rules fail when variables in message aren't
    delimited by whitespace
    http://dev.zenoss.org/trac/ticket/5276

    I have a patch for the problem that will allow your existing message
    to work, but it'll need to go through review next week before it gets
    into the mainline. If you'd like to get the fix on your system ASAP
    you can run the following commands as the zenoss user to install the
    patch.

    curl http://gist.github.com/raw/a2b3335637f43c7abc24/cf9ed37b3ad9bd3d7dd70d417e890748f90c6dd9/Don-t-require-delimiters-in-notification-messages-.patch
    | patch -b --strip=1

    You can safely ignore the error about the patch unexpectedly ending in
    the middle of a line.
    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users
  • en8scl Rank: White Belt 9 posts since
    Jun 30, 2008
    Currently Being Moderated
    10. Jul 5, 2009 2:05 PM (in response to Chet Luther)
    RE: Email alert is not working.
    Brill Thankyou

    What directory do I need to run this in?

    It is prompting for the file to patch as well - what should I be telling it?

More Like This

  • Retrieving data ...