Ad Widget

Collapse

Free space calculation by zabbix template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ritvish
    Junior Member
    • Jun 2025
    • 1

    #1

    Free space calculation by zabbix template


    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)
    Inherited Macros :
    {$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% /​
    The concern is that Zabbix is subtracting used space (135G) from total space (145G) the result of which is 10G hence no alert triggered however the actual available is 3.9G. So, there is always some difference in zabbix perceived available space and actual available and this will miss to generate critical alerts.



Working...