Skip to content

Instantly share code, notes, and snippets.

@mebeling
mebeling / prometheus_metrics.txt
Created April 9, 2018 13:41
Prometheus Remapped Metrics
node_bcache_cache_read_races_total{uuid=""},node_bcache_cache_read_races{uuid=""}
node_boot_time,node_boot_time_seconds
node_buddyinfo_count{node=""},node_buddyinfo_blocks{node=""}
node_context_switches,node_context_switches_total
node_cpu{cpu=""},node_cpu_seconds_total{cpu=""}
node_disk_bytes_read{device=""},node_disk_read_bytes_total{device=""}
node_disk_bytes_written{device=""},node_disk_written_bytes_total{device=""}
node_disk_io_time_ms{device=""},node_disk_io_time_seconds_total{device=""}
node_disk_io_time_weighted{device=""},node_disk_io_time_weighted_seconds_total{device=""}
# cat /var/chef/cache/chef-stacktrace.out
Generated at 2017-01-11 15:26:39 +0000
Mixlib::ShellOut::ShellCommandFailed: deploy_revision[/opt/sportradar/mlb-statistics] (baseball-statistics::deploy line 177) had an error: Mixlib::ShellOut::ShellCommandFailed: bash[run bundler] (/var/chef/cache/cookbooks/baseball-statistics/recipes/deploy.rb line 209) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of "bash" "/tmp/chef-script20170111-1447-1c0g44y" ----
STDOUT: Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
Fetching git@gitlab.elasticstats.com:srus/common-util.git
--- ERROR REPORT TEMPLATE -------------------------------------------------------
- What did you do?
I ran the command `/opt/chef/embedded/bin/bundle install`
# deploy application
deploy_revision "#{base}" do
Chef::Log.info(" ##==-- baseball-statistics repo_rev is #{node[:repo_rev]} --==## ")
repository "<repo.git>"
revision node['repo_rev']
user 'ubuntu'
group 'ubuntu'
purge_before_symlink %w{log}
@mebeling
mebeling / ec2summary.py
Created October 6, 2015 19:24
Comma separated value summary of EC2 instances in the dev, prod, platdev, dmz accounts
#!/usr/local/bin/python
#
# Requires boto3
# Expects AWS profiles:
# dev, prod, platdev, dmz
# AWS profile configs are in ~/.aws/config and ~/.aws/credentials
import boto3
def gatherEc2Info( profile, region ):