summaryrefslogtreecommitdiff
path: root/elastic/load.sh
diff options
context:
space:
mode:
Diffstat (limited to 'elastic/load.sh')
-rwxr-xr-xelastic/load.sh21
1 files changed, 3 insertions, 18 deletions
diff --git a/elastic/load.sh b/elastic/load.sh
index f46466a..c68634b 100755
--- a/elastic/load.sh
+++ b/elastic/load.sh
@@ -13,7 +13,6 @@
ELASTICSEARCH=http://localhost:9200
CURL='curl --netrc'
KIBANA_INDEX=".kibana"
-BEAT_CONFIG=".beatconfig"
print_usage() {
echo "
@@ -86,35 +85,21 @@ esac
shift 2
done
-if [ -f ${BEAT_CONFIG} ]; then
- for ln in `cat ${BEAT_CONFIG}`; do
- BUILD_STRING="${BUILD_STRING}s/${ln}/g;"
- done
- SED_STRING=`echo ${BUILD_STRING} | sed 's/;$//'`
-fi
-# Failsafe
-if [ -z ${SED_STRING} ]; then
- SED_STRING="s/packetbeat-/packetbeat-/g;s/filebeat-/filebeat-/g;s/topbeat-/topbeat-/g;s/winlogonbeat-/winlogonbeat-/g"
-fi
-
DIR=.
echo "Loading dashboards to ${ELASTICSEARCH} in ${KIBANA_INDEX}"
# Workaround for: https://github.com/elastic/beats-dashboards/issues/94
-${CURL} -XPUT "${ELASTICSEARCH}/${KIBANA_INDEX}"
-${CURL} -XPUT "${ELASTICSEARCH}/${KIBANA_INDEX}/_mapping/search" -d'{"search": {"properties": {"hits": {"type": "integer"}, "version": {"type": "integer"}}}}'
+#${CURL} -XPUT "${ELASTICSEARCH}/${KIBANA_INDEX}"
+#${CURL} -XPUT "${ELASTICSEARCH}/${KIBANA_INDEX}/_mapping/search" -d'{"search": {"properties": {"hits": {"type": "integer"}, "version": {"type": "integer"}}}}'
-TMP_SED_FILE="${DIR}/search/tmp_search.json"
for file in ${DIR}/search/*.json
do
NAME=`basename ${file} .json`
echo "Loading search ${NAME}:"
- sed ${SED_STRING} ${file} > ${TMP_SED_FILE}
${CURL} -XPUT ${ELASTICSEARCH}/${KIBANA_INDEX}/search/${NAME} \
- -d @${TMP_SED_FILE} || exit 1
+ -d @${file} || exit 1
echo
done
-rm ${TMP_SED_FILE}
for file in ${DIR}/index-pattern/*.json
do