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
# | |
# Figured out using: | |
# https://wiki.debian.org/DebianInstaller/Preseed/EditIso | |
# https://www.thegeekstuff.com/2009/07/how-to-view-modify-and-recreate-initrd-img/ | |
# https://gist.github.com/Aktau/5510437 | |
# https://www.cyberciti.biz/faq/how-to-extract-a-deb-file-without-opening-it-on-debian-or-ubuntu-linux/ | |
# | |
## Go home | |
cd |
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
* Shows a message while asserting like: | |
ok: [host] => { | |
"msg": "disk usage 4.2B of total 20.0GB (21.0%) (should exceed limit 90.0%)" | |
} | |
* Note this only looks at first mount point on current node | |
* Fails if disk is near-full | |
* Last step pushes to a push-based monitoring service, which will alert us if it doesn't get there after some time | |
* Need to setup a variable `disk_limit`, which is the max acceptable usage ratio, e.g. set it to 0.8 if you want to keep disks within 80% of max size |
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 python | |
# coding=utf-8 | |
import argparse | |
import datetime | |
import sys | |
import time | |
import threading | |
import traceback | |
import socketserver |
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
# this is a configurable version of an EventMachine syslogger | |
# It was build to replace https://github.com/melito/em-syslog | |
# | |
# You can instantiate many of them (no global variables) as | |
# well as configure the facility. It also quacks like a ruby | |
# logger so it can be interchanged with a ruby logger. | |
# | |
# Example: | |
# | |
# # 11 is the facility code for an FTP daemon |