Skip to content

Instantly share code, notes, and snippets.

time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n
time_appconnect: %{time_appconnect}\n
time_pretransfer: %{time_pretransfer}\n
time_redirect: %{time_redirect}\n
time_starttransfer: %{time_starttransfer}\n
----------\n
time_total: %{time_total}\n
#!/bin/bash
# Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/
# Install stuff #
#################
# Install development tools and some misc. necessary packages
yum -y groupinstall "Development tools"
yum -y install zlib-devel # gen'l reqs
@josephreynolds
josephreynolds / Broken NagiosLibraryMachine.rb
Created November 2, 2011 01:55
This is now throwing an error when we run chef-client -i
class Machine<
Struct.new(:name,:ipaddress,:role,:env)
def print_machine_csv
name.length==0 ? printf(",") : printf("\"%s\",", name)
address.length==0 ? printf(",") : printf("\"%s\",", address)
role.length==0 ? printf(",") : printf("\"%s\",", role)
env.length==0 ? printf(",") : printf("\"%s\",", env)
printf("\n")
@josephreynolds
josephreynolds / interval_mode_class_error
Created November 2, 2011 01:40
TypeError: superclass mismatch for class Machine when running chef-client in Interval mode
Generated at Tue Nov 01 21:38:18 -0400 2011
TypeError: superclass mismatch for class Machine
/srv/chef/cache/cookbooks/nagios/libraries/machine.rb:2
/usr/local/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/run_context.rb:82:in `load'
/usr/local/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/run_context.rb:82:in `load_libraries'
/usr/local/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/run_context.rb:120:in `call'
/usr/local/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/run_context.rb:120:in `foreach_cookbook_load_segment'
/usr/local/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/run_context.rb:119:in `each'
/usr/local/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/run_context.rb:119:in `foreach_cookbook_load_segment'
/usr/local/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/run_context.rb:117:in `each'