Spectrum OneClick SysUpTimeRenderer renderer does not properly render the snmpEngineTime attribute id 0x230c35

book

Article ID: 198283

calendar_today

Updated On:

Products

CA Spectrum CA eHealth

Issue/Introduction

Spectrum OneClick SysUpTimeRenderer renderer does not properly render the snmpEngineTime attribute id 0x230c35

The following entry was added to the table-model-config.xml file for the snmpEngineTime attribute id 0x230c35

<column>
   <name>SNMP Engine Time</name>
      <content>
        <attribute>0x230c35</attribute>
        <renderer>com.aprisma.spectrum.app.util.render.SysUpTimeRenderer</renderer>
      </content>
 </column>

However, the value displayed in the OneClick List tab is far to small.

 

Cause

The SysUpTimeRenderer renderer is specifically created to convert TimeTicks data type attributes like SysUpTime. The snmpEngineTime attribute id 0x230c35 is Integer not TimeTicks.

 

Environment

Release : Any

Component : Spectrum OneClick Customization

Resolution

Spectrum does not have a renderer that will convert an Integer data type to a date/time.

One possible solution is to create a SpectroWatch that reads in the value of the snmpEngineTime attribute 0x230c35 and multiply it by 100. Then use the SpectroWatch attribute in the table-model-config.xml file

The following are the details of a SpectroWatch created on the GnSNMPDev model type. 

Name Test_EngineTime
Developer ID 0xffff0000
Author ackjo04
Last Modified Time: Aug 27, 2020 4:13:12 PM EDT
Model Type GnSNMPDev
Data Type Integer
Expression ( snmpEngineTime * 100 )
Instance None
Active By Default Yes
Evaluate On Demand
Inheritable Yes
Threshold None

Note the watch attribute id of the new watch as this will then be used in the table-model-config.xml file.

For example, if the watch attribute id was 0xffff0000, then the entry in the table-model-config.xml file would be as follows:

<column>
   <name>SNMP Engine Time</name>
      <content>
        <attribute>0xffff0000</attribute>
        <renderer>com.aprisma.spectrum.app.util.render.SysUpTimeRenderer</renderer>
      </content>
 </column>

NOTE: The above watch was created on the GnSNMPDev model type with the Inheritable parameter set to Yes. The reason for this is most device models use the GnSNMPDev model type as a base model type. The "Inheritable" parameter tells Spectrum all models that use the GnSNMPDev model type as a base model type will inherit this watch by default. If this was not done, a separate watch would have to be done on multiple model types and the watch attribute id would be different for each model type.

Additional Information

Please reference the "Watches" and "OneClick Customization" sections of the documentation for more information.

Attachments