- Logstash 1.5.x
- If you want to run Logstash 2.x, see the section titled Logstash 2.x below
- Mongostat 2.8+ (for support of the
--json
flag)
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 python | |
# | |
# nova_nuke.py | |
# usage: nova_nuke.py <uuid> | |
# | |
# Forcefully removes an instance from the Nova database. | |
# Useful for destroying instances stuck in an 'error' or 'deleting' state. | |
# | |
# Completes the following actions: |
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
Vagrant.configure("2") do |config| | |
config.vm.box = "dummy" | |
config.vm.synced_folder './vagrant', '/vagrant' | |
config.ssh.private_key_path = File.expand_path("~/.ssh/id_rsa") | |
ENV['VAGRANT_DEFAULT_PROVIDER'] = "rackspace" | |
config.vm.provider :rackspace do |rs, override| | |
override.vm.box = 'dummy' | |
override.vm.box_url = 'https://github.com/mitchellh/vagrant-rackspace/raw/master/dummy.box' |
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
#!/bin/bash | |
SECONDS_SINCE_LAST_SEGFAULT=$(( $(date '+%s') - $(date -d "$(fgrep segfault /var/log/syslog | tail -1 | awk '{ print $1,$2,$3 }')" '+%s') )) | |
echo "IT HAS BEEN" | |
echo -ne "\e[00;33m" | |
figlet -f big $SECONDS_SINCE_LAST_SEGFAULT | |
echo -ne "\e[00m" | |
echo "SECONDS SINCE THE LAST SEGFAULT!" |
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
[root@iadesapp0 ~]# iptables -t nat -vnL | grep 51008 | |
[root@iadesapp0 ~]# vzctl start 1007 | |
Starting container... | |
Warning: configuration file for distribution OR-centos-6.4-x86_64 not found, using defaults from /etc/vz/dists/default | |
Adding NAT rules for ports 31008,41008,51008,61008 | |
VZ mount is iadesapp0vz7 | |
mount: special device /data/iadesapp0vz7 does not exist | |
Container is mounted | |
/etc/vz/conf/vps.mount: line 36: /etc/vz/conf/vps-set-io.sh: No such file or directory | |
Adding IP address(es): 10.57.152.45 |
I hereby claim:
- I am DavidWittman on github.
- I am daveops (https://keybase.io/daveops) on keybase.
- I have a public key whose fingerprint is 7DA6 052D DCB6 ADA4 00A7 EFDF FF43 3B38 9A3F DB4B
To claim this, I am signing this object:
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 | |
# s3cmd helper script to prompt for GPG passphrase for encrypting/decrypting | |
S3CMD_CONFIG=${S3CMD_CONFIG:-"$HOME/.s3cfg"} | |
S3CMD="$(which s3cmd)" | |
if [[ -z "$GPG_PASSPHRASE" ]]; then | |
# Add the -s flag here to hide the passphrase | |
read -r -p "Encryption passphrase: " GPG_PASSPHRASE |
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
package main | |
import ( | |
"flag" | |
"fmt" | |
"github.com/andybons/hipchat" | |
"log" | |
"os" | |
"path" | |
"strings" |
List the number of primary shards per data node in Elasticsearch:
curl -s localhost:9200/_cat/shards?h=node,prirep | awk '
$2 == "p" {
result[$1] += 1; total += 1
}
END {
for (var in result)
printf "%s\t%s (%0.2f%%)\n",var,result[var],result[var]/total*100