All work

Select view

Select search mode

 
29 of 29

Events & alarms are only granular to one second

Description

The events and alarms are inserted with a 1 second precision. PostgreSQL can manage resolution up to the microsecond on a type "datetime". Java can probably provide microsecond or millisecond timing as well.

The problem is with the cosmic-clear automation, 2 events that occured on the same second are not correlated because anteriority (problem occured before solver) cannot be determined for sure.

I'm going to try a workaround using eventid/alarmid to know which occured first but it's going to be ugly

Environment

Operating System: Linux Platform: PC

Acceptance / Success Criteria

None

Lucidchart Diagrams

Details

Assignee

Reporter

Affects versions

Priority

PagerDuty

Created January 18, 2010 at 11:09 AM
Updated October 27, 2021 at 12:45 PM

Activity

Show:

Will KeaneyJuly 1, 2019 at 2:50 PM

I don't have access to a H23 database, but the demo.opennms.org web UI running H24.1.1 is still displaying granularity to the second.

Michael BatzJuly 1, 2019 at 2:25 PM

This seems to be fixed in Horizon 23.

Seth LegerMarch 31, 2015 at 1:43 PM

I did some work on this for OpenNMS 16. I changed the type for the timestamps in an event to java.util.Date from java.lang.String. However, to handle milliseconds correctly, we need to use a custom datestamp format for the XML serialization that includes a millisecond field. Right now, we are using DateFormat.FULL which does not include milliseconds.

Deferring this work to 17.

Jeff GehlbachDecember 18, 2013 at 10:39 AM

This issue is the problem underlying commercial support ticket https://mynms.opennms.com/Ticket/Display.html?id=2680 and at least one other such ticket.

Seth LegerFebruary 16, 2012 at 3:37 PM

After looking at this code recently, I agree with Phillippe. We need to convert the data type of all of the timestamp fields to be proper Java Date objects instead of strings. None of the DateFormat String formats include the milli- or microsecond values in the string. This should be easy to do in master for inclusion in the next unstable phase of development. Targeting for 1.11.