[root@master machine_leanrning]# tar -zxvf server_metrics.tar.gz
files/
files/server-metrics_16.json
files/server-metrics_6.json
files/server-metrics_20.json
files/server-metrics_7.json
files/server-metrics_17.json
files/create_single_metric.sh
files/create_multi_metric_noauth.sh
files/server-metrics_10.json
files/server-metrics_11.json
files/create_multi_metric.sh
files/server-metrics_1.json
files/README.md
files/server-metrics_2.json
files/server-metrics_12.json
files/server-metrics_13.json
files/server-metrics_3.json
files/._upload_server_metrics_noauth.sh
files/upload_server_metrics_noauth.sh
files/server-metrics_14.json
files/create_single_metric_noauth.sh
files/server-metrics_8.json
files/server-metrics_18.json
files/._upload_server_metrics.sh
files/upload_server_metrics.sh
files/server-metrics_4.json
files/server-metrics_5.json
files/server-metrics_19.json
files/server-metrics_9.json
files/server-metrics_15.json
[root@master machine_leanrning]# ls
files server_metrics.tar.gz
[root@master machine_leanrning]# cd files/
[root@master files]# ls
create_multi_metric_noauth.sh create_single_metric.sh server-metrics_11.json server-metrics_14.json server-metrics_17.json server-metrics_1.json server-metrics_3.json server-metrics_6.json server-metrics_9.json
create_multi_metric.sh README.md server-metrics_12.json server-metrics_15.json server-metrics_18.json server-metrics_20.json server-metrics_4.json server-metrics_7.json upload_server_metrics_noauth.sh
create_single_metric_noauth.sh server-metrics_10.json server-metrics_13.json server-metrics_16.json server-metrics_19.json server-metrics_2.json server-metrics_5.json server-metrics_8.json upload_server_metrics.sh
[root@master files]# bash upload_server_metrics.sh
== Script for creating index and uploading data ==
== Deleting old index ==
{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index [server-metrics]","resource.type":"index_or_alias","resource.id":"server-metrics","index_uuid":"_na_","index":"server-metrics"}],"type":"index_not_found_exception","reason":"no such index [server-metrics]","resource.type":"index_or_alias","resource.id":"server-metrics","index_uuid":"_na_","index":"server-metrics"},"status":404}
== Creating Index - server-metrics ==
{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters: [metric : {properties={deny={type=long}, total={type=long}, @timestamp={type=date}, response={type=float}, service={type=keyword}, host={type=keyword}, accept={type=long}}}]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters: [metric : {properties={deny={type=long}, total={type=long}, @timestamp={type=date}, response={type=float}, service={type=keyword}, host={type=keyword}, accept={type=long}}}]","caused_by":{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters: [metric : {properties={deny={type=long}, total={type=long}, @timestamp={type=date}, response={type=float}, service={type=keyword}, host={type=keyword}, accept={type=long}}}]"}},"status":400}
== Bulk uploading data to index...
Server-metrics_1 uploaded
Server-metrics_2 uploaded
Server-metrics_3 uploaded
Server-metrics_4 uploaded
Server-metrics_5 uploaded
Server-metrics_6 uploaded
Server-metrics_7 uploaded
Server-metrics_8 uploaded
Server-metrics_9 uploaded
Server-metrics_10 uploaded
Server-metrics_11 uploaded
Server-metrics_12 uploaded
Server-metrics_13 uploaded
Server-metrics_14 uploaded
Server-metrics_15 uploaded
Server-metrics_16 uploaded
Server-metrics_17 uploaded
Server-metrics_18 uploaded
Server-metrics_19 uploaded
Server-metrics_20 uploaded
done - output to /dev/null
== Check upload
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
yellow open server-metrics nE8SdaN4TTu4D95wvGLIjw 1 1 707995 0 70mb 70mb
Server-metrics uploaded