- Public Github Repo with Packer VirtualBox templates for Fedora 19, 20
- Script capable of creating box, testing, and uploading to S3 on success (to be run via CI)
- Bare-bones Vagrantfile example
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
echo '{ | |
"handlers": ["debug"], | |
"name": "push_woot_test", | |
"output": "woot!", | |
"status": 0 | |
}' | nc -w1 127.0.0.1 3030 |
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
execute "say_hello_to_bob" do | |
command "echo 'hello again' >> /home/bob/hello.txt" | |
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
{ | |
"checks": { | |
"noisy_queue_check": { | |
"handler": "default", | |
"command": "/etc/sensu/plugins/check-queue-length.rb", | |
"interval": 60, | |
"refresh": 60, | |
"occurrences": 10, | |
"subscribers": [ "workers" ], | |
"subdue" : { |
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
{ | |
"handlers": { | |
"remediator": { | |
"type": "pipe", | |
"command": "/etc/sensu/handlers/remediator.rb" | |
}, | |
}, | |
"checks": { | |
"fail_with_remediation": { | |
"command": "/bin/false", |
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
# For some reason, coffee appears to exit with | |
# non-zero status (1) when it recieves a SIGTERM | |
# by default. This doesn't play nice with process | |
# managers like systemd. This simple two-liner | |
# will allow your coffee scripts to exit cleanly. | |
process.on 'SIGTERM', -> | |
process.exit() |
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
{ | |
"checks": { | |
"check_something": { | |
"command": "ps aux | grep cron", | |
"interval": 60, | |
"subscribers": ["application_server"], | |
"handlers": ["debug", "irc", "remediator"], | |
"remediation": { | |
"light_remediation": { | |
"occurrences": [1, 2], |
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
#!/usr/bin/env ruby | |
# | |
# Check Linux system load | |
# === | |
# | |
# Copyright 2012 Sonian, Inc <[email protected]> | |
# | |
# Released under the same terms as Sensu (the MIT license); see LICENSE | |
# for details. |
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
{ | |
"handlers": { | |
"victorops": { | |
"type": "pipe", | |
"command": "/etc/sensu/handlers/victorops.rb" | |
} | |
}, | |
"checks": { | |
"tmp_check": { | |
"description": "check that /tmp exists ", |
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
# Lint JSON with python (the exit 255 stops xargs after the first failed command) | |
find . -name "*.json" -print | xargs -Ixx bash -c "echo JSON linting xx 1>&2; cat xx | python -mjson.tool > /dev/null || exit 255" |