summaryrefslogtreecommitdiffstats
path: root/lass/2configs/monitoring/monit-alarms.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2018-05-03 18:45:55 +0200
committermakefu <github@syntax-fehler.de>2018-05-03 18:45:55 +0200
commit8156ab92378422d36d0af55c8d4b3b5742f4305c (patch)
treefcbcb08991681dcd24a88d7a9bac7f22840df575 /lass/2configs/monitoring/monit-alarms.nix
parent45377068c0bfbb009b7cbe41dbca97dd44c9c955 (diff)
parent28d6704a0d617ca7d379b836ab9fdd4d6a0be868 (diff)
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'lass/2configs/monitoring/monit-alarms.nix')
-rw-r--r--lass/2configs/monitoring/monit-alarms.nix44
1 files changed, 0 insertions, 44 deletions
diff --git a/lass/2configs/monitoring/monit-alarms.nix b/lass/2configs/monitoring/monit-alarms.nix
deleted file mode 100644
index 2cfc292e5..000000000
--- a/lass/2configs/monitoring/monit-alarms.nix
+++ /dev/null
@@ -1,44 +0,0 @@
-{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 \
- irc.r 6667 ${config.networking.hostName}-alarm \#noise "${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";
- };
- ubik = {
- test = "${pkgs.curl}/bin/curl -sf 'https://ubikmedia.de'";
- alarm = echoToIrc "test ubik failed";
- };
- cac-panel = {
- test = "${pkgs.curl}/bin/curl -sf 'https://panel.cloudatcost.com/login.php'";
- alarm = echoToIrc "test cac-panel failed";
- };
- radio = {
- test = pkgs.writeBash "check_stream" ''
- ${pkgs.curl}/bin/curl -sif http://lassul.us:8000/radio.ogg \
- | ${pkgs.gawk}/bin/awk '/^\r$/{exit}{print $0}' \
- | ${pkgs.gnugrep}/bin/grep -q "200 OK" || exit "''${PIPESTATUS[0]}"
- '';
- alarm = echoToIrc "test radio failed";
- };
- };
- };
-
- krebs.iptables.tables.filter.INPUT.rules = [
- { predicate = "-p tcp -i retiolum --dport 9093"; target = "ACCEPT"; }
- ];
-}
-