From d67ba6bc387c06ab3e0c8723ec73d6bab7b3faf0 Mon Sep 17 00:00:00 2001 From: Julien Nioche Date: Tue, 12 Dec 2023 15:28:18 +0000 Subject: [PATCH] import Kibana script work from anywhere, fix #1136 Signed-off-by: Julien Nioche --- .../resources/archetype-resources/kibana/importKibana.sh | 8 +++++--- .../stormcrawler/opensearch/OpenSearchConnection.java | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/external/elasticsearch/archetype/src/main/resources/archetype-resources/kibana/importKibana.sh b/external/elasticsearch/archetype/src/main/resources/archetype-resources/kibana/importKibana.sh index 22b94a77c..f0a2edb50 100755 --- a/external/elasticsearch/archetype/src/main/resources/archetype-resources/kibana/importKibana.sh +++ b/external/elasticsearch/archetype/src/main/resources/archetype-resources/kibana/importKibana.sh @@ -1,12 +1,14 @@ #!/bin/sh +BIN=$(dirname $0) + echo "Importing status dashboard into Kibana" -curl -X POST "localhost:5601/api/saved_objects/_import" -H "kbn-xsrf: true" --form file=@status.ndjson +curl -X POST "localhost:5601/api/saved_objects/_import" -H "kbn-xsrf: true" --form file=@$BIN/status.ndjson echo "" echo "Importing metrics dashboard into Kibana" -curl -X POST "localhost:5601/api/saved_objects/_import" -H "kbn-xsrf: true" --form file=@metrics.ndjson +curl -X POST "localhost:5601/api/saved_objects/_import" -H "kbn-xsrf: true" --form file=@$BIN/metrics.ndjson echo "" # Storm internal metrics -# curl -X POST "localhost:5601/api/saved_objects/_import" -H "kbn-xsrf: true" --form file=@storm.ndjson +# curl -X POST "localhost:5601/api/saved_objects/_import" -H "kbn-xsrf: true" --form file=@$BIN/storm.ndjson diff --git a/external/opensearch/src/main/java/com/digitalpebble/stormcrawler/opensearch/OpenSearchConnection.java b/external/opensearch/src/main/java/com/digitalpebble/stormcrawler/opensearch/OpenSearchConnection.java index c39e5e947..8a2685e6a 100644 --- a/external/opensearch/src/main/java/com/digitalpebble/stormcrawler/opensearch/OpenSearchConnection.java +++ b/external/opensearch/src/main/java/com/digitalpebble/stormcrawler/opensearch/OpenSearchConnection.java @@ -181,7 +181,7 @@ public static RestHighLevelClient getClient(Map stormConf, Strin nodes -> { for (Node node : nodes) { LOG.debug( - "Connected to ES node {} [{}] for {}", + "Connected to OpenSearch node {} [{}] for {}", node.getName(), node.getHost(), boltType);