Zabbix Version : 6.0.9
Template name : Linux by Zabbix agent
HTML Code:
last(/server.example.com/vfs.fs.size[/,pused])>{$VFS.FS.PUSED.MAX.CRIT:"/"} and ((last(/server.example.com/vfs.fs.size[/,total])-last(/server.example.com/vfs.fs.size[/,used]))<{$VFS.FS.FREE.MIN.CRIT:"/"} or timeleft(/server.example.com/vfs.fs.size[/,pused],1h,100)<1d)
{$VFS.FS.FREE.MIN.CRIT} is 5G
{$VFS.FS.PUSED.MAX.CRIT} is 90%
As per above trigger expression there will be alert if:
disk %usage is above 90% AND
available space is less than 5G OR estimated time for full usage is less than 1day.
HTML Code:
root@server:~# df -h / Filesystem Size Used Avail Use% Mounted on /dev/mapper/ubuntu--vg-ubuntu--lv 145G 135G 3.9G 98% /