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 | |
import secure | |
import pexpect | |
# the file containing the list of servers to log into | |
input_file = "script_list" | |
# The login creds | |
user = secure.USER |
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 | |
''' | |
email_throttle.py | |
Matt Jones [email protected] | |
Created 04.23.14 | |
Last Update 05.05.14 | |
Notes: |
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
type=SingleWithThreshold | |
ptype=RegExp | |
pattern=dsn=(\d+)\.(\d+)\.(\d+) | |
context=maillog_tripped | |
desc=$0 | |
action=shellcmd shutdown -h now | |
window=10 | |
thresh=2 | |
type=SingleWithThreshold |
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
type=SingleWithThreshold | |
ptype=RegExp | |
pattern=test | |
desc=$0 | |
action=eval %e {'[email protected]'} ; \ | |
eval %c {'/var/spool/icinga/cmd/icinga.cmd'} ; \ | |
pipe 'The email threshold was tripped at %t /n Stopping the sendmil service' /bin/mail -s "Email Storm Alert" %e ; \ | |
shellcmd /usr/bin/printf "[%%lu] DISABLE_NOTIFICATIONS" %u > %c | |
window=60 | |
thresh=25 |
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
#!/bin/bash +e | |
# | |
# DevOps - Auto-generated by Chef for XXX | |
# | |
# /etc/init.d/sensu-graceful-shutdown | |
# Subsystem for notifying the sensu server that a graceful shutdown has been initiated | |
# | |
# chkconfig: 12345 05 05 | |
# description: Notify the sensu server that a graceful shutdown has been initiated | |
# |
OlderNewer