From 06f276ccdfe4f5bf6df475f268083a4ac2b021b4 Mon Sep 17 00:00:00 2001 From: harriseldon Date: Tue, 19 Feb 2019 22:11:27 -0600 Subject: [PATCH] Update ingest.sh Machine Learning Fix Issue #246 When extracting the archive per the readme, it extracts into a subdirectory called files. This commit updates the curl scripts to use the relative path @files/ to reference the files. --- .../server_metrics/ingest-data.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Machine Learning/Getting Started Examples/server_metrics/ingest-data.sh b/Machine Learning/Getting Started Examples/server_metrics/ingest-data.sh index 69cf9aa7..635f16ab 100755 --- a/Machine Learning/Getting Started Examples/server_metrics/ingest-data.sh +++ b/Machine Learning/Getting Started Examples/server_metrics/ingest-data.sh @@ -49,13 +49,13 @@ curl -s -u ${USERNAME}:${PASSWORD} -X PUT -H 'Content-Type: application/json' $ }' printf "\n== Bulk uploading data to index... \n" -curl -s -u ${USERNAME}:${PASSWORD} -X POST -H "Content-Type: application/json" ${URL}/${INDEX_NAME}/_bulk --data-binary "@server-metrics_1.json" > server-metrics_1.out 2>&1 +curl -s -u ${USERNAME}:${PASSWORD} -X POST -H "Content-Type: application/json" ${URL}/${INDEX_NAME}/_bulk --data-binary "@files/server-metrics_1.json" > server-metrics_1.out 2>&1 printf "\nServer-metrics_1 uploaded" -curl -s -u ${USERNAME}:${PASSWORD} -X POST -H "Content-Type: application/json" ${URL}/${INDEX_NAME}/_bulk --data-binary "@server-metrics_2.json" > server-metrics_2.out 2>&1 +curl -s -u ${USERNAME}:${PASSWORD} -X POST -H "Content-Type: application/json" ${URL}/${INDEX_NAME}/_bulk --data-binary "@files/server-metrics_2.json" > server-metrics_2.out 2>&1 printf "\nServer-metrics_2 uploaded" -curl -s -u ${USERNAME}:${PASSWORD} -X POST -H "Content-Type: application/json" ${URL}/${INDEX_NAME}/_bulk --data-binary "@server-metrics_3.json" > server-metrics_3.out 2>&1 +curl -s -u ${USERNAME}:${PASSWORD} -X POST -H "Content-Type: application/json" ${URL}/${INDEX_NAME}/_bulk --data-binary "@files/server-metrics_3.json" > server-metrics_3.out 2>&1 printf "\nServer-metrics_3 uploaded" -curl -s -u ${USERNAME}:${PASSWORD} -X POST -H "Content-Type: application/json" ${URL}/${INDEX_NAME}/_bulk --data-binary "@server-metrics_4.json" > server-metrics_4.out 2>&1 +curl -s -u ${USERNAME}:${PASSWORD} -X POST -H "Content-Type: application/json" ${URL}/${INDEX_NAME}/_bulk --data-binary "@files/server-metrics_4.json" > server-metrics_4.out 2>&1 printf "\nServer-metrics_4 uploaded\n" printf "Adding index-pattern server-*"