diff options
Diffstat (limited to 'krebs/2configs')
-rw-r--r-- | krebs/2configs/reaktor2.nix | 6 | ||||
-rw-r--r-- | krebs/2configs/shack/glados/default.nix | 1 | ||||
-rw-r--r-- | krebs/2configs/shack/prometheus/alert-rules.nix | 4 |
3 files changed, 7 insertions, 4 deletions
diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix index 2ed0b08fb..233fe2fd7 100644 --- a/krebs/2configs/reaktor2.nix +++ b/krebs/2configs/reaktor2.nix @@ -61,7 +61,7 @@ let ]; hooks.PRIVMSG = [ { - pattern = "^bier bal(an(ce)?)?$"; + pattern = "^bier (ballern|bal(an(ce)?)?)$"; activate = "match"; command = { env = { @@ -90,6 +90,10 @@ let amt=$2 unit=$3 printf '%s\n %s %d %s\n %s %d %s\n' "$(date -Id)" "$tonick" "$amt" "$unit" "$_from" "$(expr 0 - "''${amt#+}")" "$unit" >> $state_file + ${pkgs.hledger}/bin/hledger -f $state_file bal -N -O csv \ + | ${pkgs.coreutils}/bin/tail +2 \ + | ${pkgs.miller}/bin/mlr --icsv --opprint cat \ + | ${pkgs.gnugrep}/bin/grep "$_from" ''; }; } diff --git a/krebs/2configs/shack/glados/default.nix b/krebs/2configs/shack/glados/default.nix index e7860338c..7c941a66a 100644 --- a/krebs/2configs/shack/glados/default.nix +++ b/krebs/2configs/shack/glados/default.nix @@ -46,7 +46,6 @@ in { services.home-assistant = { enable = true; - autoExtraComponents = true; package = unstable.home-assistant.overrideAttrs (old: { doInstallCheck = false; }); diff --git a/krebs/2configs/shack/prometheus/alert-rules.nix b/krebs/2configs/shack/prometheus/alert-rules.nix index 65e5d9005..5ba49ede6 100644 --- a/krebs/2configs/shack/prometheus/alert-rules.nix +++ b/krebs/2configs/shack/prometheus/alert-rules.nix @@ -8,7 +8,7 @@ in { { name = "shack-env"; rules = [ { - alert = "RootPartitionFull"; + alert = "Wolf RootPartitionFull"; for = "30m"; expr = ''(node_filesystem_avail_bytes{alias="wolf.shack",mountpoint="/"} * 100) / node_filesystem_size_bytes{alias="wolf.shack",mountpoint="/"} < ${disk_free_threshold}''; labels.severity = "warning"; @@ -24,7 +24,7 @@ in { 6. as a last resort the root disk can be expanded via `lvresize -L +10G /dev/pool/root && btrfs filesystem resize max /` ''; } { - alert = "RootPartitionFull"; + alert = "Puyak RootPartitionFull"; for = "30m"; expr = ''(node_filesystem_avail_bytes{alias="puyak.shack",mountpoint="/"} * 100) / node_filesystem_size_bytes{alias="puyak.shack",mountpoint="/"} < ${disk_free_threshold}''; labels.severity = "warning"; |