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
include Opscode::Aws::Ec2 | |
#Auto locates and attached ebs devices based on the data bag they reside in. The following test cases need to be performed | |
# Create multiple resources with new node: PASS | |
# | |
# Re-attach multiple resources after a reboot: PASS | |
# | |
# Create resources across 2 runs. First run creates first raid set, second run re-attaches then creates: PASS | |
# |
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
node_list = { :nodeip1 => "server1", :nodeip2 => "server2", etc } | |
node_list.each do |k,v| | |
if k == node["ip_address"] | |
node.set["zabbix_windows"]["agent"]["servers"] = v | |
end | |
end |
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
require 'rubygems' if RUBY_VERSION < '1.9.0' | |
require "net/https" | |
require 'json' | |
require 'sensu-plugin/check/cli' | |
class checkSplunk < Sensu::Plugin::Check::CLI | |
def api_request(opts={}) | |
o = { | |
:host => '', |
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
class Chef::Provider::JsonFile < Chef::Provider::File | |
def load_json(path) | |
JSON.parse(::File.read(path)) rescue Hash.new | |
end | |
def dump_json(obj) | |
JSON.pretty_generate(obj) + "\n" | |
end | |
def to_mash(obj) |
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
# | |
# Welcome to the sensu-cli. | |
# ______ | |
# .-' '-. | |
# .' __ '. | |
# / / \ \ | |
# ------------------ | |
# /\ | |
# '--' | |
# SENSU |