From a0c494db8b26f2b140116bc29df4e42c206e86cd Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 18 Sep 2020 10:59:05 +0200 Subject: shack/muell_mail: bump revision --- krebs/2configs/shack/muell_mail.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/krebs/2configs/shack/muell_mail.nix b/krebs/2configs/shack/muell_mail.nix index 409278954..481564719 100644 --- a/krebs/2configs/shack/muell_mail.nix +++ b/krebs/2configs/shack/muell_mail.nix @@ -4,8 +4,8 @@ let pkg = pkgs.callPackage ( pkgs.fetchgit { url = "https://git.shackspace.de/rz/muell_mail"; - rev = "57b67c95052d90044137b2c89007a371dc389afd"; - sha256 = "1grkzs6fxjnc2bv4kskj63d5sb4qxz6yyr85nj0da9hn7qkk4jkj"; + rev = "c3e43687879f95e01a82ef176fa15678543b2eb8"; + sha256 = "0hgchwam5ma96s2v6mx2jfkh833psadmisjbm3k3153rlxp46frx"; }) { mkYarnPackage = pkgs.yarn2nix-moretea.mkYarnPackage; }; home = "/var/lib/muell_mail"; cfg = toString ; -- cgit v1.2.3 From 9ddea79d0537eddee1e6d372403bc2f3bbe07675 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 22 Sep 2020 00:53:54 +0200 Subject: shack/prometheus: set loglevel to info --- krebs/2configs/shack/prometheus/alertmanager-telegram.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/krebs/2configs/shack/prometheus/alertmanager-telegram.nix b/krebs/2configs/shack/prometheus/alertmanager-telegram.nix index 2df63e520..8527001cb 100644 --- a/krebs/2configs/shack/prometheus/alertmanager-telegram.nix +++ b/krebs/2configs/shack/prometheus/alertmanager-telegram.nix @@ -8,7 +8,7 @@ DynamicUser = true; StateDirectory = "alertbot"; ExecStart = ''${pkgs.alertmanager-bot-telegram}/bin/alertmanager-bot \ - --alertmanager.url=http://alert.prometheus.shack --log.level=debug \ + --alertmanager.url=http://alert.prometheus.shack --log.level=info \ --store=bolt --bolt.path=/var/lib/alertbot/bot.db \ --listen.addr="0.0.0.0:16320" \ --template.paths=${./templates}/shack.tmpl''; -- cgit v1.2.3 From 49df24b5bbfd61b7d86f65d222fc0534732cbc88 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 22 Sep 2020 00:54:25 +0200 Subject: wolf.r: manage light.shack web-interface in shackspace --- krebs/1systems/wolf/config.nix | 2 ++ krebs/2configs/shack/light.shack.nix | 12 ++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 krebs/2configs/shack/light.shack.nix diff --git a/krebs/1systems/wolf/config.nix b/krebs/1systems/wolf/config.nix index a9e8aafee..0160f9ebb 100644 --- a/krebs/1systems/wolf/config.nix +++ b/krebs/1systems/wolf/config.nix @@ -27,6 +27,8 @@ in # provide light control api + # light.shack web-ui + # send mail if muell was not handled # send mail if muell was not handled diff --git a/krebs/2configs/shack/light.shack.nix b/krebs/2configs/shack/light.shack.nix new file mode 100644 index 000000000..8e01cb1bf --- /dev/null +++ b/krebs/2configs/shack/light.shack.nix @@ -0,0 +1,12 @@ +{ config, pkgs, ... }: +let + light-shack-src = pkgs.fetchgit { + url = "https://git.shackspace.de/rz/standby.shack"; + rev = "e1b90a0a"; + sha256 = "07fmz63arc5rxa0a3778srwz0jflp4ad6xnwkkc56hwybby0bclh"; + }; + web-dir = "${light-shack-src}/client/www/"; +in +{ + services.nginx.virtualHosts."light.shack".locations."/".root = web-dir; +} -- cgit v1.2.3 From 75e3df7fd3c2c83fff5d58c05870a00052ec34a5 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 24 Sep 2020 23:38:15 +0200 Subject: ma pkgs.tt-rss: bump to 2020-09-23 fixes critical security issues as reported in https://www.digeex.de/blog/tinytinyrss/ --- makefu/5pkgs/tt-rss/default.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 makefu/5pkgs/tt-rss/default.nix diff --git a/makefu/5pkgs/tt-rss/default.nix b/makefu/5pkgs/tt-rss/default.nix new file mode 100644 index 000000000..4907a73a5 --- /dev/null +++ b/makefu/5pkgs/tt-rss/default.nix @@ -0,0 +1,25 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + pname = "tt-rss"; + version = "2020-09-23"; + rev = "d0ed7890df"; + + src = fetchurl { + url = "https://git.tt-rss.org/git/tt-rss/archive/${rev}.tar.gz"; + sha256 = "1b2fczd41bqg9bq37r99svrqswr9qrp35m6gn3nz032yqcwc22ij"; + }; + + installPhase = '' + mkdir $out + cp -ra * $out/ + ''; + + meta = with stdenv.lib; { + description = "Web-based news feed (RSS/Atom) aggregator"; + license = licenses.gpl2Plus; + homepage = "https://tt-rss.org"; + maintainers = with maintainers; [ globin zohl ]; + platforms = platforms.all; + }; +} -- cgit v1.2.3 From 859b7d66884385e1ed1efc5b51467587108c7bb4 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 25 Sep 2020 12:38:54 +0200 Subject: ma stats/server: disable kapacitor will now use prometheus + alertmanager --- makefu/2configs/stats/server.nix | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/makefu/2configs/stats/server.nix b/makefu/2configs/stats/server.nix index bb8fd1750..a2d0693ab 100644 --- a/makefu/2configs/stats/server.nix +++ b/makefu/2configs/stats/server.nix @@ -41,40 +41,7 @@ in { bind-address = ":${toString collectd-port}"; }]; }; - krebs.kapacitor = - let - echoToIrc = pkgs.writeDash "echo_irc" '' - set -euf - data="$(${pkgs.jq}/bin/jq -r .message)" - export LOGNAME=${irc-nick} - ${pkgs.irc-announce}/bin/irc-announce \ - ${irc-server} 6667 ${irc-nick} \#noise "$data" >/dev/null - ''; - in { - enable = true; - alarms = { - cpu_deadman.database = db; - cpu_deadman.text = '' - var data = batch - |query(${"'''"} - SELECT mean("value") AS mean - FROM "collectd_db"."default"."cpu_value" - WHERE "type_instance" = 'idle' AND "type" = 'percent' fill(0) - ${"'''"}) - .period(10m) - .every(1m) - .groupBy('host') - data |alert() - .crit(lambda: "mean" < 50) - .stateChangesOnly() - .exec('${echoToIrc}') - data |deadman(1.0,5m) - .stateChangesOnly() - .exec('${echoToIrc}') - ''; - }; - }; networking.firewall.extraCommands = '' iptables -A INPUT -i retiolum -p udp --dport ${toString collectd-port} -j ACCEPT iptables -A INPUT -i retiolum -p tcp --dport ${toString influx-port} -j ACCEPT -- cgit v1.2.3