Skip to content
View gist2
{"timestamp":"2015-08-24T11:12:10.137086+0000","level":"warn","message":"loading extension files from directory","directory":"/etc/sensu/extensions"}
/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:664:in `connect_server': unable to resolve server address (EventMachine::ConnectionError)
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:664:in `bind_connect'
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:640:in `connect'
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.5.0/lib/amqp/session.rb:457:in `connect'
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.5.0/lib/amqp.rb:242:in `connect'
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-transport-3.2.0/lib/sensu/transport/rabbitmq.rb:119:in `setup_connection'
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-transport-3.2.0/lib/sensu/transport/rabbitmq.rb:148:in `conne
View gist:3f988a72178ebf05a313
root@checkout-web4:/home/ubuntu# sar
Linux 3.13.0-36-generic (checkout-web4)     08/04/2015  _x86_64_    (1 CPU)

12:00:01 AM     CPU     %user     %nice   %system   %iowait    %steal     %idle
12:05:02 AM     all      1.82      0.00      0.84      0.02      1.20     96.12
12:15:01 AM     all      1.78      0.00      0.79      0.04      1.12     96.27
12:25:01 AM     all      1.65      0.00      0.76      0.02      1.09     96.48
12:35:01 AM     all      1.34      0.00      0.71      0.01      1.04     96.90
12:45:01 AM     all      1.38      0.00      0.70      0.01      1.06     96.85
View http.request
curl -v 'https://production-mgnl.photobox.co.uk/a/my/spabasket?code=ad142f14b69788f105a8a7f6b354cead&owner=andrew.johnstone'
* Hostname was NOT found in DNS cache
* Trying 54.171.86.219...
* Connected to production-mgnl.photobox.co.uk (54.171.86.219) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
View http.request
curl -v https://production-mgnl.photobox.co.uk/andrew.johnstone
* Hostname was NOT found in DNS cache
* Trying 54.76.125.252...
* Connected to production-mgnl.photobox.co.uk (54.76.125.252) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
View output.txt
$ UPDATE_ELB_POLICY=1 bash x
Region Status Current security policy Expected security policy ELB Action
eu-west-1 UP_TO_DATE sec-ELBSecurityPolicy-2015-05 ELBSecurityPolicy-2015-05 boxtop-staging-api NO_ACTION
eu-west-1 UP_TO_DATE sec-ELBSecurityPolicy-2015-05 ELBSecurityPolicy-2015-05 boxtop-staging-cms NO_ACTION
eu-west-1 UP_TO_DATE sec-ELBSecurityPolicy-2015-05 ELBSecurityPolicy-2015-05 boxtop-staging-cms-author NO_ACTION
eu-west-1 UP_TO_DATE sec-ELBSecurityPolicy-2015-05 ELBSecurityPolicy-2015-05 boxtop-staging-green-public NO_ACTION
eu-west-1 UP_TO_DATE sec-ELBSecurityPolicy-2015-05 ELBSecurityPolicy-2015-05 boxtop-staging-green-author NO_ACTION
eu-west-1 UP_TO_DATE sec-ELBSecurityPolicy-2015-05 ELBSecurityPolicy-2015-05 boxtop-integration-yellow-author NO_ACTION
eu-west-1 UP_TO_DATE sec-ELBSecurityPolicy-2015-05 ELBSecurityPolicy-2015-05 boxtop-integration-yellow
View update-elb-policy.sh
#!/usr/bin/env bash
UPDATE_ELB_POLICY=${UPDATE_ELB_POLICY:-0};
TMPFILE=`mktemp -t example.XXXXXXXXXX` && {
printf "Region|Status|Current security policy|Expected security policy|ELB|Action\n" >> "${TMPFILE}";
aws ec2 describe-regions |awk -F'"' '/RegionName/ {print $4}' | while read region; do
LATEST_PREDEFINED_SECURITY_GROUP=$(aws --region=$region elb describe-load-balancer-policies | grep -i PolicyName | awk -F '"' '{print $4}' | head -n1 | sed 's/[ \r\n]//g');
View test.sh
#!/usr/bin/env bash
LATEST_PREDEFINED_SECURITY_GROUP=$(aws elb describe-load-balancer-policies | grep -i PolicyName | awk -F '"' '{print $4}' | head -n1);
aws elb describe-load-balancers | awk -F '"' '/LoadBalancerName/ {print $4}' | while read lb; do
CURRENT_SECURITY_POLICY=$(aws elb describe-load-balancer-policies --load-balancer-name $lb | egrep ELBSecurityPolicy | awk -F'"' '/PolicyName/ {print $4}');
if [ "${LATEST_PREDEFINED_SECURITY_GROUP}" != "${CURRENT_SECURITY_POLICY}" ]; then
echo "Load balancer security policy out of date: '${lb}' - '${CURRENT_SECURITY_POLICY}' expected '${LATEST_PREDEFINED_SECURITY_GROUP}'";
fi
View aws-ecs-jenkins.sh
#/usr/bin/env bash
set -ex
SERVICE_NAME=${SERVICE_NAME:-};
IMAGE_VERSION=${IMAGE_VERSION:-};
export IMAGE_VERSION=$IMAGE_VERSION
export SERVICE_NAME=$SERVICE_NAME
export IMAGE="docker.photobox.com:443/photobox/$SERVICE_NAME"
View gist:3829cb02e983d6102c3e
--- app.js 2015-04-12 16:31:48.433430728 +0100
+++ app.js 2015-04-12 16:31:48.433430728 +0100
@@ -19,6 +19,12 @@
app.set('view engine', 'jade');
app.set('x-powered-by', false);
+var sessions = require("client-sessions")
+var c_auth = require('./lib/google-oauth')
+var config_security = require('./config/security')
+app.use(sessions({ cookieName: 'session', secret: config_security.cookie_secret }))
View upstart-kibana.conf
# Upstart Kibana
stop on shutdown
setuid kibana
setgid kibana
respawn
chdir /opt/kibana/
Something went wrong with that request. Please try again.