Ad Widget

Collapse

vfs.fs.size - show with volume is free space 0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • najkon
    Junior Member
    • Mar 2017
    • 4

    #1

    vfs.fs.size - show with volume is free space 0

    Hi,
    i just looking solutions for trigger which will show on with volume free space is now 0 in %
    I have lot of LVM volume and i want to know on what volume space it's already full

    Standard rule like vfs.fs.size[/,free] - it is a nuisance adding each mount point separately

    like:
    - vfs.fs.size[/a,free]
    - vfs.fs.size[/b,free]
    - vfs.fs.size[/c,free]

    It's a way to do it in a more convenient way for zabbix and human?
    I do not know, for example:
    Code:
    ~ df -m
    Filesystem                       Size  Used Avail Use% Mounted on
    /dev/mapper/vg0-log             945M  885M     0 100% /var/log
    /dev/mapper/vg1-log2            945M  885M     0 100% /mnt/log2
    /dev/mapper/vg3-log3            1945M  885M  1000 50% /mnt/log2
    [......]
    
    df -m |grep vg |awk '$4==0 {print $1 " - free space 0%"}'
    
    /dev/mapper/vg0-log - free space 0%
    /dev/mapper/vg1-log - free space 0%
  • troffasky
    Senior Member
    • Jul 2008
    • 568

    #2
    Have you tried using the default linux template?

    For me it creates at least the following trigger:

    Mounted filesystem discovery: Free disk space is less than 20% on volume /

    and for all other mounted filesystems [as per the restrictions defined on the discovery rule]. You could easily tweak the default 20% threshold down to 0% if you wanted [or copy it].

    Comment

    • troffasky
      Senior Member
      • Jul 2008
      • 568

      #3
      To be clear, % free is monitored with 'pfree' parameter not 'free', ie:

      Code:
      {hostname:vfs.fs.size[/,pfree].last(0)}<20

      Comment

      • najkon
        Junior Member
        • Mar 2017
        • 4

        #4
        Originally posted by troffasky
        To be clear, % free is monitored with 'pfree' parameter not 'free', ie:

        Code:
        {hostname:vfs.fs.size[/,pfree].last(0)}<20
        Yes, sure - i know it.. about 'pfree' but that solution is still looking on ' / ' if % free space smaller that 20 - show it - right?

        so what if We have one host e.g - Clound.localhost and there is 20 volumen all with different mounted point - how monitor each one individually if it decreases space (for example below 20%) or is equal to 0

        add to the rule each time if a new volume appears

        {hostname:vfs.fs.size[/volume1,pfree].last(0)}<20
        {hostname:vfs.fs.size[/volume2,pfree].last(0)}<20
        {hostname:vfs.fs.size[/volume3,pfree].last(0)}<20

        ?

        Comment

        • anil.singh
          Junior Member
          • Apr 2017
          • 7

          #5
          not necessary.

          in filesystem discovery,
          items prototype : vfs.fs.size[{#FSNAME},pfree]
          Trigger prototype : vfs.fs.size[{#FSNAME},pfree].last(0)}<10

          it automatically pulls the available volume and will create trigger for each of them.

          Comment

          Working...