Ad Widget

Collapse

disk space trigger that factors total disk size

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zabmon83
    Junior Member
    • Jun 2016
    • 5

    #1

    disk space trigger that factors total disk size

    today in Windows our disk space trigger does not take into account a volumes size. If it falls under 20%, a High alert pops. 10%, a Critical.

    the problem is - if the disk is large, say 10 TB, we are not too concerned if there is still 1 TB remaining.

    has anyone successfully created an item/trigger that takes into account the total volume size?
  • Linwood
    Senior Member
    • Dec 2013
    • 398

    #2
    Sure,

    Code:
    ( {TRIGGER.VALUE}=0 and    
          (100 - {Template SNMP Windows Server:PctUsed[{#SNMPVALUE}].last()} )  < {$DISKMINFREEPCT}    and  
          ( {Template SNMP Windows Server:hrStorageSizeInBytes[{#SNMPVALUE}].last()}  - {Template SNMP Windows Server:hrStorageUsedInBytes[{#SNMPVALUE}].last()} ) < {$DISKMINFREEBYTES}            
    )  
    or 
    ( {TRIGGER.VALUE}=1 and    
          (100 - {Template SNMP Windows Server:PctUsed[{#SNMPVALUE}].last()})  < {$DISKMINFREEPCT}   * 1.10  and  
          ( {Template SNMP Windows Server:hrStorageSizeInBytes[{#SNMPVALUE}].last()}  - {Template SNMP Windows Server:hrStorageUsedInBytes[{#SNMPVALUE}].last()} ) < {$DISKMINFREEBYTES}  * 1.10         
    )
    The above example does it. {$DISKMINFREEPCT} is a macro (think of it as the 20%). The {$DISKMINFREEBYTES} is an absolute number as opposed to percentage and you need to be both below the percentage and below that absolute number to fire. You can fiddle with the formulae any way you want, using OR or setting other criteria (e.g. I don't even discover disks below a minimum size which tends to eliminates USB's, DVD, CD, etc).

    Obviously you need an item returned that includes the size of the disk.

    Comment

    Working...