From 14097aeba660c3ae4286c6dd8b26ffe78bb09ed6 Mon Sep 17 00:00:00 2001 From: sterni Date: Tue, 23 Jan 2024 00:18:51 +0100 Subject: fix(sterni/ingeborg/netdata): silence disk_* alarms for virtual devs 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 Autosubmit: sterni --- users/sterni/machines/ingeborg/monitoring.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'users/sterni/machines/ingeborg') 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-, md, + # sd) 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 { -- cgit 1.4.1