Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
gitlab-org
gitlab-exporter
Commits
b79ed0fa
Commit
b79ed0fa
authored
Oct 30, 2016
by
Ahmad Sherif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for probing process count
parent
7a089de2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
2 deletions
+10
-2
Gemfile.lock
Gemfile.lock
+1
-1
config/gitlab-monitor.yml.example
config/gitlab-monitor.yml.example
+1
-0
lib/gitlab_monitor/cli.rb
lib/gitlab_monitor/cli.rb
+1
-0
lib/gitlab_monitor/process.rb
lib/gitlab_monitor/process.rb
+6
-0
lib/gitlab_monitor/version.rb
lib/gitlab_monitor/version.rb
+1
-1
No files found.
Gemfile.lock
View file @
b79ed0fa
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)
...
...
config/gitlab-monitor.yml.example
View file @
b79ed0fa
...
...
@@ -21,6 +21,7 @@ probes:
methods:
- probe_memory
- probe_age
- probe_count
opts:
- pid_or_pattern: "sidekiq .* \\[.*?\\]"
name: sidekiq
...
...
lib/gitlab_monitor/cli.rb
View file @
b79ed0fa
...
...
@@ -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
...
...
lib/gitlab_monitor/process.rb
View file @
b79ed0fa
...
...
@@ -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
...
...
lib/gitlab_monitor/version.rb
View file @
b79ed0fa
module
GitLab
module
Monitor
VERSION
=
"0.0.
9
"
.
freeze
VERSION
=
"0.0.
10
"
.
freeze
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment