about summary refs log tree commit diff
path: root/users
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2024-01-22T23·18+0100
committerclbot <clbot@tvl.fyi>2024-01-23T19·56+0000
commit14097aeba660c3ae4286c6dd8b26ffe78bb09ed6 (patch)
tree8e92abf59e9147037b64fe5ba197a83beb3451b0 /users
parent85421b7f973e64ce9ec6f8d675854b0970967794 (diff)
fix(sterni/ingeborg/netdata): silence disk_* alarms for virtual devs r/7444
The btrfs scrub causes 8 WARNING messages otherwise, followed by
8 CLEAR messages.

Change-Id: Ib43d419461c154f74022b3051e256102ab2b03cb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10688
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'users')
-rw-r--r--users/sterni/machines/ingeborg/monitoring.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/users/sterni/machines/ingeborg/monitoring.nix b/users/sterni/machines/ingeborg/monitoring.nix
index a199a6df25a0..6244bc5e88ce 100644
--- a/users/sterni/machines/ingeborg/monitoring.nix
+++ b/users/sterni/machines/ingeborg/monitoring.nix
@@ -115,6 +115,27 @@ in
 
               MSG="netdata: $status ''${name//_/ } ($chart): ''${summary//_/ } = $value_string"
 
+              # Filter rules by chart name. This is necessary, since the "enabled alarms"
+              # filter only allows for filtering alarm types, not specific alarms
+              # belonging to that alarm.
+              case "$chart" in
+                # netdata prefers the automatically assigned names (dm-<n>, md<n>,
+                # sd<c>) over ids for alerts, so this configuration assumes that
+                # we have two physical disks which we kind of assert using the
+                # grub configuration (it is more difficult with the soft raid
+                # config).
+                # ${assert builtins.length config.boot.loader.grub.devices == 2; ""}
+                disk_util.sda | disk_util.sdb | disk_backlog.sda | disk_backlog.sdb)
+
+                  ;;
+                disk_util.* | disk_backlog.*)
+                  echo "$0: INFO: DISCARDING message: $MSG" >&2
+                  exit 0
+                  ;;
+                *)
+                  ;;
+              esac
+
               echo "$0: INFO: sending message: $MSG" >&2
               ${
                 mkIrcMessager {