bin/riemann-proc in riemann-tools-0.2.5 vs bin/riemann-proc in riemann-tools-0.2.6
- old
+ new
@@ -30,14 +30,15 @@
)
end
def linux_proc
process = opts[:proc_regex]
- running = Integer(`ps axo args | grep '#{process}' | grep -v grep | grep -v riemann-proc | wc -l`)
+ found = `ps axo args | grep '#{process}' | grep -v grep | grep -v riemann-proc`
+ running = found.count("\n")
if running > @limits[:critical][:max] or running < @limits[:critical][:min]
- alert "proc #{process}", :critical, running, "process #{process} is running #{running} instances"
+ alert "proc #{process}", :critical, running, "process #{process} is running #{running} instances:\n" + found
else
- alert "proc #{process}", :ok, running, "process #{process} is running #{running} instances"
+ alert "proc #{process}", :ok, running, "process #{process} is running #{running} instances:\n" + found
end
end
def tick
@check.call