I hereby claim:
- I am majormoses on github.
- I am majormoses (https://keybase.io/majormoses) on keybase.
- I have a public key ASDkf6DeBHYQYgrqCPmlhZXXHQ3YGmhjcg6xWRPUh-wI-Ao
To claim this, I am signing this object:
# in the repo root we checkout latest released version | |
$ git checkout 0.0.3 | |
Note: checking out '0.0.3'. | |
You are in 'detached HEAD' state. You can look around, make experimental | |
changes and commit them, and you can discard any commits you make in this | |
state without impacting any branches by performing another checkout. | |
If you want to create a new branch to retain commits you create, you may | |
do so (now or later) by using -b with the checkout command again. Example: |
# This file needs to be named mkrf_conf.rb | |
# so that rubygems will recognize it as a ruby extension | |
# file and not think it is a C extension file | |
require 'rubygems/dependency_installer.rb' | |
# Load up the rubygem's dependency installer to | |
# installer the gems we want based on the version | |
# of Ruby the user has installed |
# non-converge checks | |
default['MY_CUSTOM_NAMESPACE']['sensu']['checks']['chef_client']['command'] = "check-chef-nodes.rb -U #{Chef::Config[:chef_server_url]} -C :::chef.client.node|#{node.name}::: -K /etc/sensu/conf.d/chef-client.pem -t 1800" | |
default['MY_CUSTOM_NAMESPACE']['sensu']['checks']['chef_client']['handlers'] = ['pagerduty'] | |
default['MY_CUSTOM_NAMESPACE']['sensu']['checks']['chef_client']['subscribers'] = ['chef_server'] | |
default['MY_CUSTOM_NAMESPACE']['sensu']['checks']['chef_client']['interval'] = 60 | |
default['MY_CUSTOM_NAMESPACE']['sensu']['checks']['chef_client']['additional'] = { | |
'pager_team' => 'non_urgent', | |
'notification' => 'A chef client is not converging', | |
'occurrences' => 2, | |
'subdue' => { |
#! /usr/bin/env ruby | |
require 'sensu-plugin/check/cli' | |
require 'active_support/all' | |
require 'json' | |
dir_to_check = Dir.glob('/tmp/testdir/*') | |
# Dir always returns an empty list even if the dir does not even exist | |
if dir_to_check.empty? | |
p 'this is an empty dir, does not exist, or have permissions to view' |
$ knife cookbook cleanup --versions 5 --yes | |
The following cookbook versions will remain on the chef server: | |
7-zip: 1.0.2 | |
ant: | |
1.0.2 | |
1.0.3 | |
apache2: | |
3.1.0 |
#! /usr/bin/env ruby | |
# | |
# check-cc-heap-limit | |
# | |
# DESCRIPTION: | |
# A script that checks an http endpoint, parses json, and alerts when healthchecks fail | |
# | |
# OUTPUT: | |
# plain-text | |
# |
# drop in a template and immediately restart jenkins | |
template "#{node['jenkins']['master']['home']}/config.xml" do | |
source 'config.xml.erb' | |
variables({ | |
'github_client_id' => <REDACTED>, | |
'github_client_secret' => <REDACTED> | |
}) | |
owner node['jenkins']['master']['user'] | |
group node['jenkins']['master']['group'] | |
mode '0600' |
diff --git a/bin/metrics-logstash-node.rb b/bin/metrics-logstash-node.rb | |
index d8251b3..3975230 100755 | |
--- a/bin/metrics-logstash-node.rb | |
+++ b/bin/metrics-logstash-node.rb | |
@@ -112,32 +112,62 @@ class LogstashNodeMetrics < Sensu::Plugin::Metric::CLI::Graphite | |
metrics['process.open_file_descriptors'] = node['process']['open_file_descriptors'] | |
metrics['process.peak_open_file_descriptors'] = node['process']['peak_open_file_descriptors'] | |
metrics['process.max_file_descriptors'] = node['process']['max_file_descriptors'] | |
- | |
- node['pipeline']['events'].each do |key, value| |
I hereby claim:
To claim this, I am signing this object:
# test without debug and default options | |
$ time bundle exec ./bin/check-ssl-qualys.rb -d google.com | |
CheckSSLQualys OK: google.com rated A | |
real 2m48.673s | |
user 0m0.208s | |
sys 0m0.020s | |
# test without debug and default options | |
$ time bundle exec ./bin/check-ssl-qualys.rb -d google.com |