1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...
:

Show amount of disk space free or used.

Module data

module_begin 
module_name dsk_home_free 
module_type generic_data 
module_exec df -kh /home | tail -1 | awk '{NF--; print 100-$NF }' 
module_max 100 
module_min 0 
module_description Free disk (%) of home partition 
module_end
module_begin 
module_name dsk_root_free 
module_type generic_data 
module_exec df -kh / | tail -1 | awk '{NF--; print 100-$NF }' 
module_max 100 
module_min 0 
module_description Free disk (%) of root partition 
module_end

 

If you want the % of disk usage, remove the 100 and add a tr -d to remove the % sign: 

ex: 

module_exec df -kh / | tail -1 | awk '{NF--; print $NF }' | tr -d "%"
(Visited 938 times, 1 visits today)

For correct visualization of the Pandora FMS library extension, you must have installed version NG 760 or superior

X