Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-10904

Event and alarm templates fail with Elasticsearch 6.x

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 22.0.0
    • Fix Version/s: 22.0.0
    • Component/s: None
    • Security Level: Default (Default Security Scheme)
    • Labels:
    • Sprint:
      Horizon - March 21st 2018, Horizon - April 4th 2018

      Description

      When using ES 6.x, inserting the ES templates fails with:

      2018-04-02T16:48:29,435 ERROR org.opennms.features.jest.client:22.0.0.SNAPSHOT(219) [AggregatorFlush-org.opennms.plugins.elasticsearch.rest.EventForwarderQueueImpl$EventIndexProducer] org.opennms.plugins.elasticsearch.rest.template.DefaultTemplateInitializer: An error occurred while initializing template eventsindextemplate: Template 'eventsindextemplate' could not be persisted. Reason: {"root_cause":[{"type":"mapper_parsing_exception","reason":"No handler for type [string] declared on field [logmsg]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [_default_]: No handler for type [string] declared on field [logmsg]","caused_by":{"type":"mapper_parsing_exception","reason":"No handler for type [string] declared on field [logmsg]"}}.
      java.lang.IllegalStateException: Template 'eventsindextemplate' could not be persisted. Reason: {"root_cause":[{"type":"mapper_parsing_exception","reason":"No handler for type [string] declared on field [logmsg]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [_default_]: No handler for type [string] declared on field [logmsg]","caused_by":{"type":"mapper_parsing_exception","reason":"No handler for type [string] declared on field [logmsg]"}}
              at org.opennms.plugins.elasticsearch.rest.template.DefaultTemplateInitializer.doInitialize(DefaultTemplateInitializer.java:112) [219:org.opennms.features.jest.client:22.0.0.SNAPSHOT]
              at org.opennms.plugins.elasticsearch.rest.template.DefaultTemplateInitializer.initialize(DefaultTemplateInitializer.java:77) [219:org.opennms.features.jest.client:22.0.0.SNAPSHOT]
              at org.opennms.plugins.elasticsearch.rest.EventForwarderQueueImpl$EventIndexProducer.dispatch(EventForwarderQueueImpl.java:122) [226:org.opennms.features.opennms-es-rest:22.0.0.SNAPSHOT]
              at org.opennms.plugins.elasticsearch.rest.EventForwarderQueueImpl$EventIndexProducer.dispatch(EventForwarderQueueImpl.java:107) [226:org.opennms.features.opennms-es-rest:22.0.0.SNAPSHOT]
              at org.opennms.core.ipc.sink.aggregation.Aggregator.run(Aggregator.java:189) [187:org.opennms.core.ipc.sink.common:22.0.0.SNAPSHOT]
              at org.opennms.core.ipc.sink.aggregation.Aggregator$1.run(Aggregator.java:104) [187:org.opennms.core.ipc.sink.common:22.0.0.SNAPSHOT]
              at java.util.TimerThread.mainLoop(Timer.java:555) [?:?]
              at java.util.TimerThread.run(Timer.java:505) [?:?]
      

      Before the refactoring made in features/drift, the template insertion used to fail, and then move on, but with the new code, events and alarms do not get inserted until the template is successfully pushed.

      Since we require ES 6.x for the Drift related features, we should ensure that the template works with that version too.

        Attachments

          Activity

            People

            • Assignee:
              j-white Jesse White
              Reporter:
              sean Sean Torres
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: