opensearch-project / OpenSearch-Dashboards

📊 Open source visualization dashboards for OpenSearch.
https://opensearch.org/docs/latest/dashboards/index/
Apache License 2.0
1.66k stars 870 forks source link

[BUG] metricbeat dashboards fail to install #831

Open wyllys66 opened 3 years ago

wyllys66 commented 3 years ago

Attempting to install metricbeat (7.12.1) dashboards into the opensearch-dashboard fails due to the Kibana version check.

The workaround is to manually upload them with curl, for example:

curl -k -XPOST -u USER:PASSWORD -H "osd-xsrf: true" -H 'content-type: application/json' \
https://DASHBOARD-HOSTNAME:5601/api/opensearch-dashboards/dashboards/import?exclude=index-patterh\&force=true \
-d@/usr/share/metricbeat/kibana/7/dashboard/Metricbeat-system-overview.json

The command above appears to succeed (200 status), but the uploaded dashboards never show up in the "dashboards" section of the GUI and there are no errors in the logs indicating a problem.

Is there any guidance for installing the metricbeat dashboards to opensearch/opensearch-dashboard 1.0.1 ?

wyllys66 commented 3 years ago

I was mistaken. They are visible, but only in the private tenant exclusive to the user id that uploaded them.

Is there a way to make them globally available?

tmarkley commented 2 years ago

@ahopp can you respond here?

WilfriedMaillet commented 2 years ago

I have the same check issue on beats tools in version 7.10.2 : ERROR instance/beat.go:956 Exiting: Error importing Kibana dashboards: Kibana API is not available in Kibana version 1.1.0 In the OpenSearch Dashboards configuration, a configuration such as ' compatibility.override_main_response_version' available on OpenSearch for example, it should resolve this problem

JSkier21 commented 2 years ago

I was mistaken. They are visible, but only in the private tenant exclusive to the user id that uploaded them.

Is there a way to make them globally available?

What I did is export the saved objects from the private tenant dashboard (with all objects) in the gui, and then import that ndjson file into global tenant. It works perfectly.

tmarkley commented 2 years ago

939 includes some options to address this

charlielj88 commented 2 years ago

Hi @wyllys66 , how do you manage to call this import API? I tried for aws opensearch 1.2, but observed an error "no matches found: https://opensearch_url:443/_dashboards/api/opensearch-dashboards/dashboards/import?exclude=index-patterh&force=true"

I could not find any documentation on this "api/opensearch-dashboards/dashboards/import" API as well.

opoplawski commented 2 years ago

Filebeat 7.17.3 suricata dashboards:

curl -XPOST -u admin -H 'osd-xsrf: true' -H 'Content-Type: application/json' 'https://FQDN:5601/api/opensearch-dashboards/dashboards/import?exclude=index-pattern&force=true' -d@/usr/share/filebeat/kibana/7/dashboard/filebeat-suricata-event-overview.json
{"statusCode":400,"error":"Bad Request","message":"[request body.objects]: expected value of type [array] but got [undefined]"}

I suspect one would need to import the related visualizations first but I have no idea how to do that.