Skip to content

Commit

Permalink
Align with existing search-quality-evaluation-dashboards patterns
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Pugh <epugh@opensourceconnections.com>
Signed-off-by: Alexey Rodriguez Yakushev <alexey.rodriguez@gmail.com>
  • Loading branch information
epugh authored and alexeyrodriguez committed Dec 17, 2024
1 parent 6b3df3b commit ec207e2
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 23 deletions.
4 changes: 0 additions & 4 deletions dashboards/README.md

This file was deleted.

19 changes: 0 additions & 19 deletions dashboards/install_dashboards.sh

This file was deleted.

9 changes: 9 additions & 0 deletions ubi-dashboards/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

# How to load dashboards into your OpenSearch installation

This assumes that you have already have UBI data and the `ubi_queries` index created.
See the `ubi-data-generator` tool to generate data.

Run the following shell script: `./install_dashboards.sh http://localhost:9200 http://localhost:5601`

* `ubi_dashboard.ndjson` represents the UBI Dashboards needed to analyze and understand the data.
26 changes: 26 additions & 0 deletions ubi-dashboards/install_dashboards.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

# Ansi color code variables
ERROR='\033[0;31m'
MAJOR='\033[0;34m'
MINOR='\033[0;37m '
RESET='\033[0m' # No Color

opensearch=$1
opensearch_dashboard=$2
set -eo pipefail

if [ -z "$opensearch" ]; then
echo "Error: please pass in both the opensearch url and the opensearch dashboard url"
exit 1
fi
if [ -z "$opensearch_dashboard" ]; then
echo "Error: please pass in both the opensearch url and the opensearch dashboard url"
exit 1
fi

echo "${MAJOR}Using Open Search and Open Search Dashboards at $opensearch and $opensearch_dashboard respectively.${RESET}"

echo "${MAJOR}\nInstalling Quality Evaluation Framework Dashboards${RESET}"
curl -X POST "http://$opensearch_dashboard/api/saved_objects/_import?overwrite=true" -H "osd-xsrf: true" --form file=@ubi_dashboard.ndjson > /dev/null

echo "${MAJOR}The UBI Dashboards were successfully installed${RESET}"
File renamed without changes.

0 comments on commit ec207e2

Please sign in to comment.