l 2 monit: add radio test
This commit is contained in:
parent
08973e5e00
commit
6dabaf5afe
@ -13,22 +13,32 @@ in {
|
|||||||
krebs.monit = {
|
krebs.monit = {
|
||||||
enable = true;
|
enable = true;
|
||||||
http.enable = true;
|
http.enable = true;
|
||||||
alarms.nirwanabluete = {
|
alarms = {
|
||||||
|
nirwanabluete = {
|
||||||
test = "${pkgs.curl}/bin/curl -sf 'https://nirwanabluete.de/'";
|
test = "${pkgs.curl}/bin/curl -sf 'https://nirwanabluete.de/'";
|
||||||
alarm = echoToIrc "test nirwanabluete failed";
|
alarm = echoToIrc "test nirwanabluete failed";
|
||||||
};
|
};
|
||||||
alarms.ubik = {
|
ubik = {
|
||||||
test = "${pkgs.curl}/bin/curl -sf 'https://ubikmedia.de'";
|
test = "${pkgs.curl}/bin/curl -sf 'https://ubikmedia.de'";
|
||||||
alarm = echoToIrc "test ubik failed";
|
alarm = echoToIrc "test ubik failed";
|
||||||
};
|
};
|
||||||
alarms.hfos = {
|
hfos = {
|
||||||
test = "${pkgs.curl}/bin/curl -sf --insecure 'https://hfos.hackerfleet.de'";
|
test = "${pkgs.curl}/bin/curl -sf --insecure 'https://hfos.hackerfleet.de'";
|
||||||
alarm = echoToIrc "test hfos failed";
|
alarm = echoToIrc "test hfos failed";
|
||||||
};
|
};
|
||||||
alarms.cac-panel = {
|
cac-panel = {
|
||||||
test = "${pkgs.curl}/bin/curl -sf 'https://panel.cloudatcost.com/login.php'";
|
test = "${pkgs.curl}/bin/curl -sf 'https://panel.cloudatcost.com/login.php'";
|
||||||
alarm = echoToIrc "test cac-panel failed";
|
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";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user