Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-5219

Threshold expressions for node-level metrics doesn't work on non SNMP Collectors

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Blocker
    • Resolution: Fixed
    • 1.8.13
    • 14.0.0
    • Security Level: Default (Default Security Scheme)
    • None
    • Linux CentOS release 5.5

    Description

      Here's our current config:

      capsd-configuration.xml:

      <protocol-plugin protocol="Oracle-SQL-orcl" class-name="org.opennms.netmgt.capsd.plugins.JDBCQueryPlugin" scan="on" user-defined="false">
      <property key="user" value="xxx"/>
      <property key="password" value="xxx"/>
      <property key="driver" value="oracle.jdbc.driver.OracleDriver"/>
      <property key="retry" value="1"/>
      <property key="timeout" value="5000"/>
      <property key="url" value="jdbc:oracle:thin:@OPENNMS_JDBC_HOSTNAME:1521:orcl"/>
      <property key="query" value="select * from dual"/>
      </protocol-plugin>

      collectd-configuration.xml:

      <package name="oracle-orcl-status">
      <filter>IPADDR != '0.0.0.0'</filter>
      <service name="Oracle-SQL-orcl" interval="300000"
      user-defined="false" status="on">
      <parameter key="jdbc-collection" value="oracle-orcl-status"/>
      <parameter key="collection" value="oracle-orcl-status"/>
      <parameter key="retry" value="2"/>
      <parameter key="timeout" value="2000"/>
      <parameter key="url" value="jdbc:oracle:thin:@OPENNMS_JDBC_HOSTNAME:1521:orcl"/>
      <parameter key="user" value="xxx"/>
      <parameter key="password" value="xxx"/>
      <parameter key="driver" value="oracle.jdbc.driver.OracleDriver"/>
      <parameter key="thresholding-enabled" value="true"/>
      </service>
      </package>
      <collector service="Oracle-SQL-orcl" class-name="org.opennms.netmgt.collectd.JdbcCollector"/>

      jdbc-datacollection-config.xml:

      <jdbc-collection name="oracle-orcl-status">
      <rrd step="300">
      <rra>RRA:AVERAGE:0.5:1:2016</rra>
      <rra>RRA:AVERAGE:0.5:12:1488</rra>
      <rra>RRA:AVERAGE:0.5:288:366</rra>
      <rra>RRA:MAX:0.5:288:366</rra>
      <rra>RRA:MIN:0.5:288:366</rra>
      </rrd>
      <queries>

      <query name="oraDictHit" ifType="all">
      <statement>
      <queryString>SELECT round((1 - (Sum(getmisses)/(Sum(gets) + Sum(getmisses)))) * 100,2) AS OraDictHit FROM v$rowcache</queryString>
      </statement>
      <columns>
      <column name="oraDictHit" data-source-name="oraDictHit" alias="oraDictHit" type="GAUGE"/>
      </columns>
      </query>
      ...

      threshd-configuration.xml:

      <package name="oracle-orcl-status">
      <filter>IPADDR != '0.0.0.0'</filter>
      <include-range begin="1.1.1.1" end="254.254.254.254"/>
      <service name="Oracle-SQL-orcl" interval="300000"
      user-defined="false" status="on">
      <parameter key="thresholding-group" value="oracle-orcl-status"/>
      </service>
      </package>

      thresholds.xml:

      <group name="oracle-orcl-status" rrdRepository="/opt/opennms/share/rrd/snmp/">
      <threshold type="low" ds-type="node" value="120.0" rearm="120.0"
      trigger="1" ds-label="oraDictHit"
      triggeredUEI="uei.opennms.org/DE/OraclePerfWarningTriggered"
      rearmedUEI="uei.opennms.org/DE/OraclePerfWarningRearmed"
      filterOperator="or" ds-name="oraDictHit"/>
      </group>

      events/programmatic.events.xml:

      <event>
      <uei>uei.opennms.org/DE/OraclePerfWarningTriggered</uei>
      <event-label>DE: OraclePerfWarningTriggered</event-label>
      <descr>Threshold exceeded for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]</descr>
      <logmsg dest="logndisplay">Threshold exceeded for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]%</logmsg>
      <severity>Warning</severity>
      </event>
      <event>
      <uei>uei.opennms.org/DE/OraclePerfWarningRearmed</uei>
      <event-label>DE: OraclePerfWarningRearmed</event-label>
      <descr>Threshold rearmed for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]</descr>
      <logmsg dest="logndisplay">Threshold rearmed for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]%</logmsg>
      <severity>Warning</severity>
      </event>

      The jrb files are there and the graphs look all pretty, but the thresholds do not trigger.

      Please advise.

      Thank you,
      Anton

      Attachments

        Activity

          People

            agalue Alejandro Galue
            guranto Anton Guryev (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: