Archived community.zenoss.org | full text search
Skip navigation
743 Views 6 Replies Latest reply: Oct 9, 2013 2:20 PM by Mouhammed Soueidane RSS
Mouhammed Soueidane Rank: White Belt 51 posts since
Dec 12, 2011
Currently Being Moderated

Oct 9, 2013 9:33 AM

Events Mapping

Hi everyone,
I'm having a hard time with events mapping on Zenoss. I already went through section 6 of Jane Curry's excellent document:

docs/DOC-3538 .

 

What I did was the following:

 

1- Created an event mapping with an ID and name equal to "mapping"

2- In the "Rule" section, I added the following: evt.summary=="test"

3- In the transform section I added the following: evt.summary="Event Successfully Mapped"

4- I clicked on Save
5- I went to the Sequence configuration, and made sure to configure the Class Mapping to have sequence = 0

6- I went to the "Events Console", and chose to ADD a new event
7- I made sure that my event Summary is equal to "test" and the device class is equal to "/Unknown".

8- Made sure that the EventClassKey is equal to "mapping"

 

The new event is being added and I can clearly see it in the events console. Though the summary of the event remains as initially input "test".

 

Expected Result:

What I expect is that the summary of the event becomes "Event Successfully Mapped" which indicates that the mapping was successful.

 

Am I missing anything?


Zenoss Version used: 4.2.4 (Also tried it on version 4.2.0)

  • rolfs Rank: White Belt 27 posts since
    Jan 27, 2010
    Currently Being Moderated
    1. Oct 9, 2013 10:21 AM (in response to Mouhammed Soueidane)
    Re: Events Mapping

    I think I would have done this:

     

     

    ID=what you want to call it

    Event Class Key= what your eventclasskey will be, probably empty in your test case.

    regex: *test*

    example: test

     

    transform:

    if evt.summary.find('test') >= 0:

       evt.summary="Event Successfully Mapped"

  • jcurry ZenossMaster 1,021 posts since
    Apr 15, 2008
    Currently Being Moderated
    3. Oct 9, 2013 11:23 AM (in response to Mouhammed Soueidane)
    Re: Events Mapping

    So - your eventClassKey is mapping as well as the name?  Typically, the eventClassKey would be set to some other field of the event - often it is the component field though it doesn't have to be.  So I, personally, would not have a mapping name or eventClassKey of "mapping" - I would find that confusing.

     

    You don't say what event class you are mapping to??  You need to start with an event class - either a product-supplied one or create your own.  Once you have a class, then create the mapping.  The function of a mapping is to determine whether your event is going to be of this class, or not.

     

    Rather than creating your own mapping next, the easiest way is to generate a test event.  Not sure whether you have actually been specifying an event class of /Unknown?  Don't - leave that event class field blank - that is what the mapping is all about.  Your event should come through as /Unknown anyway.  Once you see your event, use the class mapping icon in the Event Console (the one that looks like a data tree) and map it to your /Skills event class.  This AUTOMATICALLY creates a mapping for you and copies the event summary field into the mapping example field - which may come in handy later.

     

    Now you can work on that mapping.  You could add a rule of evt.summary == "test" and you could add a transform as you have done.

     

    Another tip is to always close previous test events before generating a new test event - otherwise it adds to the repeat count of an earlier event and may cause confusion.

     

    When you get bored with using the GUI to generate events, you may find swapping to a command window and using zensendevent is faster.

     

    Cheers,

    Jane

  • jcurry ZenossMaster 1,021 posts since
    Apr 15, 2008
    Currently Being Moderated
    5. Oct 9, 2013 2:17 PM (in response to Mouhammed Soueidane)
    Re: Events Mapping

    The /Unknown "class" is a special case that catches everything that doesn't map to anything else.  The documentation may not be over-bright about it but I don't really think it's a bug.

     

    Glad you got going

     

    Cheers,

    Jane

More Like This

  • Retrieving data ...

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points