moro 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -2
- data/CHANGELOG.md +3 -0
- data/config.example.json +1 -1
- data/lib/moro/datadog.rb +3 -1
- data/lib/moro/monitor.rb +1 -1
- data/lib/moro/process.rb +8 -3
- data/lib/moro/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34adee1dfcd02a1f9c4c579d64b42cbb5b728591
|
4
|
+
data.tar.gz: 12eb654e192d7a43ce5839de430c6573a0486762
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2eb41a49b96ba502cdccca48eed86baadf06efbfbbf0316d5fc95c35adeb9c9eb2f0dcbb5187a9d24a316b283fc68d62e53d20a0b426f8c067a7c36216ee8b53
|
7
|
+
data.tar.gz: 9909631abab312bacc72f0d94ded75e3370a409b405a04e499cff58dce1e90ecd319c54b93f1ee07cf38b4f85c5a7a38eec7cd7b8dd338c6a90394c05a214014
|
data/.gitignore
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
app.log
|
2
|
-
|
3
|
-
|
2
|
+
*.gem
|
3
|
+
tmp
|
data/CHANGELOG.md
CHANGED
data/config.example.json
CHANGED
data/lib/moro/datadog.rb
CHANGED
@@ -10,7 +10,9 @@ module Moro
|
|
10
10
|
def send(process_usages)
|
11
11
|
process_usages.each do |process|
|
12
12
|
name=process[:name]
|
13
|
-
|
13
|
+
tags=process[:tags]
|
14
|
+
memory=process[:memory]
|
15
|
+
@statsd.histogram("#{name}.memory",memory , :tags =>tags)
|
14
16
|
end
|
15
17
|
end
|
16
18
|
|
data/lib/moro/monitor.rb
CHANGED
data/lib/moro/process.rb
CHANGED
@@ -2,12 +2,17 @@ require "get_process_mem"
|
|
2
2
|
|
3
3
|
module Moro
|
4
4
|
class Process
|
5
|
-
attr_reader :name,:pid,:file
|
5
|
+
attr_reader :name,:pid,:file,:tags
|
6
6
|
|
7
7
|
def initialize(options)
|
8
8
|
@logger = Logger.new STDOUT
|
9
9
|
@name=options[:name]
|
10
10
|
@file=options[:file]
|
11
|
+
if options[:tags]!=nil
|
12
|
+
@tags=options[:tags]
|
13
|
+
else
|
14
|
+
@tags=[]
|
15
|
+
end
|
11
16
|
update_pid
|
12
17
|
end
|
13
18
|
|
@@ -20,10 +25,10 @@ module Moro
|
|
20
25
|
end
|
21
26
|
pm=GetProcessMem.new(pid)
|
22
27
|
mem = pm.mb
|
23
|
-
{name:name,memory:mem}
|
28
|
+
{name:name,memory:mem,tags:tags}
|
24
29
|
else
|
25
30
|
update_pid
|
26
|
-
{name:name,memory:0.0}
|
31
|
+
{name:name,memory:0.0,tags:tags}
|
27
32
|
end
|
28
33
|
end
|
29
34
|
|
data/lib/moro/version.rb
CHANGED