Skip to:
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
The solution for 1.13 (master branch) was a little bit different, but I've merged the change on revision f23d272384f826113322c6582ae4b420f9b96c86
Chris, you're welcome, and thanks for your help.
Many thanks! This is great news
The fix has been applied for JdbcCollector, XmlCollector and WmiCollector.
SnmpCollector, JmxCollector, TcaCollector, NsclientCollector, XmpCollector and VmwareCollector are not exposing this problem.
The HttpCollector might have this issue but the code is very complex so I decided ignore this one.
Fixed on revision b3b7c1f3ad85c7aee3576055871d3c4f499adbf8 for 1.12.
The fix for 1.13.5 will be committed soon.
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