Details
Assignee
UnassignedUnassignedReporter
Alejandro GarcíaAlejandro GarcíaHB Grooming Date
Aug 15, 2023HB Backlog Status
BacklogComponents
Affects versions
Priority
Trivial
Details
Details
Assignee
Unassigned
UnassignedReporter
Alejandro García
Alejandro GarcíaHB Grooming Date
Aug 15, 2023
HB Backlog Status
Backlog
Components
Affects versions
Priority
PagerDuty
PagerDuty
PagerDuty
Created July 3, 2023 at 7:25 PM
Updated August 23, 2023 at 2:02 PM
Hi team. We’re using OpenNMS 30.0.1 with Elasticsearch 7.17.3. We are using Elasticsearch REST integration for events and alarms history, and have noticed that, sometimes, the index created in Elasticsearch might have an incorrect mapping of the date-type fields.
For what we have seen, since timestamps are pushed to Elasticsearch in an epoch format, the resulting index mapping can sometimes be wrongly created with a
long
field type instead of adate
one. This results in a mapping conflict from Elastic point of view, as some fields like@first_event_time
or@last_event_time
will be treated likelong
numbers instead of dates. Even worse, this can turn Kibana’s discover function useless, as its histogram won’t be able to be rendered using a non-date field.We have been able to work around the problem by manually set an index mapping enforcing the
date
fields. Would there be a way to have OpenNMS enforce this mapping against Elasticsearch? Or perhaps it is already doing it but there’s something else going on with our environment?I’m attaching the Elastic index mappings before and after enforcing the
date
type field.