Commit b79ed0fa authored by Ahmad Sherif's avatar Ahmad Sherif
Browse files

Add support for probing process count

parent 7a089de2
PATH
remote: .
specs:
gitlab-monitor (0.0.9)
gitlab-monitor (0.0.10)
pg (~> 0.18.4)
quantile (~> 0.2.0)
redis-namespace (~> 1.5.2)
......
......@@ -21,6 +21,7 @@ probes:
methods:
- probe_memory
- probe_age
- probe_count
opts:
- pid_or_pattern: "sidekiq .* \\[.*?\\]"
name: sidekiq
......
......@@ -322,6 +322,7 @@ module GitLab
::GitLab::Monitor::ProcessProber.new(pid_or_pattern: @pid || @pattern, name: @name, quantiles: @quantiles)
.probe_memory
.probe_age
.probe_count
.write_to(@target)
end
end
......
......@@ -104,6 +104,12 @@ module GitLab
self
end
def probe_count
@metrics.add("process_count", @pids.count, name: @name.downcase)
self
end
def write_to(target)
target.write(@metrics.to_s)
end
......
module GitLab
module Monitor
VERSION = "0.0.9".freeze
VERSION = "0.0.10".freeze
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment