chef-deployment-monitor 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/chef_deployment_monitor/logmon.rb +10 -0
- data/lib/chef_deployment_monitor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDFkZmRiMTBmZTMyYTYzOTQwMjlkNmQ3MDI3YmYwMjRlNjczMjc2NA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjIwNzgyMmQ1MWYzZGM5YzAyZmM1NzUxZWI2MTA1YjA3YzYyNWMyMQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzQ1Y2U4OTI3NjAxZGNkYTBmZjE1ZDc0NjU2OTk1ZTllODIyNWUxZTRhMGRk
|
10
|
+
NzI1MDAzMzdmNjYyZDFhMWRlNTcxZTU0ZjFiNWQzZWE2ZWRjZDJlMTk1ZDVj
|
11
|
+
ZGI4YjMyZDE0MDM2NmE2ZjdlZDIyNDc4NjAxYzBlY2NhZDI1ODA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YTBlNDg4NjNlMzE3MzNmZjJmY2M0YzY5YTA0MDA4NDFhYThlNzM5MjlkNmFj
|
14
|
+
YTdlOWM3ZDcwZmY4NGIyOGRhM2Q0Yjk3MTk3N2VkYzQ4ODlmYTdhYmZkMmY0
|
15
|
+
NDc4MzQ0ODliNTc0NWQwZjMyZWFlYWJjZTU1ZDE5NWFlOGI0ODA=
|
@@ -15,6 +15,8 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
|
18
|
+
require 'date'
|
19
|
+
|
18
20
|
class Chef
|
19
21
|
class Deployment
|
20
22
|
class Monitor
|
@@ -29,6 +31,7 @@ class Chef
|
|
29
31
|
mon.backward(1)
|
30
32
|
mon.tail do |line|
|
31
33
|
data = scan(line)
|
34
|
+
data = format(data)
|
32
35
|
# skipping the objects 'checksum-.*' and 'reports'
|
33
36
|
unless data.nil? || data['org'].nil? || data['object'] =~ /(^checksum-.*$|^reports$)/
|
34
37
|
unless filter(data)
|
@@ -41,6 +44,13 @@ class Chef
|
|
41
44
|
end
|
42
45
|
end
|
43
46
|
|
47
|
+
def format(data)
|
48
|
+
# convert to timestamp
|
49
|
+
data_dup = data.dup
|
50
|
+
data_dup['time'] = DateTime.strptime(data['time'], '%d/%b/%C:%T %z').to_time.to_i
|
51
|
+
data_dup
|
52
|
+
end
|
53
|
+
|
44
54
|
def filter(data)
|
45
55
|
filter_user(data) || filter_action(data)
|
46
56
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-deployment-monitor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sander Botman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-07-
|
12
|
+
date: 2015-07-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: file-tail
|