Ad Widget

Collapse

Trigger using item status?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chispyder
    Junior Member
    • Jun 2007
    • 9

    #1

    Trigger using item status?

    I am trying to set up a rather generic trigger to alert me if disk space on any host falls below a minimum threshold.

    With some 20 systems being monitored and 47 different triggers, my overview page is getting rather crowded, so “folding” these into a single trigger makes sense (removes about 9 or so triggers). Trigger name is “{HOSTNAME}: Disk space issues”. When triggered I would log into the system to check space on the relevant drives, etc.

    I have a template for windows and a second template for Linux systems. In each of these templates, items are set up to gather data related to the various disk drives every 5 minutes. Not all windows systems have a D, E. F or G drive. Not all Linux systems have a /var or /data partition.

    On windows I need to trigger if:

    • Free space on C: less than 2 GB or
    • (a D drive exists - data exists for drive D) and the last value is less than 1.5 GB or
    • (a E drive exists - data exists for drive E) and the last value is less than 1.5 GB or
    • (a F drive exists - data exists for drive F) and the last value is less than 1.5 GB or
    • (a G drive exists - data exists for drive G) and the last value is less than 1.5 GB
    The trigger I have set up is:

    ({windows_t:vfs.fs.size[c:,free].last(0)}<2000000000)|
    (({windows_t:vfs.fs.size[d:,free].nodata(600)}=0)&({windows_t:vfs.fs.size[d:,free].last(0)}<15000000000))|
    (({windows_t:vfs.fs.size[e:,free].nodata(600)}=0)&({windows_t:vfs.fs.size[e:,free].last(0)}<15000000000))|
    (({windows_t:vfs.fs.size[f:,free].nodata(600)}=0)&({windows_t:vfs.fs.size[f:,free].last(0)}<15000000000))|
    (({windows_t:vfs.fs.size[g:,free].nodata(600)}=0)&({windows_t:vfs.fs.size[g:,free].last(0)}<15000000000))

    On Linux I need to trigger if:

    • Free space on / less than 1 GB or
    • (a /data partition exists - data exists for the /data partition) and the last value is less than 15 GB or
    • (a /home partition exists - data exists for the /home partition) and the last value is less than 250 MB or
    • (a /var partition exists - data exists for the /var partition) and the last value is less than 5 GB
    ({linux_t:vfs.fs.size[/,free].last(0)}<1000000000)|
    (({linux_t:vfs.fs.size[/data,free].nodata(600)}=0)&({linux_t:vfs.fs.size[/data,free].last(0)}<15000000000))|
    (({linux_t:vfs.fs.size[/home,free].nodata(600)}=0)&({linux_t:vfs.fs.size[/home,free].last(0)}<250000000))|
    (({linux_t:vfs.fs.size[/var,free].nodata(600)}=0)&({linux_t:vfs.fs.size[/var,free].last(0)}<5000000000))

    Using “nodata” was all I could think of to use to determine if the item was active (as opposed to unsupported).

    The problem is that on those systems that do not have a particular drive or partition, the trigger goes into the unknown state.

    For instance:

    System lab1 is a Linux system and has /, /home partitions. Since no /data or /var partitions exist, the trigger state is unknown. I would like this generic trigger to realize that the /data and /var partitions do not exist and trigger if the existing partitions fall below threshold.

    Is there some test I can put in the expression that states “if the item is actively monitored - perform an action”?

    Suggestions please?

    Thanks

    Jeff

    Zabbix 1.4.1 (server and Agents)
Working...