Last active
August 15, 2018 22:30
-
-
Save benwtrent/5d15b326525ca6cddb89666e9d2079be to your computer and use it in GitHub Desktop.
NAB artificial data logstash conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
stdin { | |
} | |
} | |
filter { | |
csv { | |
columns => ["timestamp","value"] | |
separator => "," | |
convert => { 'value' => 'float' } | |
} | |
date { | |
match => [ "timestamp", "YYYY-MM-dd HH:mm:ss" ] | |
locale => en | |
remove_field => "timestamp" | |
} | |
} | |
output { | |
stdout { codec => dots } | |
elasticsearch { | |
index => "${INDEX_NAME}" | |
user => "${ES_AUTH_UN}" | |
password => "${ES_AUTH_PW}" | |
hosts => ["${ES_HOST}"] | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
for i in for i in $(find ~/Projects/NAB/data -name '*.csv') | |
do | |
if test -f "$i" | |
then | |
file_name=$(basename $i) | |
dirty_name=${file_name%.*} | |
export INDEX_NAME=$(echo $dirty_name | tr '[:upper:]' '[:lower:]') | |
cat $i | ./logstash -f nab_logstash.conf | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
NAB datasets can be seen here: https://github.com/numenta/NAB/tree/master/data