Fixed test app such that log trasmission is sent to send_logs. Also cleaned up install/restart scripts.
diff --git a/Vagrantfile b/Vagrantfile
index 28d5575..d7651ef 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -38,7 +38,7 @@
# boxes.
# - Expose the following ports to be used within this box to
# host data being sent between the web server and the ELK server.
- elk.vm.network "private_network", ip: "172.16.1.100"
+ elk.vm.network "private_network", ip: "192.16.1.100"
# Provisioner: Runs the provisioning script that will provision
# the vagrant box for the first time, or forced.
@@ -71,7 +71,7 @@
# Setup a static IP to allow both vagrant boxes to know where
# to contact each other. This will allow communication between the
# web developer and the logging server.
- dev.vm.network "private_network", ip: "172.16.1.10"
+ dev.vm.network "private_network", ip: "192.16.1.10"
# Specify the provisioning script that will be used in order to
# install the necessary files needed for this vagrant box
diff --git a/client/www/js/logging.js b/client/www/js/logging.js
index 5634f3a..d88c03f 100644
--- a/client/www/js/logging.js
+++ b/client/www/js/logging.js
@@ -49,7 +49,7 @@
var ale2 = new userale(
{
- loggingUrl: 'http://192.168.1.100',
+ loggingUrl: 'http://192.16.1.100',
toolName: 'userale-test',
toolVersion: '3.0.0',
elementGroups: [
diff --git a/dashboard/files/config/elasticsearch.yml b/dashboard/files/config/elasticsearch.yml
index 0e9fd6f..fffdb9e 100644
--- a/dashboard/files/config/elasticsearch.yml
+++ b/dashboard/files/config/elasticsearch.yml
@@ -66,7 +66,7 @@
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
-# network.host: 192.168.0.1
+# network.host: "172.16.1.100"
#
# Set a custom port for HTTP:
#
@@ -106,4 +106,10 @@
#
# Require explicit names when deleting indices:
#
-# action.destructive_requires_name: true
\ No newline at end of file
+# action.destructive_requires_name: true
+http.cors.enabled: true
+http.cors.allow-origin: "*"
+# networking
+# network.bind_host: 0
+# network.publish_host: 0.0.0.0
+network.host: 0.0.0.0
\ No newline at end of file
diff --git a/dashboard/files/config/kibana.yml b/dashboard/files/config/kibana.yml
index 972cab7..2151e64 100644
--- a/dashboard/files/config/kibana.yml
+++ b/dashboard/files/config/kibana.yml
@@ -18,7 +18,7 @@
# server.port: 5601
# The host to bind the server to.
-# server.host: "0.0.0.0"
+# server.host: "localhost"
# If you are running kibana behind a proxy, and want to mount it at a path,
# specify that path here. The basePath can't end in a slash.
diff --git a/dashboard/files/config/xdata.conf b/dashboard/files/config/xdata.conf
index 259706f..b007cbe 100644
--- a/dashboard/files/config/xdata.conf
+++ b/dashboard/files/config/xdata.conf
@@ -24,6 +24,7 @@
"/var/log/xdata/xdata-v3.log"
]
start_position => beginning
+ #sincedb_path => "/dev/null"
}
}
@@ -51,9 +52,9 @@
action => "index"
index => "xdata_old"
document_type => "testing"
- template_overwrite => true
- template => "/vagrant/files/templates/testing_old.json"
- template_name => "testing"
+ #template_overwrite => true
+ #template => "/vagrant/files/templates/testing_old.json"
+ #template_name => "testing-old"
}
} else if [major_ver] > 2 {
elasticsearch {
@@ -61,9 +62,9 @@
action => "index"
index => "xdata_v3"
document_type => "testing"
- template_overwrite => true
- template => "/vagrant/files/templates/testing_v3.json"
- template_name => "testing"
+ #template_overwrite => true
+ #template => "/vagrant/files/templates/testing_v3.json"
+ #template_name => "testing"
}
} else {
elasticsearch {
@@ -71,14 +72,14 @@
action => "index"
index => "xdata_v2"
document_type => "testing"
- template_overwrite => true
- template => "/vagrant/files/templates/testing_v2.json"
- template_name => "testing"
+ #template_overwrite => true
+ #template => "/vagrant/files/templates/testing_v2.json"
+ #template_name => "testing"
}
}
# Ship logs to Database
-
+
# Debug
stdout { codec => rubydebug }
}
\ No newline at end of file
diff --git a/dashboard/files/templates/testing_old.json b/dashboard/files/templates/testing_old.json
index 29dd8c0..95c1e9e 100644
--- a/dashboard/files/templates/testing_old.json
+++ b/dashboard/files/templates/testing_old.json
@@ -1,101 +1,166 @@
{
- "template" : "testing",
- "order" : 1,
- "settings" : {
- "number_of_shards" : 1,
- "number_of_replicas" : 0,
- "index.refresh_interval" : "60s"
- },
- "mappings" : {
- "testing" : {
- "properties" : {
- "@timestamp" : {
- "type" : "date",
- "format" : "dateOptionalTime"
- },
- "@version" : {
- "type" : "string"
- },
- "apiVersion" : {
- "type" : "string"
- },
- "client" : {
- "type" : "string"
- },
- "component" : {
- "properties" : {
- "name" : {
- "index" : "not_analyzed",
- "type" : "string"
- },
- "version" : {
- "type" : "string"
+ "template":"testing-old",
+ "order":1,
+ "settings":{
+ "number_of_shards":1,
+ "number_of_replicas":0,
+ "index.refresh_interval":"5s"
+ },
+ "testing":{
+ "properties":{
+ "@timestamp":{
+ "type":"date",
+ "format":"date_optional_time"
+ },
+ "@version":{
+ "type":"string"
+ },
+ "apiVersion":{
+ "type":"string"
+ },
+ "client":{
+ "type":"string"
+ },
+ "component":{
+ "properties":{
+ "name":{
+ "type":"string",
+ "index":"not_analyzed"
+ },
+ "version":{
+ "type":"string"
+ }
}
- }
- },
- "host" : {
- "type" : "string"
- },
- "impLanguage" : {
- "type" : "string"
- },
- "major_ver" : {
- "type" : "long"
- },
- "meta" : {
- "type" : "long"
- },
- "minor_ver" : {
- "type" : "long"
- },
- "oid" : {
- "properties" : {
- "$oid" : {
- "type" : "string"
+ },
+ "host":{
+ "type":"string",
+ "index":"not_analyzed"
+ },
+ "impLanguage":{
+ "type":"string",
+ "index":"not_analyzed"
+ },
+ "major_ver":{
+ "type":"integer"
+ },
+ "meta":{
+ "properties":{
+ "expanded":{
+ "type":"boolean"
+ },
+ "UIOjectId":{
+ "type":"string"
+ },
+ "UIOjectIds":{
+ "type":"string",
+ "index":"not_analyzed"
+ },
+ "UIOjectType":{
+ "type":"string",
+ "index":"not_analyzed"
+ },
+ "UIContainerId":{
+ "type":"string",
+ "index":"not_analyzed"
+ },
+ "contextId":{
+ "type":"string"
+ },
+ "duration":{
+ "type":"string",
+ "index":"not_analyzed"
+ },
+ "endDate":{
+ "type":"string"
+ },
+ "entityCount":{
+ "type":"integer"
+ },
+ "fileId":{
+ "type":"string"
+ },
+ "fromDragDropEvent":{
+ "type":"boolean"
+ },
+ "numBuckets":{
+ "type":"integer"
+ },
+ "page":{
+ "type":"integer"
+ },
+ "requestedFromColumn":{
+ "type":"boolean"
+ },
+ "searchControlId":{
+ "type":"string"
+ },
+ "sessionID":{
+ "type":"string",
+ "index":"not_analyzed"
+ },
+ "showDetails":{
+ "type":"boolean"
+ },
+ "startDate":{
+ "type":"string"
+ },
+ "totalColumns":{
+ "type":"integer"
+ },
+ "xfld":{
+ "type":"string"
+ }
}
- }
- },
- "parms" : {
- "properties" : {
- "activity" : {
- "index" : "not_analyzed",
- "type" : "string"
- },
- "desc" : {
- "type" : "string"
- },
- "wf_state" : {
- "type" : "string"
- },
- "wf_version" : {
- "type" : "string"
+ },
+ "minor_ver":{
+ "type":"integer"
+ },
+ "oid":{
+ "properties":{
+ "$oid":{
+ "type":"string"
+ }
}
- }
- },
- "patch_ver" : {
- "type" : "long"
- },
- "path" : {
- "type" : "string"
- },
- "sessionID" : {
- "type" : "string"
- },
- "tags" : {
- "type" : "string"
- },
- "timestamp" : {
- "properties" : {
- "$date" : {
- "type" : "date",
- "format" : "dateOptionalTime"
+ },
+ "parms":{
+ "properties":{
+ "activity":{
+ "type":"string",
+ "index":"not_analyzed"
+ },
+ "desc":{
+ "type":"string"
+ },
+ "wf_state":{
+ "type":"integer"
+ },
+ "wf_version":{
+ "type":"float"
+ }
}
- }
- },
- "type" : {
- "type" : "string"
- }
+ },
+ "path":{
+ "type":"string"
+ },
+ "sessionID":{
+ "type":"string",
+ "index":"not_analyzed"
+ },
+ "tags":{
+ "type":"string"
+ },
+ "timestamp":{
+ "properties":{
+ "$date":{
+ "type":"date",
+ "format":"dateOptionalTime"
+ }
+ }
+ },
+ "type":{
+ "type":"string",
+ "index":"not_analyzed"
+ }
}
- }
- }
+ }
}
\ No newline at end of file
diff --git a/dashboard/files/templates/testing_v2.json b/dashboard/files/templates/testing_v2.json
index 4a0b68c..59824a7 100644
--- a/dashboard/files/templates/testing_v2.json
+++ b/dashboard/files/templates/testing_v2.json
@@ -1,5 +1,5 @@
{
- "template" : "testing",
+ "template" : "testing-v2",
"order" : 1,
"settings" : {
"number_of_shards" : 1,
@@ -7,7 +7,7 @@
"index.refresh_interval" : "60s"
},
"mappings" : {
- "testing" : {
+ "xdata_v2" : {
"properties" : {
"@timestamp" : {
"type" : "date",
diff --git a/dashboard/files/templates/testing_v3.json b/dashboard/files/templates/testing_v3.json
index 90fb38a..7c4335d 100644
--- a/dashboard/files/templates/testing_v3.json
+++ b/dashboard/files/templates/testing_v3.json
@@ -1,5 +1,5 @@
{
- "template" : "testing",
+ "template" : "testing-v3",
"order" : 1,
"settings" : {
"number_of_shards" : 1,
@@ -7,7 +7,7 @@
"index.refresh_interval" : "60s"
},
"mappings" : {
- "testing" : {
+ "xdata_v3" : {
"properties" : {
"@timestamp" : {
"type" : "date",
diff --git a/dashboard/files/twisted_app.py b/dashboard/files/twisted_app.py
index b206552..ffdc6d9 100644
--- a/dashboard/files/twisted_app.py
+++ b/dashboard/files/twisted_app.py
@@ -28,8 +28,7 @@
import simplejson
-#KIBANA = '/home/vagrant/kibana-3.1.2'
-ALLOW_ORIGIN = 'http://192.168.1.10'
+ALLOW_ORIGIN = 'http://192.16.1.10'
if not os.path.exists('/var/log/xdata'):
os.makedirs('/var/log/xdata')
@@ -101,8 +100,6 @@
loggerv3 = logging.getLogger('xdata-v3')
logger_err = logging.getLogger('error')
-#kibana = File(KIBANA)
-
wf_dict = {
0: "WF_OTHER",
1: "WF_DEFINE",
@@ -145,7 +142,6 @@
return ''
root = Resource()
-#root.putChild("kibana", kibana)
root.putChild("send_log", Logger())
# create a resource to serve static files
diff --git a/dashboard/scripts/install.sh b/dashboard/scripts/install.sh
index 91c6161..a1ad33a 100644
--- a/dashboard/scripts/install.sh
+++ b/dashboard/scripts/install.sh
@@ -16,48 +16,46 @@
#!/bin/bash
-ELASTIC="elasticsearch-2.2.0"
-LOGSTASH="logstash_2.2.2"
-KIBANA="kibana-4.4.1-linux-x64"
-ES_LOG="/var/log/elasticsearch"
-ES_DATA="/var/lib/elasticsearch"
-ES_CONFIG="/etc/elasticsearch"
-ES_BIN="/usr/share/elasticsearch/bin"
-
# Latest and greatest source packages
MINICONDA_SCRIPT="https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh"
-ELASTIC_DPKG_SRC="https://download.elasticsearch.org/elasticsearch/elasticsearch/$ELASTIC.deb"
-LOGSTASH_DPKG_SRC="https://download.elastic.co/logstash/logstash/packages/debian/$LOGSTASH-1_all.deb"
-KIBANA_SRC="https://download.elastic.co/kibana/kibana/$KIBANA.tar.gz"
-# Update box & install openjdk & miniconda
+# Update box & install openjdk and mongodb
sudo -E apt-get update || exit $?
sudo -E apt-get -y install openjdk-7-jdk || exit $?
+sudo -E apt-get -y install mongodb || exit $?
+
+# Install Miniconda
wget -q $MINICONDA_SCRIPT || exit $?
chmod +x ./Miniconda-*.sh || exit $?
./Miniconda-*.sh -b || exit $?
-
echo export PATH="$HOME/miniconda2/bin:$PATH" >> $HOME/.bashrc
source $HOME/.bashrc
$HOME/miniconda2/bin/conda update --yes conda || exit $?
-# Install Elastic
-wget -q $ELASTIC_DPKG_SRC $LOGSTASH_DPKG_SRC || exit $?
-sudo dpkg -i $ELASTIC.deb || exit $?
-sudo dpkg -i $LOGSTASH-1_all.deb || exit $?
+# Install Elasticsearch
+wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
+echo "deb http://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list
+sudo -E apt-get update || exit $?
+sudo -E apt-get -y install elasticsearch || exit $?
# Install Elastic HQ Plugin
-sudo $ES_BIN/plugin install royrusso/elasticsearch-HQ || exit $?
+sudo /usr/share/elasticsearch/bin/plugin install royrusso/elasticsearch-HQ || exit $?
-# Download and install Kibana to the vagrant box.
-wget -q $KIBANA_SRC || exit $?
-tar -xvf $HOME/$KIBANA.tar.gz || exit $?
+# Install Logstash
+echo "deb http://packages.elastic.co/logstash/2.2/debian stable main" | sudo tee -a /etc/apt/sources.list.d/logstash-2.2.x.list
+sudo -E apt-get update || exit $?
+sudo -E apt-get -y install logstash || exit $?
+
+# Install Kibana
+echo "deb http://packages.elastic.co/kibana/4.4/debian stable main" | sudo tee -a /etc/apt/sources.list.d/kibana-4.4.x.list
+sudo -E apt-get update || exit $?
+sudo -E apt-get -y install kibana || exit $?
+
+# Copy over configuration files
sudo cp /vagrant/files/config/elasticsearch.yml /etc/elasticsearch/ || exit $?
sudo cp /vagrant/files/config/xdata.conf /etc/logstash/conf.d/ || exit $?
sudo cp /vagrant/files/twisted_app.py $HOME/ || exit $?
-sudo cp /vagrant/files/config/kibana.yml $HOME/$KIBANA/config/ || exit $?
-# Startup Kibana
-sudo $HOME/$KIBANA/bin/kibana || exit $?
+sudo cp /vagrant/files/config/kibana.yml /opt/kibana/config/ || exit $?
# Restart all the services to ensure the configurations are being used properly
# and Run the kibana twisted web server so the developer has access to the
@@ -67,4 +65,4 @@
# This may need to be rewritten
# Simply create .kibana index and add dashboard there?
-#cp /vagrant/files/data/XDATA-Dashboard-v3.json $HOM#E/$KIBANA/app/dashboards/default.json || exit $?
\ No newline at end of file
+#cp /vagrant/files/data/XDATA-Dashboard-v3.json $HOME/$KIBANA/app/dashboards/default.json || exit $?
\ No newline at end of file
diff --git a/dashboard/scripts/restart.sh b/dashboard/scripts/restart.sh
index 9457f6b..345a42c 100644
--- a/dashboard/scripts/restart.sh
+++ b/dashboard/scripts/restart.sh
@@ -1,5 +1,5 @@
#
-# Copyright 2016 The Charles Stark Draper Laboratory
+# Copyright 2014 The Charles Stark Draper Laboratory
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -13,9 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-
+#!/bin/bash
sudo service elasticsearch restart
-
# For Logstash and ElasticSearch, it takes a while before the
# network port is established by the process. Here we wait until
# the port is open.
@@ -29,27 +28,369 @@
sleep 1;
done
-service logstash stop
+sudo service logstash stop
# Delete XData indexes
curl -XDELETE 'http://localhost:9200/xdata_v3/'
curl -XDELETE 'http://localhost:9200/xdata_v2/'
curl -XDELETE 'http://localhost:9200/xdata_old/'
-# Create XData indexes (even though logstash will create them automatically)
+# Create XData indexes
curl -XPUT 'http://localhost:9200/xdata_v3/'
curl -XPUT 'http://localhost:9200/xdata_v2/'
curl -XPUT 'http://localhost:9200/xdata_old/'
-# Remove .sincedb file to trigger logstash to reindex all xdata_* data
-rm /var/lib/logstash/.sincedb_*
-service logstash start
+curl -XPUT 'http://localhost:9200/xdata_old/testing/_mapping' -d '
+{
+ "testing":{
+ "properties":{
+ "@timestamp":{
+ "type":"date",
+ "format":"date_optional_time"
+ },
+ "@version":{
+ "type":"string"
+ },
+ "apiVersion":{
+ "type":"string"
+ },
+ "client":{
+ "type":"string"
+ },
+ "component":{
+ "properties":{
+ "name":{
+ "type":"string",
+ "index":"not_analyzed"
+ },
+ "version":{
+ "type":"string"
+ }
+ }
+ },
+ "host":{
+ "type":"string",
+ "index":"not_analyzed"
+ },
+ "impLanguage":{
+ "type":"string",
+ "index":"not_analyzed"
+ },
+ "major_ver":{
+ "type":"integer"
+ },
+ "meta":{
+ "properties":{
+ "expanded":{
+ "type":"boolean"
+ },
+ "UIOjectId":{
+ "type":"string"
+ },
+ "UIOjectIds":{
+ "type":"string",
+ "index":"not_analyzed"
+ },
+ "UIOjectType":{
+ "type":"string",
+ "index":"not_analyzed"
+ },
+ "UIContainerId":{
+ "type":"string",
+ "index":"not_analyzed"
+ },
+ "contextId":{
+ "type":"string"
+ },
+ "duration":{
+ "type":"string",
+ "index":"not_analyzed"
+ },
+ "endDate":{
+ "type":"string"
+ },
+ "entityCount":{
+ "type":"integer"
+ },
+ "fileId":{
+ "type":"string"
+ },
+ "fromDragDropEvent":{
+ "type":"boolean"
+ },
+ "numBuckets":{
+ "type":"integer"
+ },
+ "page":{
+ "type":"integer"
+ },
+ "requestedFromColumn":{
+ "type":"boolean"
+ },
+ "searchControlId":{
+ "type":"string"
+ },
+ "sessionID":{
+ "type":"string",
+ "index":"not_analyzed"
+ },
+ "showDetails":{
+ "type":"boolean"
+ },
+ "startDate":{
+ "type":"string"
+ },
+ "totalColumns":{
+ "type":"integer"
+ },
+ "xfld":{
+ "type":"string"
+ }
+ }
+ },
+ "minor_ver":{
+ "type":"integer"
+ },
+ "oid":{
+ "properties":{
+ "$oid":{
+ "type":"string"
+ }
+ }
+ },
+ "parms":{
+ "properties":{
+ "activity":{
+ "type":"string",
+ "index":"not_analyzed"
+ },
+ "desc":{
+ "type":"string"
+ },
+ "wf_state":{
+ "type":"string"
+ },
+ "wf_version":{
+ "type":"float"
+ }
+ }
+ },
+ "path":{
+ "type":"string"
+ },
+ "sessionID":{
+ "type":"string",
+ "index":"not_analyzed"
+ },
+ "tags":{
+ "type":"string"
+ },
+ "timestamp":{
+ "properties":{
+ "$date":{
+ "type":"date",
+ "format":"dateOptionalTime"
+ }
+ }
+ },
+ "type":{
+ "type":"string",
+ "index":"not_analyzed"
+ }
+ }
+ }
+}
+'
-PIDFILE=$HOME/twistd.pid
+curl -XPUT 'http://localhost:9200/xdata_v3/testing/_mapping' -d '
+{
+
+ "testing" : {
+ "properties" : {
+ "@timestamp" : {
+ "type" : "date",
+ "format" : "dateOptionalTime"
+ },
+ "@version" : {
+ "type" : "string"
+ },
+ "action" : {
+ "type" : "string"
+ },
+ "activity" : {
+ "type" : "string"
+ },
+ "client" : {
+ "type" : "string"
+ },
+ "elementGroup" : {
+ "index" : "not_analyzed",
+ "type" : "string"
+ },
+ "elementId" : {
+ "index" : "not_analyzed",
+ "type" : "string"
+ },
+ "elementSub" : {
+ "type" : "string"
+ },
+ "elementType" : {
+ "type" : "string"
+ },
+ "host" : {
+ "type" : "string"
+ },
+ "language" : {
+ "type" : "string"
+ },
+ "major_ver" : {
+ "type" : "long"
+ },
+ "meta" : {
+ "type" : "object"
+ },
+ "minor_ver" : {
+ "type" : "long"
+ },
+ "patch_ver" : {
+ "type" : "long"
+ },
+ "path" : {
+ "type" : "string"
+ },
+ "sessionID" : {
+ "index" : "not_analyzed",
+ "type" : "string"
+ },
+ "source" : {
+ "type" : "string"
+ },
+ "tags" : {
+ "type" : "string"
+ },
+ "timestamp" : {
+ "type" : "date",
+ "format" : "dateOptionalTime"
+ },
+ "toolName" : {
+ "index" : "not_analyzed",
+ "type" : "string"
+ },
+ "toolVersion" : {
+ "type" : "string"
+ },
+ "useraleVersion" : {
+ "type" : "string"
+ }
+ }
+ }
+
+}
+'
+curl -XPUT 'http://localhost:9200/xdata_v2/testing/_mapping' -d '
+{
+
+ "testing" : {
+ "properties" : {
+ "@timestamp" : {
+ "type" : "date",
+ "format" : "dateOptionalTime"
+ },
+ "@version" : {
+ "type" : "string"
+ },
+ "apiVersion" : {
+ "type" : "string"
+ },
+ "client" : {
+ "type" : "string"
+ },
+ "component" : {
+ "properties" : {
+ "name" : {
+ "index" : "not_analyzed",
+ "type" : "string"
+ },
+ "version" : {
+ "type" : "string"
+ }
+ }
+ },
+ "host" : {
+ "type" : "string"
+ },
+ "impLanguage" : {
+ "type" : "string"
+ },
+ "major_ver" : {
+ "type" : "long"
+ },
+ "minor_ver" : {
+ "type" : "long"
+ },
+ "parms" : {
+ "properties" : {
+ "activity" : {
+ "index" : "not_analyzed",
+ "type" : "string"
+ },
+ "desc" : {
+ "type" : "string"
+ },
+ "wf_state" : {
+ "type" : "long"
+ },
+ "wf_version" : {
+ "type" : "string"
+ }
+ }
+ },
+ "patch_ver" : {
+ "type" : "long"
+ },
+ "path" : {
+ "type" : "string"
+ },
+ "sessionID" : {
+ "type" : "string"
+ },
+ "tags" : {
+ "type" : "string"
+ },
+ "timestamp" : {
+ "type" : "date",
+ "format" : "dateOptionalTime"
+ },
+ "type" : {
+ "type" : "string"
+ },
+ "wf_state_longname" : {
+ "type" : "string"
+ }
+ }
+ }
+
+}
+'
+
+# Remove .sincedb file to trigger logstash to reindex all xdata_* data
+sudo rm /var/lib/logstash/.sincedb_*
+
+# copy old xdata logs to elasticsearch
+sudo cp /vagrant/files/data/xdata-old.log /var/log/xdata/xdata-old.log
+
+sudo service logstash start
+
+# Start Kibana
+sudo service kibana start
+
+PIDFILE=/home/vagrant/twistd.pid
if [ -f $PIDFILE ]; then
echo 'Twisted Running, Killing it!'
- sudo -E kill `cat $PIDFILE`
+ sudo -E kill `sudo cat $PIDFILE`
fi
-sudo -E twistd --pidfile=$PIDFILE -y twisted_app.py
\ No newline at end of file
+# Run the twisted web server so the developer has access to the
+# dashboad provided by Kibana.
+sudo -E twistd --pidfile=$PIDFILE -y /home/vagrant/twisted_app.py