How to display the TopologyModelNameString as a column in the Spectrum OneClick Alarms tab

Document ID : KB000045276
Last Modified Date : 14/02/2018
Show Technical Document Details

INTRODUCTION: I would like to display the value of the TopologyModelNameString attribute 0x12937 in a column in the Spectrum OneClick Alarms tab. In addition, if the model resides inside a container that is located within another container, I would like to display only the last container in the list as this would be the actual container the model resides in. For example, if the container the model resides in is named "MPLS-VPN" which is located within the Universe topology, the value of the TopologyModelNameString attribute 0x12937 would be "Universe:MPLS-VPN". I would like to display only "MPLS-VPN" in the column.

This document discusses how to display the TopologyModelNameString as a column in the Spectrum OneClick Alarms tab.

 

INSTRUCTIONS: Do the following on the OneClick system:

1. Copy the $SPECROOT/tomcat/webapps/spectrum/WEB-INF/alarm/config/alarm-table-config.xml file to the $SPECROOT/custom/alarm/config directory

2. Create a new xml file in the $SPECROOT/custom/alarm/config directory for the information that will display the TopologyModelNameString attribute 0x12937 in a column in the Spectrum OneClick Alarms tab. The following will be the contents of the file:

<?xml version="1.0" encoding="UTF-8"?>

<!--

   CA Technologies, Inc.

   One CA Plaza

   Islandia, NY 11749 USA

 

   Copyright (c) 2004 CA Technologies, Inc.

   All rights reserved.

 

   IN NO EVENT SHALL CA TECHNOLOGIES INCORPORATED BE LIABLE FOR

   ANY INCIDENTAL, INDIRECT, SPECIAL, OR CONSEQUENTIAL DAMAGES

   WHATSOEVER (INCLUDING BUT NOT LIMITED TO LOST PROFITS) ARISING OUT

   OF OR RELATED TO THIS SOFTWARE, EVEN IF CA TECHNOLOGIES INCORPORATED

   HAS BEEN ADVISED OF, KNOWN, OR SHOULD HAVE KNOWN, THE POSSIBILITY OF

   SUCH DAMAGES.

-->

<!--

-->

 

<column id="column-toponamestring-config"

        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>

     <expression>

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

     </expression>

   </content>

</column>

3. Edit the $SPECROOT/custom/alarm/config/alarm-table-config.xml file and add the new xml file created in step 2 above. In the following example, I created a file called column-toponamestring-config.xml:

 

    <column idref="column-sourceowner-config">

      <hidden-by-default>true</hidden-by-default>

      <default-width>160</default-width>

    </column>

 

    <column idref="column-toponamestring-config">

      <hidden-by-default>true</hidden-by-default>

      <default-width>160</default-width>

    </column>

 

4. Log out of OneClick and log back in. Click on the Alarms tab. Right mouse click on any column header and check the box for the TopologyModelNameString. The value of the TopologyModelNameString attribute 0x12937 should now be displayed in a column in the Spectrum OneClick Alarms tab.

TopoNameString_1.png