- Distributed systems are complex, things fail in unexpected ways
- Monitoring gives you visibility into the system
- Monitoring tells you stuff is broken before the customer notices
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
$ curl -s -H "Fastly-Key: <API Key>" https://api.fastly.com/datacenters | jq . | |
[ | |
{ | |
"code": "AMS", | |
"name": "Amsterdam", | |
"group": "Europe", | |
"coordinates": { | |
"x": 0, | |
"y": 0, | |
"latitude": 52.308613, |
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
It's not officially supported but you can rename an org on Chef Server 12+ | |
# connect to the DB | |
sudo -u opscode-pgsql /opt/opscode/embedded/bin/psql -U "opscode-pgsql" -d opscode_chef | |
# get the id of the org you want to change | |
select * from orgs; | |
# update the org name | |
update orgs set name='NEW_ORG_NAME' where id='ORG_ID'; |
Having just upgraded from Ubuntu 14.04 Trusty to 16.04 Xenial, I thought I'd share the pain points I encountered.
There's a bug in newer kernels on EC2 that causes kswapd0
to consume 100% CPU. It seems to happen more often on smaller instances with less RAM (t2.micros for example). There is a workaround changing a udev configuration.
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
https://launchpad.net/api/1.0/~adiscon/+archive/ubuntu/v8-stable/signing_key_fingerprint | |
{'Content-Length': '742', 'Content-Encoding': 'gzip', 'Accept-Ranges': 'bytes', 'Vary': 'Accept-Encoding', 'Server': 'Apache', 'Last-Modified': 'Wed, 19 Nov 2014 16:06:07 GMT', 'Connection': 'close', 'ETag': '"6ca"', 'Date': 'Sun, 22 May 2016 00:14:51 GMT', 'Content-Type': 'text/html'} | |
<!DOCTYPE html> | |
<html | |
xmlns="http://www.w3.org/1999/xhtml" | |
xml:lang="en" | |
lang="en" | |
> | |
<head> |
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
Generated at 2016-05-16 23:18:38 +0000 | |
Gem::MissingSpecError: chef_handler[HipChat::NotifyRoom] (hipchat::handler line 49) had an error: Gem::MissingSpecError: Could not find 'multi_xml' (>= 0.5.2) among 87 total gem(s) | |
Checked in 'GEM_PATH=/home/eric/.gem/ruby/2.1.0:/opt/chef/embedded/lib/ruby/gems/2.1.0', execute `gem env` for more information | |
/opt/chef/embedded/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:308:in `to_specs' | |
/opt/chef/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1439:in `block in activate_dependencies' | |
/opt/chef/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1428:in `each' | |
/opt/chef/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1428:in `activate_dependencies' | |
/opt/chef/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1410:in `activate' | |
/opt/chef/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1442:in `block in activate_dependencies' | |
/opt/chef/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1428:in `each' |
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
ark 'postgresql' do | |
url 'https://ftp.postgresql.org/pub/source/v9.4.6/postgresql-9.4.6.tar.bz2' | |
end | |
# build and install postgresql into the sensu embedded install | |
execute 'configure postgresql' do | |
command './configure --prefix /opt/sensu/embedded --with-openssl' | |
not_if '/opt/sensu/embedded/bin/gem list pg -i' | |
cwd '/usr/local/postgresql' | |
environment( |
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
knife search 'lsb_description:"Ubuntu 14.04.3 LTS"' -i |
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
# configuring a slack sensu handler | |
# create incoming-webhook at https://{your team}.slack.com/services/new/incoming-webhook | |
# get webhook URL | |
sensu_gem 'sensu-plugins-slack' | |
slack_conf = { | |
'webhook_url' => 'https://hooks.slack.com/services/XXXXXXXXX/YYYYYYYY/ZZZZZZZZZZZZZ' | |
} |
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
/etc/sensu/conf.d/checks/load_metrics.json on clients: | |
{ | |
"checks": { | |
"load_metrics": { | |
"command": "/opt/sensu/embedded/bin/metrics-load.rb -s load", | |
"handlers": [ | |
"metrics" | |
], | |
"standalone": true, |
NewerOlder