Skip to content

Instantly share code, notes, and snippets.

View msaladna's full-sized avatar
💭
🎷 Automotivation 🎵

Matt Saladna msaladna

💭
🎷 Automotivation 🎵
View GitHub Profile
diff --git a/conf/conf.d/director.conf b/conf/conf.d/director.conf
index 0024f9f..170f6b0 100644
--- a/conf/conf.d/director.conf
+++ b/conf/conf.d/director.conf
@@ -32,8 +32,8 @@ Messages {
# tell (most) people that its coming from an automated source.
#
- mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
- operatorcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"
Vultr 2 GB, ATL, apnscp v3.0.32
Apr 27 21:29:28 vultr sudo: ===============================================================================
Apr 27 21:29:28 vultr sudo: php/build-from-source ------------------------------------------------- 945.81s
Apr 27 21:29:28 vultr sudo: packages/install ------------------------------------------------------ 672.09s
Apr 27 21:29:28 vultr sudo: mail/webmail-horde ---------------------------------------------------- 362.28s
Apr 27 21:29:28 vultr sudo: software/passenger ---------------------------------------------------- 323.47s
Apr 27 21:29:28 vultr sudo: software/rbenv -------------------------------------------------------- 258.06s
Apr 27 21:29:28 vultr sudo: apnscp/initialize-filesystem-template --------------------------------- 142.00s
Apr 27 21:29:28 vultr sudo: clamav/support --------------------------------------------------------- 95.59s
#!/usr/bin/ruby
require 'net/https'
PO_TOKEN={{ PUSHOVER_TOKEN }}
PO_USER={{ PUSHOVER_USER }}
re = Regexp.new('\bService\s*(?<svc>[^$]+)^$^\s*Date:\s*(?<date>.*?)$[\r\n]{1,2}
^\s*Action:\s*(?<action>.*?)$[\r\n]{1,2}
^\s*Host:\s*(?<host>(?<node>[^.]+).*?)$[\r\n]{1,2}
^\s*Description:\s*(?<desc>.*?)$', Regexp::MULTILINE|Regexp::EXTENDED)
@msaladna
msaladna / monit.rb
Created March 5, 2018 17:41
Monit -> Pushover bridge
#!/usr/bin/ruby
require 'net/https'
re = Regexp.new('\bService\s*(?<svc>[^$]+)^$^\s*Date:\s*(?<date>.*?)$[\r\n]{1,2}
^\s*Action:\s*(?<action>.*?)$[\r\n]{1,2}
^\s*Host:\s*(?<host>(?<node>[^.]+).*?)$[\r\n]{1,2}
^\s*Description:\s*(?<desc>.*?)$', Regexp::MULTILINE|Regexp::EXTENDED)
# Take mail straight from STDIN