Threshold filter

Hi, thank you for responsing so many my question.

here is another one: I got a setting of threshd-configuration.xml like this:

and I have a node like this:

according to my assumption, it should implement the package name 289, but the result is:

(I checked the thresholds.xml by adding the tag in description)

I tried to reload /opt/opennms/bin/send-event.pl uei.opennms.org/internal/reloadDaemonConfig --parm 'daemonName Threshd' every time I tweaked the XML and also tried to restart OpenNMS once, but it doesn’t fix my problem.

First of all, you can use the “Reload Threshold Configuration” button on the “Admin” → “Configure Thresholds” page. It takes care of reloading the configuration.

I wasn’t really figuring out from your description what is not working as expected. The “thresholds.xml” snippet is a screenshot and I wasn’t able to figure out what you are trying to achieve. The Event you shared is about an interface discard threshold and the snippet is about hrSystemNumUsers. Can you elaborate a bit more on what you try to achieve?

Hi,

This is the detail of threshold.xml

   <group name="289" rrdRepository="/opt/opennms/share/rrd/snmp/">
      <threshold description="289:hrSystemNumUsers is more than 1" type="high" ds-type="node" value="1.0" rearm="1.0" trigger="1" filterOperator="OR" ds-name="hrSystemNumUsers"/>
      <expression description="289:Trigger an alert if one or more incoming or outgoing packets on an interface were not transmitted due to error for two consecutive measurement intervals" type="high" ds-type="if" value="1.0" rearm="0.0" trigger="2" ds-label="ifName" filterOperator="OR" expression="ifInErrors + ifOutErrors"/>
      <expression description="289:Trigger an alert if one or more incoming or outgoing packets on an interface were discarded even though no errors were detected (possibly to free up buffer space) for two consecutive measurement intervals" type="high" ds-type="if" value="1.0" rearm="0.0" trigger="2" ds-label="ifName" filterOperator="OR" expression="ifInDiscards + ifOutDiscards"/>
   </group>
   <group name="288" rrdRepository="/opt/opennms/share/rrd/snmp/">
      <threshold description="288:hrSystemNumUsers is more than 1" type="high" ds-type="node" value="1.0" rearm="1.0" trigger="1" filterOperator="OR" ds-name="hrSystemNumUsers"/>
      <expression description="288:Trigger an alert if one or more incoming or outgoing packets on an interface were not transmitted due to error for two consecutive measurement intervals" type="high" ds-type="if" value="1.0" rearm="0.0" trigger="2" ds-label="ifName" filterOperator="OR" expression="ifInErrors + ifOutErrors"/>
      <expression description="288:Trigger an alert if one or more incoming or outgoing packets on an interface were discarded even though no errors were detected (possibly to free up buffer space) for two consecutive measurement intervals" type="high" ds-type="if" value="1.0" rearm="0.0" trigger="2" ds-label="ifName" filterOperator="OR" expression="ifInDiscards + ifOutDiscards"/>
   </group>

This is threshd-configuration.xml

   <package name="289">
      <filter>(categoryName == 'snmp1' &amp; foreignSource == 'yue-VM1')</filter>
      <include-range begin="1.1.1.1" end="254.254.254.254"/>
      <include-range begin="::1" end="ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"/>
      <service name="SNMP" interval="300000" user-defined="false" status="on">
         <parameter key="thresholding-group" value="289"/>
      </service>
   </package>
      <package name="288">
      <filter>(categoryName == 'snmp2' &amp; foreignSource == 'yue-VMs')</filter>
      <include-range begin="1.1.1.1" end="254.254.254.254"/>
      <include-range begin="::1" end="ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"/>
      <service name="SNMP" interval="300000" user-defined="false" status="on">
         <parameter key="thresholding-group" value="288"/>
      </service>
   </package>

I am trying to achieve the node thresholding with the correct package.

Can I do “Reload Threshold Configuration” with an API?