Update Elasticsearch integrations to support ES 7.x
Description
There are a number of breaking changes in ES 7.x that make it such that our integrations no longer work.
The problems include:
Moving the "total" count in the response from a number to an object
Index mapping changes
The deep-dive URL for flows fails with:
URL: /opennms/rest/flows/flowGraphUrl?end=1559675530618&exporterNode=1&ifIndex=2&limit=0&start=1559589130618 Repsonse: 500 Failed to execute query: java.lang.UnsupportedOperationException: JsonObject
Exception: Caused by: java.lang.UnsupportedOperationException: JsonObject at com.google.gson.JsonElement.getAsLong(JsonElement.java:231) ~[?:?] at io.searchbox.core.SearchResult.getTotal(SearchResult.java:205) ~[?:?] at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:642) ~[?:?] at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[?:?] at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073) ~[?:?] at org.opennms.netmgt.flows.elastic.ElasticFlowRepository$1.completed(ElasticFlowRepository.java:703) ~[?:?] at org.opennms.netmgt.flows.elastic.ElasticFlowRepository$1.completed(ElasticFlowRepository.java:697) ~[?:?] at io.searchbox.client.http.JestHttpClient$DefaultCallback.completed(JestHttpClient.java:267) ~[?:?] at io.searchbox.client.http.JestHttpClient$DefaultCallback.completed(JestHttpClient.java:246) ~[?:?]
And other features fail to push any data into the indices since the index templates cannot be initialized.
There are a number of breaking changes in ES 7.x that make it such that our integrations no longer work.
The problems include:
Moving the "total" count in the response from a number to an object
Index mapping changes
The deep-dive URL for flows fails with:
URL: /opennms/rest/flows/flowGraphUrl?end=1559675530618&exporterNode=1&ifIndex=2&limit=0&start=1559589130618
Repsonse: 500
Failed to execute query: java.lang.UnsupportedOperationException: JsonObject
Exception:
Caused by: java.lang.UnsupportedOperationException: JsonObject
at com.google.gson.JsonElement.getAsLong(JsonElement.java:231) ~[?:?]
at io.searchbox.core.SearchResult.getTotal(SearchResult.java:205) ~[?:?]
at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:642) ~[?:?]
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[?:?]
at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073) ~[?:?]
at org.opennms.netmgt.flows.elastic.ElasticFlowRepository$1.completed(ElasticFlowRepository.java:703) ~[?:?]
at org.opennms.netmgt.flows.elastic.ElasticFlowRepository$1.completed(ElasticFlowRepository.java:697) ~[?:?]
at io.searchbox.client.http.JestHttpClient$DefaultCallback.completed(JestHttpClient.java:267) ~[?:?]
at io.searchbox.client.http.JestHttpClient$DefaultCallback.completed(JestHttpClient.java:246) ~[?:?]
And other features fail to push any data into the indices since the index templates cannot be initialized.