class Perus::Pinger::Running
Public Instance Methods
run()
click to toggle source
# File lib/perus/pinger/metrics/running.rb, line 9 def run begin ps_result = shell("ps aux | grep -v grep | grep #{options.process_path}") rescue ShellCommandError ps_result = '' end metric_name = "#{File.basename(options.process_path)}_running" {metric_name => ps_result.empty? ? 'no' : 'yes'} end