Skip to content

Instantly share code, notes, and snippets.

View justincaldwell's full-sized avatar

Justin Caldwell justincaldwell

View GitHub Profile

Recommended books on complex systems

  • Introduction to General Systems Thinking - Gerald Weinberg
  • Antifragile - Nassim Nicholas Taleb
  • Chaos - James Gleick
  • Scale - Geoffrey West
### Keybase proof
I hereby claim:
* I am justincaldwell on github.
* I am justincaldwell (https://keybase.io/justincaldwell) on keybase.
* I have a public key ASB1n6ULGfLGr6JUlrE2BHTKYFqvIqhzgalWQrDMY4hcvAo
To claim this, I am signing this object:
Verifying my Blockstack ID is secured with the address 13QUCUXYTzi1eiet9GbKoJriPAeG3R53a8 https://explorer.blockstack.org/address/13QUCUXYTzi1eiet9GbKoJriPAeG3R53a8
Sat Mar 25 23:04:51 UTC 2017

Elasticsearch Options

  1. Three master+data nodes
  • Three r3.xlarge.elasticsearch nodes (4 cpu, 30G memory, 80G ssd)
  • all serve as master and data nodes
  • can't do multi availibility zones
    • aws es service is limited to 2 azs max so if you want to do multiple azs, node count needs to be even
  • $1058 a month
  1. Four master+data nodes
  • same as above but use 4 nodes to get multiple azs
Verifying that +justincaldwell is my blockchain ID. https://onename.com/justincaldwell
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
$script = <<SCRIPT
curl -sSL https://get.docker.io/ubuntu/ | sudo sh
usermod -a -G docker vagrant
echo "DOCKER_OPTS='-H unix:///var/run/docker.sock -H tcp://0.0.0.0:5555 --dns 172.17.42.1 --dns 8.8.8.8 --dns-search service.consul'" | sudo tee -a /etc/default/docker
input {
stdin {
type => "stdin-type"
}
file {
type => "syslog"
path => [ "/var/log/*.log", "/var/log/messages", "/var/log/syslog",
"/docker/log/sidekiq/*.log", "/docker/log/blackbox/*.log", "/docker/log/console/*.log",
"/docker/log/haproxy/*.log", "/docker/log/nginx/*.log", "/docker/log/assets/*.log"]
> openssl s_client -connect api.yext.com:443 -CApath /etc/ssl/certs
CONNECTED(00000003)
depth=0 C = US, ST = New York, L = New York, O = "Yext, Inc.", OU = Technology, CN = *.yext.com
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 C = US, ST = New York, L = New York, O = "Yext, Inc.", OU = Technology, CN = *.yext.com
verify error:num=27:certificate not trusted
verify return:1
depth=0 C = US, ST = New York, L = New York, O = "Yext, Inc.", OU = Technology, CN = *.yext.com
verify error:num=21:unable to verify the first certificate
def run
file = Dir["/data/content_instance_views/**/*"].select { |f| File.file? f }.sort_by { |f| File.mtime f }.first
if file
age = (Time.now.to_i - File.mtime(file).to_i).to_i
message "View count log is #{age} seconds old"
critical if age > 2400
warning if age > 1200
end
ok
end