summaryrefslogtreecommitdiffstats
path: root/lass/2configs/monitoring/monit-alarms.nix
diff options
context:
space:
mode:
authorlassulus <lass@lassul.us>2017-02-13 14:32:00 +0100
committerlassulus <lass@lassul.us>2017-02-13 14:32:00 +0100
commitfe46163e586b2b19126fffd1a7710e1b61349389 (patch)
treea042aaf785dcef55725df789bc5d651014310273 /lass/2configs/monitoring/monit-alarms.nix
parent632b194ad35ad49e3e09935c66f1ae52f93e34f4 (diff)
l 2 monitoring: add monit-alarms
Diffstat (limited to 'lass/2configs/monitoring/monit-alarms.nix')
-rw-r--r--lass/2configs/monitoring/monit-alarms.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/lass/2configs/monitoring/monit-alarms.nix b/lass/2configs/monitoring/monit-alarms.nix
new file mode 100644
index 000000000..a85738538
--- /dev/null
+++ b/lass/2configs/monitoring/monit-alarms.nix
@@ -0,0 +1,34 @@
+{pkgs, config, ...}:
+with import <stockholm/lib>;
+let
+ echoToIrc = msg:
+ pkgs.writeDash "echo_irc" ''
+ set -euf
+ export LOGNAME=prism-alarm
+ ${pkgs.irc-announce}/bin/irc-announce \
+ ni.r 6667 prism-alarm \#retiolum "${msg}" >/dev/null
+ '';
+
+in {
+ krebs.monit = {
+ enable = true;
+ http.enable = true;
+ alarms.nirwanabluete = {
+ test = "${pkgs.curl}/bin/curl -sf 'https://nirwanabluete.de/'";
+ alarm = echoToIrc "test nirwanabluete failed";
+ };
+ alarms.ubik = {
+ test = "${pkgs.curl}/bin/curl -sf 'https://ubikmedia.de'";
+ alarm = echoToIrc "test ubik failed";
+ };
+ alarms.hfos = {
+ test = "${pkgs.curl}/bin/curl -sf --insecure 'https://hfos.hackerfleet.de'";
+ alarm = echoToIrc "test hfos failed";
+ };
+ alarms.cac-panel = {
+ test = "${pkgs.curl}/bin/curl -sf 'https://panel.cloudatcost.com/login.php'";
+ alarm = echoToIrc "test cac-panel failed";
+ };
+ };
+}
+