Threshold event parameter data source and formatting questions

#1

I’m working on an SNMP threshold monitor for Sonus 5000 devices using the APC ambient temperature example from the FAQ as a guide.

Basic functionality (data collection, threshold event, alarm) is working, but I’m having trouble with event parameters.

I used %parm[all]% in my event logmsg to show the list of event parameters:

label=“Unknown”
ds=“InvalidOutboundCall”
description=“Trigger an alert when Sonus outbound call failures exceed threshold”
value=“3”
instance=“7.100.101.102.97.117.108.116.9.69.88.84.69.82.78.65.76.50.11.66.84.95.71.83.73.80.95.82.101.100”
instanceLabel=“7.100.101.102.97.117.108.116.9.69.88.84.69.82.78.65.76.50.11.66.84.95.71.83.73.80.95.82.101.100”
resourceType=“ZoneCallFailCurrStatsEntry”
resourceId=“node[5].ZoneCallFailCurrStatsEntry[7.100.101.102.97.117.108.116.9.69.88.84.69.82.78.65.76.50.11.66.84.95.71.83.73.80.95.82.101.100]”
threshold=“2.0”
trigger=“1”
rearm=“0.0”

My problems/questions are:

  1. My Label parameter is coming through as “unknown”. I thought (hoped) it would be set to resourceLabel from the data collection resource type definition. Does anyone know the data source for this parameter?
  2. Instance, instanceLabel and resourceId are coming through as ascii character codes instead of readable text. Is there a way to format the ascii character codes as readable text in event definitions along the lines of using string(index) functions in the data collection resource type definitions?

For completeness my data collection and threshold definitions are below:

Data collection def:

<datacollection-group xmlns="http://xmlns.opennms.org/xsd/config/datacollection" name="Sonus-Address-Context">
   <resourceType name="ZoneCallFailCurrStatsEntry" label="ZoneCallFailCurrStatsEntry" resourceLabel="${string(subIndex(0,n))} - ${string(subIndex(n,n))} - ${string(subIndex(n,n))}">
      <persistenceSelectorStrategy class="org.opennms.netmgt.collection.support.PersistAllSelectorStrategy"/>
      <storageStrategy class="org.opennms.netmgt.collection.support.IndexStorageStrategy"/>
   </resourceType>
   <group name="ZoneCallFailCurrStatsTable" ifType="all">
      <mibObj oid=".1.3.6.1.4.1.2879.2.10.2.103.1.1" instance="ZoneCallFailCurrStatsEntry" alias="TrunkGroupName" type="octetstring"/>
      <mibObj oid=".1.3.6.1.4.1.2879.2.10.2.103.1.12" instance="ZoneCallFailCurrStatsEntry" alias="InvalidOutboundCall" type="integer"/>
   </group>
   <systemDef name="Sonus SBC 5000">
      <sysoid>.1.3.6.1.4.1.2879.1.9.3</sysoid>
      <collect>
         <includeGroup>ZoneCallFailCurrStatsTable</includeGroup>
      </collect>
   </systemDef>
</datacollection-group>

Threshold def:

<group name="sonus5k" rrdRepository="I:/OpenNMS/share/rrd/snmp/">
   <threshold description="Trigger an alert when Sonus outbound call failures exceed threshold" type="high" ds-type="ZoneCallFailCurrStatsEntry" value="2.0" rearm="0.0" trigger="1" ds-label="TrunkGroupName" triggeredUEI="uei.opennms.org/sonus/outbound-call-failure" rearmedUEI="uei.opennms.org/sonus/outbound-call-failure-rearm" filterOperator="OR" ds-name="InvalidOutboundCall"/>
</group>

Thanks,
Dave

0 Likes

#2

Looks like the system did not like my data collection and threshold xml text did not come through in my previous post. I’ll try and figure out how to post it if it proves necessary.

Dave

0 Likes

#3

Fixed your XML formatting in your post enclosing it with a code block and set the highlighter to XML, see here:

```xml
<xml name="my">foo bar</xml>
```
0 Likes

#4

I’m giving up on this approach. There doesn’t appear to be a path forward on the data collection side.
Maybe because the OIDs with the resource names is set to “not-accessible” in the MIB.

0 Likes

#5

I was able to push this over the finish line using the event translator and a custom plperl stored function to parse the ascii codes into a readable string.

There’s always a way :^)

1 Like