[ZBXNEXT-6698] Improve and fix filesystem free space checks Created: 2021 Jun 03  Updated: 2024 Jul 03  Resolved: 2024 May 10

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Templates (T)
Affects Version/s: 5.0.12
Fix Version/s: 6.0.30rc1, 6.4.15rc1, 7.0.0rc1, 7.0 (plan)

Type: Change Request Priority: Trivial
Reporter: Evren Yurtesen Assignee: Andrey Tocko (Inactive)
Resolution: Fixed Votes: 4
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux


Attachments: File Linux agent_Edit.md     File Linux by Zabbix agent active_Edit.md     File OpenBSD by Zabbix agent_Edit.md     File Solaris by Zabbix agent_Edit.md     File aix_Edit.md     File freebsd_Edit.md     File hp-ux_Edit.md     File linux_prom_Edit.md     File linux_snmp_snmp_Edit.md     File macOS by Zabbix agent_Edit.md     File windows_agent_Edit.md     File windows_agent_active_Edit.md     File windows_snmp_Edit.md    
Issue Links:
Sub-task
depends on ZBX-23665 not getting partition alert Closed
depends on ZBX-19502 Disk space triggers are not always tr... Closed
depends on ZBX-22567 latest data shows 99% used space, tri... Closed
depends on ZBX-23718 Wrong description in the "Disk space ... Closed
Team: Team INT
Story Points: 3

 Description   

The filesystem free space checks do not function properly and need serious revamping

1- First and foremost a bug makes them not work:

https://support.zabbix.com/browse/ZBX-19502

For fixing the bug report above, "free" space check should be added.

 

vfs.fs.size[{#FSNAME},free]

 

 

2- Use macros for the minimum free WARN (10G) and CRIT (5G) values.

 

{$VFS.FS.FREE.MIN.CRIT:"{#FSNAME}  -> 5G
{$VFS.FS.FREE.MIN.WARN:"{#FSNAME}  -> 10G

 

 

3- Make the `timeleft()` prediction optional. Why? Because this does not work for filesystems where there is bursts of data transfer. For example a filesystem where backups are taken. Free space may be reduced very quickly and cause erroneous warnings.

For example for a 1TB filesystem. The free space warning trigger activates after 80% when means there is still 200GB space. A backup process which take 2 hours is able to trigger false warnings.

Same goes for a filesystem with recordings. A recorder may be constantly writing data to disk. The trigger activates even though some process regularly cleans up data.

I am not sure what is the best way to do it. Perhaps with an ON/OFF switch?

{$VFS.FS.PFULL.PREDICT:"{#FSNAME}"}=1

 

 

So the final result with problems 1,2 and 3 the resulting triggers would be like:

 

{Template Module Linux filesystems by Zabbix agent:vfs.fs.size[{#FSNAME},pused].last()}>{$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"} and ({Template Module Linux filesystems by Zabbix agent:vfs.fs.size[{#FSNAME},free].last()}<{$VFS.FS.FREE.MIN.CRIT:"{#FSNAME}"} or ({$VFS.FS.PFULL.PREDICT:"{#FSNAME}"}=1 and {Template Module Linux filesystems by Zabbix agent:vfs.fs.size[{#FSNAME},pused].timeleft(1h,,100)}<1d))



{Template Module Linux filesystems by Zabbix agent:vfs.fs.size[{#FSNAME},pused].last()}>{$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"} and ({Template Module Linux filesystems by Zabbix agent:vfs.fs.size[{#FSNAME},free].last()}<{$VFS.FS.FREE.MIN.WARN:"{#FSNAME}"} or ({$VFS.FS.PFULL.PREDICT:"{#FSNAME}"}=1 and {Template Module Linux filesystems by Zabbix agent:vfs.fs.size[{#FSNAME},pused].timeleft(1h,,100)}<1d))

 

 

4a- Update the graph prototype for the "{#FSNAME}: Disk space usage" to not use "used space" because when disk is full, the chart never reaches 100%. Instead use Total-Free to calculate used space. Because used space does NOT consider the reserved space! It gives a false sensation that there is actually free space because Total - Used > 0 !

4b-Update the graph prototype for the "{#FSNAME}: Disk space usage" from "pie chart" to "normal". Why? Because the pie chart is not useful. It does not show the general direction that the filesystem usage is moving. Was the filesystem getting more and more full every month? or was it staying same? It is impossible to see from a pie chart.

 

Thank you!



 Comments   
Comment by Andrey Tocko (Inactive) [ 2024 May 08 ]

Available in:

Comment by Marianna Zvaigzne [ 2024 May 14 ]

Documentation updated:

Generated at Sun Apr 20 21:25:14 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.