DX NetOps

 View Only
  • 1.  Creating an alarm report with custom attributes

    Posted Oct 17, 2021 02:08 PM
    Hello,

    I am trying to create a report with custom attributes that come from both the alarm and the device.

    The device contains an attribute that identifies the owner of the device, and the alarm contains an attribute that is added on alarm creation by a event procedure.
    The Alarm attribute was added to the GlobalAlarm model and the Device attribute in the Device model in MTE.
    Both have readable and writable flags as well as memory and database extended flags checked.

    Both attributes are visible in OneClick console. But I don't know where I can find them in the reporting database or ddmdb database.

    Can anyone give me hand with this?


  • 2.  RE: Creating an alarm report with custom attributes

    Posted Oct 17, 2021 03:31 PM
    Try this.


  • 3.  RE: Creating an alarm report with custom attributes

    Posted Oct 17, 2021 03:35 PM

    I will.

    Thanks for the quick reply!




  • 4.  RE: Creating an alarm report with custom attributes

    Posted Oct 24, 2021 10:52 AM
    Edited by Armando Martires Oct 24, 2021 11:08 AM
    I'm still failing to find the attribute values in the reporting database.
    I might be missing something, so here are my steps.

    1. Mapped the trap to an event in AlertMap
      1.3.111.2.802.1.1.8.6.1      0xfff00900 1.3.111.2.802.1.1.8.1.7.1.1.13(1,2)​
    2. Created the Event Procedure in EventDisp that sets the variables/attributes for an alarm event
      0xfff00900 E 0 P "SetVariable( {V Mep}, \
              GetEventVariable({U 1}), \
              SetVariable ( {V MepCircuit}, \
                      GetRegexp( ToString({V Mep}), {S \"^[0-9]*.[0-9]*\"}, {U 0} ), \
                      SetVariable({ V Circuit}, \
                              ToString(ReadAttributeInstance({C CURRENT_MODEL}, {H 0xffff0000}, ToString( {V MepCircuit} ) ) ), \
                              CreateEventWithVariables( {C CURRENT_MODEL}, \
                                      {H 0xfff00901}, \
                                      SetEventVariable( GetEventVariableList(), \
                                              {H 0x12b4c}, \
                                              Append( {S \"CFM Fault set affecting MEP: \"}, \
                                                      Append(ToString({V Mep}), \
                                                              Append({S \" and CIRCUIT: \"}, \
                                                              ToString({V Circuit})))))))))"
      0xfff00901 E 20 A 3,0xfff00900,U​
    3. Added the new attribute to alarm-table-config.xml and view-alarmdetails-config.xml
      (So far things work as expected with the trap generating the right event that generates the alarm and the attributes are visible in the alarm)
    4. Created the file devicemodel-polling.xml in <spectrum>/custom/repmgr/config and it looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <devicemodel-polling xmlns="http://www.ca.com/SRM/AttributePollMapping"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <user-defined-poll modelType="Host_Device">
            <poll-attribute attrId="0xffff0000">
                <varchar-storage id="1"/>
                <reports label="TEST Octet String"/>
            </poll-attribute>
            <poll-attribute attrId="0xffff0002">
                <varchar-storage id="2"/>
                <reports label="TEST String"/>
            </poll-attribute>
            <poll-attribute attrId="0xffff0003">
                <varchar-storage id="3"/>
                <reports label="TEST String List"/>
            </poll-attribute>
        </user-defined-poll>
    </devicemodel-polling>​​

      5. I also created a event-filter.xml file in <spectrum>/custom/repmgr/config/events that looks like this:

    <?xml version="1.0" encoding="UTF-8" ?>
    <filter xmlns="http://www.aprisma.com"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://www.aprisma.com ./event-filter.xsd">
    
    <event_type>0xfff00900</event_type>
    <event_type>0xfff00901</event_type>
    
    </filter>​



    I restarted the OneClick tomcat server.

    When a new alarm is generated I am able to find it the reporting database, but I was expecting to find the custom attribute(s) in the devicemodel_uda table.

    What am I missing?


  • 5.  RE: Creating an alarm report with custom attributes

    Posted Oct 25, 2021 04:18 PM
    Actually I checked again today and the attribute values are now in the devicemodel_uda table in the reporting database.
    I guess I just had to wait 24h for the report manager to sync the info right?

    @Catalin Farcasanu, again, thanks a lot for the help.

    Cheers!