Thresholdvalue in scientific notation not displayed/stored correctly

Description

Thresholding with scientific notation such as 1.0E-6 works but threshold-value is not stored correctly in database:

Debug-Output from collectd:
DEBUG [CollectdScheduler-50 Pool-fiber1] SnmpAttribute: Visiting attribute node[23].interfaceSnmp[Radio_Interface__0].CerRfuStatRadioBER [.1.3.6.1.4.1.2281.10.5.1.1.5] = 1e-6
DEBUG [CollectdScheduler-50 Pool-fiber1] CollectorThresholdingSet: hasThresholds: if@CerRfuStatRadioBER? true
DEBUG [CollectdScheduler-50 Pool-fiber1] ThresholdingVisitor: visitAttribute: storing value 1.0E-6 for attribute named CerRfuStatRadioBER
INFO [CollectdScheduler-50 Pool-fiber1] CollectorThresholdingSet: applyThresholds: Processing threshold CerRfuStatRadioBER : {evaluator=high, dsName=CerRfuStatRadioBER, dsType=if, evaluators=[{ds=CerRfuStatRadioBER, value=1.0E-6, rearm=1.0E-13, trigger=1}]}

corresponding eventparms in database
"ifLabel=Radio_Interface_0(string,text);ifIndex=1(string,text);label=Radio_Interface_0(string,text);ds=CerRfuStatRadioBER(string,text);value=?(string,text);instance=1(string,text);trigger=1(string,text);rearm=1.0E-13(string,text);threshold=1.0E-6(string,text);reason=Configuration has been changed(string,text)"

Version: 1.8.3
Server Time: Fri Sep 10 09:03:04 CEST 2010
Client Time: Fri Sep 10 2010 09:03:04 GMT+0200
Java Version: 1.6.0_12 Sun Microsystems Inc.
Java Virtual Machine: 11.2-b01 Sun Microsystems Inc.
Operating System: Linux 2.6.26-2-686 (i386)
Servlet Container: jetty/6.1.24 (Servlet Spec 2.5)
User Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.9) Gecko/20100824 Firefox/3.6.9 GTB7.1 (.NET CLR 3.5.30729)

Environment

Operating System: All Platform: PC

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Alejandro Galue August 5, 2011 at 3:55 PM

If you check the solution of https://opennms.atlassian.net/browse/NMS-3473#icft=NMS-3473, you will see that there is a global variable called:

org.opennms.threshd.value.decimalformat

This variable has the following default value: "##.##". If you check the documentation of DecimalFormat, you will see that in order to use properly the scientific notation, you should change it to something like this:

##.##E0

From that point, the value will be expresed in scientific notation for all Threshold Events.

You should put this variable on opennms.properties. After manually modify that file, you should restart OpenNMS.

I will update the default content of opennms.properties in order to reflect the proper usage of this variable.

9e37ac976d740017665a8ed4bd50c1bfb7ed7e79 for 1.10
50e7b31daf34043997538be7142709570d71530a for 1.8

Won't Fix

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

PagerDuty

Created September 10, 2010 at 3:08 AM
Updated January 27, 2017 at 4:26 PM
Resolved August 5, 2011 at 3:55 PM

Flag notifications