class Perus::Pinger::HD

Public Instance Methods

run() click to toggle source
# File lib/perus/pinger/metrics/hd.rb, line 8
def run
    regex = "/^#{options.drive.gsub("/", "\\/")}/"
    percent = shell("df -h / | awk '#{regex} {print $5}'")
    {hd_used: percent.to_i}
end