DX NetOps

Expand all | Collapse all

Container name available in alarms columns

Jump to Best Answer
  • 1.  Container name available in alarms columns

    Posted 04-06-2016 11:22 AM

    Hi friends ! Today Im adding the container name in alarms columns, why? because I will like to see from which container the alarm belong.

    I add the folowings xml into Spectrum/custom/alarm/config/

    • alarm-table-config.xml
    • TopologyModelNameString.xml

     

     

    alarm-table-config.xml

    <table idref="alarm-table-config">

      <column-list>

      <column idref="TopologyModelNameString"><hidden-by-default>true</hidden-by-default></column>

      </column-list>

    </table>

     

    TopologyModelNameString.xml

    <column id="TopologyModelNameString" xmlns ="http://www.aprisma.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:schemaLocation="http://www.aprisma.com                            ../../common/schema/column-config.xsd">

         <name>TopologyModelNameString</name>

              <content>

                   <attribute>0x129e7</attribute>

              </content>

    </column>

     

    This easily show the full PATH the device that generated the alarm, but the complex is show just the last container, wich is divided by ":" symbol. I try the split function and indexOf, but doesn't work.

    eg    "<![CDATA[ "  + attr(0x129e7).toString().split(":")  + "]]>"  or  attr(0x129e7).toString().substring(attr(0x129e7).toString().indexOf(':') + 4);

    I am not an expert in the syntax of java, but I now this is posible. Any help ? =)

     

    Thanks in advance !!!!

    Diego Pereyra



  • 2.  Re: Container name available in alarms columns
    Best Answer

    Broadcom Employee
    Posted 04-08-2016 05:25 AM

    Hi ,

    Add the below content inside <column-list> tag  in Spectrum/custom/alarm/config/alarm-table-config.xml and restart OC console .

     

     

     

    <column>

    <name>TopologyModelNameString</name>

    <content>

    <expression>

    ((String)attr(0x129e7)).substring(((String)attr(0x129e7)).lastIndexOf(':')+1)

    </expression>

    </content>

    </column>

     

     

     

    Note: If you are not seeing the expected results restart SpectroServer once , there seems to be some refresh issue

    Screen shot:



  • 3.  Re: Container name available in alarms columns

    Posted 04-19-2016 06:50 AM

    For all (like me), who start with an empty custom alarm-table-config.xml file:

    Don't forget these tags before the <column> tag, if you want to see anything.

    <table id="alarm-table-config" idref="alarm-table-config">

          <column-list>

     

    (And don't forget to close them)

     

    And one more test result:

    The container shown in the Alarm View will not  change, if you move the device to an other container during the alarm persists.

     

    With special thanks to my supporter w.wiesner



  • 4.  Re: Container name available in alarms columns

    Posted 04-18-2016 02:39 PM

    Thanks a LOT !