Fixed
Details
Assignee
Christian PapeChristian PapeReporter
Alejandro GalueAlejandro GalueComponents
Sprint
NoneFix versions
Affects versions
Priority
Minor
Details
Details
Assignee
Christian Pape
Christian PapeReporter
Alejandro Galue
Alejandro GalueComponents
Sprint
None
Fix versions
Affects versions
Priority
PagerDuty
PagerDuty
PagerDuty
Created November 26, 2018 at 9:47 PM
Updated March 11, 2019 at 10:32 PM
Resolved December 6, 2018 at 5:11 PM
Let's say I'd like to perform some event stress and execute the command like this:
events:stress -n 5 -i 192.168.205.10 -u uei.opennms.org/generic/traps/SNMP_Link_Down -j "ifIndex = math:floor(math:random() * 20).intValue()" -j "eb.addParam('.1.3.6.1.2.1.2.2.1.1.' + ifIndex, ifIndex)" -j "eb.addParam('.1.3.6.1.2.1.2.2.1.7.' + ifIndex, 1)" -j "eb.addParam('.1.3.6.1.2.1.2.2.1.8.' + ifIndex, 2)" -j "eb.setIfIndex(ifIndex)" -j
The generated events are not associated with any node or interface.
The workaround is using JEXL for everything (including node and interface); for example:
events:stress -u uei.opennms.org/generic/traps/SNMP_Link_Down -j "ifIndex = math:floor(math:random() * 20).intValue()" -j "eb.addParam('.1.3.6.1.2.1.2.2.1.1.' + ifIndex, ifIndex)" -j "eb.addParam('.1.3.6.1.2.1.2.2.1.7.' + ifIndex, 1)" -j "eb.addParam('.1.3.6.1.2.1.2.2.1.8.' + ifIndex, 2)" -j "eb.setIfIndex(ifIndex)" -j "eb.setService('SNMP')" -j "eb.setNodeid(1)" -j "eb.getEvent().setInterface('172.31.20.7')"