ma stats/server: announce errors into #noise

This commit is contained in:
makefu 2017-09-29 21:34:38 +02:00
parent 8962c8f1fc
commit ff5e7c0dcb
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225

View File

@ -2,6 +2,8 @@
with import <stockholm/lib>; with import <stockholm/lib>;
let let
irc-server = "ni.r";
irc-nick = "m-alarm";
collectd-port = 25826; collectd-port = 25826;
influx-port = 8086; influx-port = 8086;
grafana-port = 3000; # TODO nginx forward grafana-port = 3000; # TODO nginx forward
@ -37,9 +39,9 @@ in {
echoToIrc = pkgs.writeDash "echo_irc" '' echoToIrc = pkgs.writeDash "echo_irc" ''
set -euf set -euf
data="$(${pkgs.jq}/bin/jq -r .message)" data="$(${pkgs.jq}/bin/jq -r .message)"
export LOGNAME=malarm export LOGNAME=${irc-nick}
${pkgs.irc-announce}/bin/irc-announce \ ${pkgs.irc-announce}/bin/irc-announce \
irc.freenode.org 6667 malarm \#krebs-bots "$data" >/dev/null ${irc-server} 6667 ${irc-nick} \#noise "$data" >/dev/null
''; '';
in { in {
enable = true; enable = true;