<thresholddescription="ifInErrors auf Backbone-Port"type="high"ds-type="if"value="0.0001"rearm="0.0"trigger="1"ds-label="ifName"triggeredUEI="uei.example.org/threshold/BackboneIfInErrorsExceeded"rearmedUEI="uei.example.org/threshold/BackboneIfInErrorsRearmed"filterOperator="or"ds-name="ifInErrors"><resource-filterfield="snmpifspeed">^[1-9]+[0-9]{10,12}$</resource-filter></threshold>
Up to something less than 10 GBit/s it seems to be working using <resource-filter field="snmpifspeed">^[1-9]+[0-9]{0,9}$</resource-filter> but maybe we miss some interfaces, see explanation below.
We turned DEBUG level loging on for collectd. From collectd:
fgrep "value of snmpifspeed is" collectd.log* | cut -d: -f6 | sed -e"s/ the value of snmpifspeed is //" | sort -u
But no negavite values appear in snmpinterface.snmpifspeed in the database.
Environment
Any system with 10Gbps interfaces represented in the snmpinterface table and thresholds configured with "snmpifspeed" as the attribute in a resource-filter
Acceptance / Success Criteria
None
Lucidchart Diagrams
Activity
Jeff Gehlbach August 18, 2014 at 3:57 PM
Pushed fix to master, cherry-picked to 1.12.
Jeff Gehlbach August 18, 2014 at 3:54 PM
I tracked this down to org.opennms.netmgt.collectd.SnmpIfData, whose method nullSafeUnbox(Long num, int dflt) incorrectly returns the result of num.intValue() whenever num is non-null. Changing this method to take (Long, long) and to return the result of num.longValue() in the non-null case resolves the problem on my own system.
Created from support ticket https://mynms.opennms.com/Ticket/Display.html?id=3217
Sanitized details from that ticket:
<threshold description="ifInErrors auf Backbone-Port" type="high" ds-type="if" value="0.0001" rearm="0.0" trigger="1" ds-label="ifName" triggeredUEI="uei.example.org/threshold/BackboneIfInErrorsExceeded" rearmedUEI="uei.example.org/threshold/BackboneIfInErrorsRearmed" filterOperator="or" ds-name="ifInErrors"> <resource-filter field="snmpifspeed">^[1-9]+[0-9]{10,12}$</resource-filter> </threshold>
But no negavite values appear in snmpinterface.snmpifspeed in the database.