summaryrefslogtreecommitdiffstats
path: root/lass/1systems/shodan.nix
diff options
context:
space:
mode:
authorlassulus <lass@lassul.us>2017-02-21 14:30:21 +0100
committerlassulus <lass@lassul.us>2017-02-21 14:30:21 +0100
commitd4445947aeacf9f133eaad375106cd1cfad84e25 (patch)
tree3c1cb9787b6d5ca7f8e724e31c09b1c282c5cdc5 /lass/1systems/shodan.nix
parentada1147bb69e0dec79c0b0fcf2c64c7df4576ad2 (diff)
l 1 shodan: setup hfos monitoring
Diffstat (limited to 'lass/1systems/shodan.nix')
-rw-r--r--lass/1systems/shodan.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/lass/1systems/shodan.nix b/lass/1systems/shodan.nix
index 232e91d90..82622d154 100644
--- a/lass/1systems/shodan.nix
+++ b/lass/1systems/shodan.nix
@@ -42,6 +42,26 @@ with import <stockholm/lib>;
pkgs.python27Packages.python
];
}
+ {
+ krebs.monit = let
+ echoToIrc = msg:
+ pkgs.writeDash "echo_irc" ''
+ set -euf
+ export LOGNAME=prism-alarm
+ ${pkgs.irc-announce}/bin/irc-announce \
+ ni.r 6667 ${config.networking.hostName}-alarm \#noise "${msg}" >/dev/null
+ '';
+ in {
+ enable = true;
+ http.enable = true;
+ alarms = {
+ hfos = {
+ test = "${pkgs.curl}/bin/curl -sf --insecure 'https://hfos.hackerfleet.de'";
+ alarm = echoToIrc "test hfos failed";
+ };
+ };
+ };
+ }
];
krebs.build.host = config.krebs.hosts.shodan;