Adaptation of Prosody module from Exa Networks for Metronome
To isolate all hosts by default, add the module to your global modules_enabled:
modules_enabled = {
<?php | |
$to = "youremail@gmail.com"; | |
$subject = "DKIM test."; | |
$body = "Hi,\nThis is an DKIM test.\nGo check gmail header.; | |
if (mail($to, $subject, $body)) { | |
echo("<p>Successfully sent!</p>"); | |
} else { | |
echo("<p>Failed!</p>"); | |
} | |
?> |
LoadPlugin tail | |
<Plugin "tail"> | |
<File "/var/log/mail.log"> | |
Instance "postfix" | |
# number of connections | |
# (incoming) | |
<Match> | |
Regex "\\<postfix\\/smtpd\\[[0-9]+\\]: connect from\\>" | |
DSType "CounterInc" |
# Processes iostat output | |
# >iostat -d -m -x sda sdb 1 | bin/logstash -f iostat.conf | |
# | |
# Sample Output: | |
# | |
# Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await svctm %util | |
# sda 3.36 174.28 9.64 183.71 65.17 1431.99 15.49 0.61 3.16 0.09 1.65 | |
# sdb 0.00 0.00 742.87 4110.46 5830.48 16441.82 9.18 4.90 0.98 0.11 55.45 | |
#!/bin/bash | |
# | |
# cron ex: 25 5 * * * /usr/bin/nice -n 19 /usr/bin/ionice -c2 -n7 /root/scripts/gzed-log-purge.sh >> /root/scripts/cron.log | |
# Search files more than 14 days with .gz extension and remove it | |
find /var/log -type f -ctime +7 -regex ".*\.gz$" -delete |
[Definition] | |
failregex = Failed login for user .* from <HOST> | |
ignoreregex = |
#!/bin/bash | |
# | |
# cron ex: 15 5 * * * /usr/bin/nice -n 19 /usr/bin/ionice -c2 -n7 /root/scripts/vzdump-purge.sh >> /root/scripts/cron.log | |
path='' | |
# Search files more than 14 days and remove it | |
find $path -type f -ctime +14 -delete |
#!/bin/sh | |
# led is white if we have internet, turn orange if not. | |
while true ; do | |
if /bin/ping -qc 3 8.8.8.8 > /dev/null; then | |
/sbin/gpio disable 2 | |
/sbin/gpio enable 3 | |
else | |
/sbin/gpio disable 2 | |
/sbin/gpio disable 3 | |
fi |
#!/bin/sh | |
# | |
# cron ex: @reboot /usr/bin/nice -n 19 /usr/bin/ionice -c2 -n7 /root/scripts/100_up.sh >> /root/scripts/cron.log | |
while true ; do | |
# do ping with interface | |
if /bin/ping -qc 3 8.8.8.8 -I eth0.100 > /dev/null; then | |
if /bin/grep -q 0 /proc/net/nf_condition/100_up; then /bin/echo 1 > /proc/net/nf_condition/100_up; fi | |
else | |
# do ping with fwmark, and to another target | |
if /bin/ping -qc 3 8.8.4.4 -m 100 > /dev/null; then |
#!/bin/bash | |
# | |
# cron ex: 0 3 1 * * /usr/bin/nice -n 19 /usr/bin/ionice -c2 -n7 /root/scripts/backup-dbispconfig.sh >> /root/scripts/cron.log | |
DIR="/root/backup/" | |
MYSQLUSER="" # FOR SECURITY REASONS, CREATE AN READ ONLY USER FOR BACKUP! | |
# eg (as root): CREATE USER 'backup'@'localhost' IDENTIFIED BY 'RANDOMPASSWORD'; GRANT SELECT ON dbispconfig.* TO 'backup'@'localhost'; FLUSH PRIVILEGES; | |
MYSQLPASSWORD="" | |
MYSQLDATABASE="dbispconfig" | |
DATE=$(date +"%Y%m%d") |