TECHZEN Zenoss User Community ARCHIVE  

Ignoring specific events

Subject: Ignoring specific events
Author: [Not Specified]
Posted: 2014-05-07 09:08

Is there a way to ignore specific events like not having them appear as warning under a device

I.e. Exchange server A

Component MSExchangeSA
Event Class /App/Email
Entry 'username' has invalid or expired e-mail certificates

Since that Event Class matches other Event entries.. I'm not sure if reclassifying would work or I guess maybe what the accepted method of ignoring certain events is.



Subject: Transform
Author: [Not Specified]
Posted: 2014-05-07 09:19

You could use a simple transform to drop them! Here is an example:

if evt.summary.startswith("Put the events summary here, at least enough words to make it unique"):
evt._action = "drop"

http://hydruid-blog.com/p=352

Hydruid



Subject: Well the formatting got
Author: [Not Specified]
Posted: 2014-05-07 09:20

Well the formatting got messed up with that, but that is why I added the link!

Hydruid



Subject: Awesome.. thanks. One more
Author: [Not Specified]
Posted: 2014-05-08 09:59

Awesome.. thanks. One more question though.. can you add multiple transforms to the same Class

I.e. I like the example you did for /Unknown. But I'd also like to handle some BES events that are classified as /Unknown as well, but those events contain different wording.



Subject: Sure, just add a 2nd/3rd/4th
Author: [Not Specified]
Posted: 2014-05-08 10:16

Sure, just add a 2nd/3rd/4th one as needed below the 1st!

Hydruid



Subject: Since it's python code you
Author: [Not Specified]
Posted: 2014-05-08 10:16

Since it's python code you can actually combine them as well

Hydruid



Subject: Nice! thank you sir
Author: [Not Specified]
Posted: 2014-05-08 12:24

Nice!
thank you sir



Subject: I have a problem now Hydruid.
Author: [Not Specified]
Posted: 2014-05-08 14:13

I have a problem now Hydruid. After creating a single transform on both of my servers, I left for lunch. When I came back I refreshed the web pages and both servers 'had an issue'. I got an error page from one of them:

Site Error

An error was encountered while publishing this resource.

Sorry, a site error occurred.

Traceback (innermost last):
Module ZPublisher.Publish, line 237, in publish_module_standard
Module ZPublisher.Publish, line 165, in publish
Module Zope2.App.startup, line 230, in __call__
Module Products.ZenUI3.browser, line 103, in __call__
Module Products.ZenWidgets.FileGzipper, line 82, in __call__
Module Products.Five.browser.pagetemplatefile, line 59, in __call__
Module zope.pagetemplate.pagetemplate, line 132, in pt_render
Module zope.pagetemplate.pagetemplate, line 240, in __call__
Module zope.tal.talinterpreter, line 266, in __call__
Module zope.tal.talinterpreter, line 338, in interpret
Module zope.tal.talinterpreter, line 853, in do_defineMacro
Module zope.tal.talinterpreter, line 338, in interpret
Module zope.tal.talinterpreter, line 528, in do_optTag_tal
Module zope.tal.talinterpreter, line 513, in do_optTag
Module zope.tal.talinterpreter, line 508, in no_tag
Module zope.tal.talinterpreter, line 338, in interpret
Module zope.tal.talinterpreter, line 615, in do_insertText_tal
Module Products.PageTemplates.Expressions, line 225, in evaluateText
Module zope.tales.tales, line 696, in evaluate
URL: /opt/zenoss/Products/ZenUI3/browser/error_message.pt
Line 4, Column 12
Expression:
Names:{'args': (),
'container': TypeError('unbound method method_descriptor object must be called with Application instance as first argument (got RequestContainer instance instead)',),
'context': TypeError('unbound method method_descriptor object must be called with Application instance as first argument (got RequestContainer instance instead)',),
'default': ,
'here': TypeError('unbound method method_descriptor object must be called with Application instance as first argument (got RequestContainer instance instead)',),
'loop': {},
'nothing': None,
'options': {},
'repeat': ,
'request': http://10.2.3.17:8080>,
'root': None,
'template': ,
'traverse_subpath': [],
'user': ,
'view': ,
'views': }

Module zope.tales.expressions, line 217, in __call__
Module Products.PageTemplates.Expressions, line 147, in _eval
Module zope.tales.expressions, line 124, in _eval
Module Products.PageTemplates.Expressions, line 97, in trustedBoboAwareZopeTraverse
Module zope.traversing.adapters, line 136, in traversePathElement
__traceback_info__: (, 'instanceIdentifier')
Module zope.traversing.adapters, line 42, in traverse
__traceback_info__: (, 'instanceIdentifier', [])
Module Products.ZenUI3.browser, line 81, in instanceIdentifier
Module Products.ZenUI3.browser, line 77, in dmd

IndexError: list index out of range

Hopefully you will be able to tell if this error is related to the transform.. because that was literally all that I changed before this.



Subject: never mind, never mind. The
Author: [Not Specified]
Posted: 2014-05-08 14:42

never mind, never mind. The error above is from my local server. I restarted teh zenoss services and it's ok now. No clue why it happened. The other Zenoss server apparently was shut down due to a power outage.



Subject: Hydruid.. Secondary question
Author: [Not Specified]
Posted: 2014-05-20 08:49

Hydruid.. Secondary question directly related to what you helped me with above: What other variables are available instead of :if evt.summary.startswith

Is there an "if evt.summary.contains" How would I designate that I'm wanting to specify a string that's within the summary just not at the beginning



Subject: Look at the link I gave you
Author: [Not Specified]
Posted: 2014-05-20 10:40

Look at the link I gave you above, it has those answers ;) but you should also really read the admin and zenoss docs!

Hydruid



< Previous
Using WinPerf data source to monitor disk IO in Zenoss 4.2.4
  Next
Email events by Device Name Not IP
>