Thresholding - Absolutechange stored as floating-point value

Description

When I create a AbsoluteChange threshold in the tresholding gui and enter for example 5 as a value then the value that goes into the configuration file is "5.0"

When this is configured like this it seems like i get a notification on every value change.
For example this threshold was triggered.
parms: label="Unknown" ds="upsOutputCurrent1" value="65" instance="null" changeThreshold="5.0" previousValue="67"

absoluteChange works though when I change the value manually in the thresholding.xml to be "5" instead of "5.0"

Environment

Operating System: All Platform: PC

Acceptance / Success Criteria

None

Attachments

1

Lucidchart Diagrams

Activity

Alejandro Galue September 16, 2011 at 7:03 PM

As I was not able to reproduce the problem I'll close this issue.

If you are able to reproduce the problem with a recent version of OpenNMS, please reopen this issue and attach logs, screenshots and all information you can provide in order to help me fix the problem.

Last tests:

I've manually changed the value for the threshold configuration from 10.0 to 10. I've sent the proper event to reload the configuration and everything still works as expected. I've restarted OpenNMS and everything is still working as expected.

I tested the same configuration using latest snapshot for 1.8.15 and it also works as expected.

Alejandro Galue September 16, 2011 at 6:41 PM

Here is the configuration of the threshold used on my experiments:

Here is when the event was generated:

As you can see the value is 85 but is used as 85.0 when the threshold processing is executed. The reason is because every number is converted to Double before performing threshold calculations.

Alejandro Galue September 16, 2011 at 6:35 PM

Check the screenshot.

I configured the data collection using HttpCollector to be executed every 30 seconds. I'm able to control the content of the target page and I can set the value that will be used in the thresholds to whatever I want.

I changed the value many times, but only two of them meet the condition to generate the event.

What am I missing?

Alejandro Galue November 10, 2010 at 1:35 PM

Can you provide the thresholds configuration files? It will also be great if you can set DEBUG for COLLECTD on log4j.properties and give me the log message related to thresholds.

I'm trying to reproduce the problem, but it seems to work for me (from junit testing point of view).

Cannot Reproduce

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

PagerDuty

Created July 28, 2010 at 5:35 AM
Updated January 27, 2017 at 4:26 PM
Resolved September 16, 2011 at 7:03 PM