From c3d70afe3f383f4b21fa7b62399043f3857fa0b7 Mon Sep 17 00:00:00 2001 From: Gerry Kopec Date: Tue, 21 Jun 2022 13:30:35 -0400 Subject: [PATCH] Update collectd disk usage checks for debian Update filesystems tracked by collectd: - new filesystems in debian: /var, /boot/efi - filesystems with different paths in debian: /opt/etcd, /opt/platform, /opt/extension, /opt/backups, /scratch - add /opt/platform-backup to both centos and debian Test Plan: PASS: Centos: verify correct filesystems are monitored by collectd PASS: Debian: verify correct filesystems are monitored by collectd PASS: Add additional files to monitored filesystem until usage hit 80% and then 90%. Verify that major and critical alarms are triggered PASS: Remove additional files and verify that alarm clears when usage drops below 80% Closes-Bug: 1979367 Signed-off-by: Gerry Kopec Change-Id: Ifc063c29ab825a748516302b231e95ff353e94aa --- collectd-extensions/src/df.conf | 9 +++++++++ collectd-extensions/src/fm_notifier.py | 11 ++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/collectd-extensions/src/df.conf b/collectd-extensions/src/df.conf index dbb4ca8..5092888 100644 --- a/collectd-extensions/src/df.conf +++ b/collectd-extensions/src/df.conf @@ -24,6 +24,15 @@ MountPoint "/var/lib/kubelet" MountPoint "/var/lib/nova/instances" MountPoint "/opt/backups" + MountPoint "/opt/platform-backup" + MountPoint "/boot/efi" + MountPoint "/var" + MountPoint "/var/rootdirs/opt/etcd" + MountPoint "/var/rootdirs/opt/platform" + MountPoint "/var/rootdirs/opt/extension" + MountPoint "/var/rootdirs/opt/backups" + MountPoint "/var/rootdirs/opt/platform-backup" + MountPoint "/var/rootdirs/scratch" diff --git a/collectd-extensions/src/fm_notifier.py b/collectd-extensions/src/fm_notifier.py index 57045b9..e5c6ff6 100755 --- a/collectd-extensions/src/fm_notifier.py +++ b/collectd-extensions/src/fm_notifier.py @@ -180,7 +180,16 @@ DF_MANGLED_DICT = { 'opt-platform': '/opt/platform', 'opt-etcd': '/opt/etcd', 'opt-extension': '/opt/extension', - 'opt-backups': '/opt/backups'} + 'opt-backups': '/opt/backups', + 'opt-platform-backup': '/opt/platform-backup', + 'boot-efi': '/boot/efi', + 'var': '/var', + 'var-rootdirs-opt-etcd': '/var/rootdirs/opt/etcd', + 'var-rootdirs-opt-platform': '/var/rootdirs/opt/platform', + 'var-rootdirs-opt-extension': '/var/rootdirs/opt/extension', + 'var-rootdirs-opt-backups': '/var/rootdirs/opt/backups', + 'var-rootdirs-opt-platform-backup': '/var/rootdirs/opt/platform-backup', + 'var-rootdirs-scratch': '/var/rootdirs/scratch'} # ADD_NEW_PLUGIN: add new alarm id definition