Disable Disk Space Monitoring for Loop Devices

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Disable Disk Space Monitoring for Loop Devices


   KB 24161        Last updated on 2023-03-2  




0.00
(0 votes)

Problem

1st Scenario: Ubuntu VMs on AWS and Oracle Cloud are generating 100% disk space utilization alert continuously.

2nd Scenario: Exclude a specific volume from disk monitoring.


Sample 'df -Th' output:

zimbra@mail:~$ df -Th
Filesystem     Type      Size  Used Avail Use% Mounted on
udev           devtmpfs  7.9G     0  7.9G   0% /dev
tmpfs          tmpfs     1.6G  162M  1.5G  11% /run
/dev/sda1      ext4       97G  9.7G   88G  10% /
tmpfs          tmpfs     7.9G     0  7.9G   0% /dev/shm
tmpfs          tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs          tmpfs     7.9G     0  7.9G   0% /sys/fs/cgroup
/dev/sda15     vfat      105M  3.6M  101M   4% /boot/efi
/dev/loop6     squashfs   25M   25M     0 100% /snap/oracle-cloud-agent/8
/dev/loop1     squashfs   55M   55M     0 100% /snap/core18/1880
/dev/loop2     squashfs   42M   42M     0 100% /snap/oracle-cloud-agent/9
tmpfs          tmpfs     1.6G     0  1.6G   0% /run/user/1000
/dev/loop5     squashfs   56M   56M     0 100% /snap/core18/1885
/dev/loop0     squashfs   97M   97M     0 100% /snap/core/9804
/dev/loop4     squashfs   98M   98M     0 100% /snap/core/9993
zimbra@mail:~$


Solution

Solution 1: Exclude in Localconfig key "zmstat_df_excludes"

Exclude all loop devices from the monitoring.

su - zimbra 
zmlocalconfig -e zmstat_df_excludes='/dev/loop0:/dev/loop1:/dev/loop2:/dev/loop3:/dev/loop4:/dev/loop5:/dev/loop6'
zmstatctl restart 

Note: There was a bug in old ZCS versions where changing 'zmstat_df_excludes' values does not take effect until logrotate happens.


Solution 2: Exclude directly in "zmstat-df" executable file

Run sed command as ROOT user.

sed -i.bak 's/\/bin\/df -k/\/bin\/df -k -x squashfs -x tmpfs/g' /opt/zimbra/libexec/zmstat-df

Now restart the stats service:

su - zimbra 
zmstatctl restart 
Submitted by: Heera Singh Koranga
Verified Against: ZCS 9.0,8.8,8.7 Date Created: 2020-09-26
Article ID: https://wiki.zimbra.com/index.php?title=Disable_Disk_Space_Monitoring_for_Loop_Devices Date Modified: 2023-03-02



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »


Jump to: navigation, search