Skip to content

Instantly share code, notes, and snippets.

View tas50's full-sized avatar
🌪️
Producting. That's a thing right?

Tim Smith tas50

🌪️
Producting. That's a thing right?
View GitHub Profile
{
"client": {
"name": "myhost",
"address": "myip",
"subscriptions": [
"r_monitoring",
"production"
],
"keepalive": {
"thresholds": {
@tas50
tas50 / gist:3fe17a6d9fbede0a7669
Created May 7, 2014 01:36
Help an rspec newb
WTF am I doing wrong here?
mdadm ohai plugin:
Ohai.plugin(:Mdadm) do
provides 'mdadm'
def create_raid_device_mash(stdout)
device_mash = Mash.new
device_mash[:device_counts] = Mash.new
cvs diff: Diffing .
cvs diff: Diffing inc
cvs diff: Diffing reverses
Index: reverses/10.12.54
===================================================================
RCS file: /local/cvs/pri/reverses/10.12.54,v
retrieving revision 1.52
diff -u -r1.52 10.12.54
--- reverses/10.12.54 21 May 2014 20:17:03 -0000 1.52
+++ reverses/10.12.54 24 Jul 2014 20:22:23 -0000
@tas50
tas50 / gist:b2f3d9676bc90dd59cc8
Created August 21, 2014 19:23
Add new file for 10.12.17 for syseng usage
This is a new block that was previously allocated for logproc, but had never been used. Wayne is going to rename this for general syseng usage.
tsmith@pridns:~/pri/reverses$ cat 10.12.17
; 10.12.17.0/24 -- syseng servers
;1 router
;2
;3
;4
;5
@tas50
tas50 / gist:cf671e3121efdc669578
Created July 21, 2015 18:19
Chef LWRP for graphing to Librato
# Support whyrun
def whyrun_supported?
true
end
action :graph do
if node.chef_environment == 'production' || node.chef_environment == 'staging'
converge_by("Graph deploy of #{@new_resource.name}") do
graph_deploy
end
#!/usr/bin/env ruby
# encoding: UTF-8
# metrics-nut.rb
#
# DESCRIPTION:
# This plugin uses polls UPS metrics from NUT and produces
# Graphite formated output.
#
# OUTPUT:
# metric data
sensu-plugins Github Organization Report
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┓
┃ Repo Name ┃ Issues ┃ Pull Requests ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━━━━┫
┃ sensu-plugin ┃ 23 ┃ - ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━━━━┫
┃ GIR ┃ 13 ┃ - ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━━━━┫
chef-cookbooks Github Organization Report
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Totals:
Repos: 139
Pull requests: 349
Issues: 548
Watchers: 4075
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Repo Name ┃ Open PRs ┃ Issues ┃ Watchers ┃
@tas50
tas50 / gist:2890773
Created June 7, 2012 18:55
Failed chef install
pdxsmitht02:~ smitht$ cd /tmp
pdxsmitht02:tmp smitht$ curl -O http://production.cf.rubygems.org/rubygems/rubygems-1.8.10.tgz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 243k 100 243k 0 0 893k 0 --:--:-- --:--:-- --:--:-- 1207k
pdxsmitht02:tmp smitht$ tar zxf rubygems-1.8.10.tgz
pdxsmitht02:tmp smitht$ cd rubygems-1.8.10
pdxsmitht02:rubygems-1.8.10 smitht$ sudo ruby setup.rb --no-format-executable
Password:
RubyGems 1.8.10 installed
MBP_tsmith:~/dev/chef-cookbooks/cron kitchen test default-freebsd-102
-----> Starting Kitchen (v1.4.2)
-----> Cleaning up any prior instances of <default-freebsd-102>
-----> Destroying <default-freebsd-102>...
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
Vagrant instance <default-freebsd-102> destroyed.
Finished destroying <default-freebsd-102> (0m3.55s).
-----> Testing <default-freebsd-102>
-----> Creating <default-freebsd-102>...