diff --git a/haproxy_web/haproxy/haproxy.cfg b/haproxy_web/haproxy/haproxy.cfg index 71d11b4e..cf12d344 100644 --- a/haproxy_web/haproxy/haproxy.cfg +++ b/haproxy_web/haproxy/haproxy.cfg @@ -1,38 +1,38 @@ -global - log 127.0.0.1 local0 - log 127.0.0.1 local1 notice - maxconn 4096 - -defaults - log global - mode http - option httplog - option dontlognull - timeout connect 5000ms - timeout client 50000ms - timeout server 50000ms - -listen stats - bind 0.0.0.0:70 - mode http - stats enable - stats hide-version - stats scope . - stats realm Haproxy\ Statistics - stats uri / - stats auth user:pass - -frontend balancer - bind 0.0.0.0:80 - mode http - default_backend web_backends - -backend web_backends - mode http - option forwardfor - balance roundrobin - server weba weba:80 check - server webb webb:80 check - server webc webc:80 check - option httpchk GET / - http-check expect status 200 +global + log 127.0.0.1 local0 + log 127.0.0.1 local1 notice + maxconn 4096 + +defaults + log global + mode http + option httplog + option dontlognull + timeout connect 5000ms + timeout client 50000ms + timeout server 50000ms + +listen stats + bind 0.0.0.0:70 + mode http + stats enable + stats hide-version + stats scope . + stats realm Haproxy\ Statistics + stats uri / + stats auth user:pass + +frontend balancer + bind 0.0.0.0:80 + mode http + default_backend web_backends + +backend web_backends + mode http + option forwardfor + balance roundrobin + server weba weba:80 check + server webb webb:80 check + server webc webc:80 check + option httpchk GET / + http-check expect status 200 diff --git a/mongo_cluster/scripts/mongosetup.sh b/mongo_cluster/scripts/mongosetup.sh index fa67b4ff..ddbb5151 100644 --- a/mongo_cluster/scripts/mongosetup.sh +++ b/mongo_cluster/scripts/mongosetup.sh @@ -1,46 +1,46 @@ -#!/bin/bash - -MONGODB1=`ping -c 1 mongo1 | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1` -MONGODB2=`ping -c 1 mongo2 | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1` -MONGODB3=`ping -c 1 mongo3 | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1` - -echo "Waiting for startup.." -until curl http://${MONGODB1}:28017/serverStatus\?text\=1 2>&1 | grep uptime | head -1; do - printf '.' - sleep 1 -done - -echo curl http://${MONGODB1}:28017/serverStatus\?text\=1 2>&1 | grep uptime | head -1 -echo "Started.." - -sleep 10 - -echo SETUP.sh time now: `date +"%T" ` -mongo --host ${MONGODB1}:27017 < /dev/null +#!/bin/bash + +MONGODB1=`ping -c 1 mongo1 | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1` +MONGODB2=`ping -c 1 mongo2 | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1` +MONGODB3=`ping -c 1 mongo3 | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1` + +echo "Waiting for startup.." +until curl http://${MONGODB1}:28017/serverStatus\?text\=1 2>&1 | grep uptime | head -1; do + printf '.' + sleep 1 +done + +echo curl http://${MONGODB1}:28017/serverStatus\?text\=1 2>&1 | grep uptime | head -1 +echo "Started.." + +sleep 10 + +echo SETUP.sh time now: `date +"%T" ` +mongo --host ${MONGODB1}:27017 < /dev/null diff --git a/packetbeat_ek/kibana/beats-dashboards-1.0.1/load.sh b/packetbeat_ek/kibana/beats-dashboards-1.0.1/load.sh index ca3c5053..e91f38dd 100644 --- a/packetbeat_ek/kibana/beats-dashboards-1.0.1/load.sh +++ b/packetbeat_ek/kibana/beats-dashboards-1.0.1/load.sh @@ -1,56 +1,56 @@ -#!/bin/bash - -if [ -z "$1" ]; then - ELASTICSEARCH=http://localhost:9200 -else - ELASTICSEARCH=$1 -fi - -if [ -z "$2" ]; then - CURL=curl -else - CURL="curl --user $2" -fi - -echo $CURL -DIR=dashboards - -for file in $DIR/search/*.json -do - name=`basename $file .json` - echo "Loading search $name:" - $CURL -XPUT $ELASTICSEARCH/.kibana/search/$name \ - -d @$file || exit 1 - echo -done - -for file in $DIR/visualization/*.json -do - name=`basename $file .json` - echo "Loading visualization $name:" - $CURL -XPUT $ELASTICSEARCH/.kibana/visualization/$name \ - -d @$file || exit 1 - echo -done - -for file in $DIR/dashboard/*.json -do - name=`basename $file .json` - echo "Loading dashboard $name:" - $CURL -XPUT $ELASTICSEARCH/.kibana/dashboard/$name \ - -d @$file || exit 1 - echo -done - -for file in $DIR/index-pattern/*.json -do - name=`basename $file .json` - printf -v escape "%q" $name - echo "Loading index pattern $escape:" - - $CURL -XPUT $ELASTICSEARCH/.kibana/index-pattern/$escape \ - -d @$file || exit 1 - echo -done - - +#!/bin/bash + +if [ -z "$1" ]; then + ELASTICSEARCH=http://localhost:9200 +else + ELASTICSEARCH=$1 +fi + +if [ -z "$2" ]; then + CURL=curl +else + CURL="curl --user $2" +fi + +echo $CURL +DIR=dashboards + +for file in $DIR/search/*.json +do + name=`basename $file .json` + echo "Loading search $name:" + $CURL -XPUT $ELASTICSEARCH/.kibana/search/$name \ + -d @$file || exit 1 + echo +done + +for file in $DIR/visualization/*.json +do + name=`basename $file .json` + echo "Loading visualization $name:" + $CURL -XPUT $ELASTICSEARCH/.kibana/visualization/$name \ + -d @$file || exit 1 + echo +done + +for file in $DIR/dashboard/*.json +do + name=`basename $file .json` + echo "Loading dashboard $name:" + $CURL -XPUT $ELASTICSEARCH/.kibana/dashboard/$name \ + -d @$file || exit 1 + echo +done + +for file in $DIR/index-pattern/*.json +do + name=`basename $file .json` + printf -v escape "%q" $name + echo "Loading index pattern $escape:" + + $CURL -XPUT $ELASTICSEARCH/.kibana/index-pattern/$escape \ + -d @$file || exit 1 + echo +done + + diff --git a/packetbeat_ek/kibana/beats-dashboards-1.0.1/release.sh b/packetbeat_ek/kibana/beats-dashboards-1.0.1/release.sh index 7dba03ee..4d2ca141 100644 --- a/packetbeat_ek/kibana/beats-dashboards-1.0.1/release.sh +++ b/packetbeat_ek/kibana/beats-dashboards-1.0.1/release.sh @@ -1,19 +1,19 @@ -#!/bin/sh -# Script that builds a tar ball and uploads it to S3. - -VERSION=$1 - -if [ -z $VERSION ]; then - echo "Usage: $0 " - exit 1 -fi - -git archive \ - --format tar.gz \ - --prefix packetbeat-dashboards-$VERSION/ \ - -o ../packetbeat-dashboards-$VERSION.tar.gz \ - v$VERSION - -aws s3 cp \ - packetbeat-dashboards-$VERSION.tar.gz \ - s3://download.elasticsearch.org/beats/packetbeat/ +#!/bin/sh +# Script that builds a tar ball and uploads it to S3. + +VERSION=$1 + +if [ -z $VERSION ]; then + echo "Usage: $0 " + exit 1 +fi + +git archive \ + --format tar.gz \ + --prefix packetbeat-dashboards-$VERSION/ \ + -o ../packetbeat-dashboards-$VERSION.tar.gz \ + v$VERSION + +aws s3 cp \ + packetbeat-dashboards-$VERSION.tar.gz \ + s3://download.elasticsearch.org/beats/packetbeat/ diff --git a/packetbeat_ek/kibana/beats-dashboards-1.0.1/save/requirements.txt b/packetbeat_ek/kibana/beats-dashboards-1.0.1/save/requirements.txt index 183123c4..174c3f8b 100644 --- a/packetbeat_ek/kibana/beats-dashboards-1.0.1/save/requirements.txt +++ b/packetbeat_ek/kibana/beats-dashboards-1.0.1/save/requirements.txt @@ -1 +1 @@ -elasticsearch +elasticsearch diff --git a/registry_mirror/auto.sh b/registry_mirror/auto.sh index 7bdc8e04..2356bbad 100644 --- a/registry_mirror/auto.sh +++ b/registry_mirror/auto.sh @@ -1,4 +1,4 @@ -#!/bin/sh -echo "Start the registry service using docker-compose" - -docker-compose -p registry -f docker-compose.yml up -d +#!/bin/sh +echo "Start the registry service using docker-compose" + +docker-compose -p registry -f docker-compose.yml up -d