chainsaw 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +5 -0
- data/README.md +2 -1
- data/chainsaw.gemspec +1 -0
- data/lib/chainsaw/cli.rb +6 -5
- data/lib/chainsaw/detector.rb +2 -2
- data/lib/chainsaw/filter.rb +8 -30
- data/lib/chainsaw/version.rb +1 -1
- data/test/cli_test.rb +1 -1
- data/test/filter_test.rb +21 -16
- data/test/logs/clf.log +407 -407
- data/test/logs/nginx_error.log +5 -0
- data/test/logs/puppet.log +9 -9
- data/test/logs/syslog.log +29 -29
- metadata +19 -9
- data/test/logs/nginx_access.log +0 -28
data/test/logs/nginx_error.log
CHANGED
@@ -1 +1,6 @@
|
|
1
1
|
2012/08/29 07:48:59 [error] 25395#0: *5910 no user/password was provided for basic authentication, client:
|
2
|
+
2012/08/29 07:49:59 [error] 25395#0: *5910 no user/password was provided for basic authentication, client:
|
3
|
+
2012/08/29 07:50:59 [error] 25395#0: *5910 no user/password was provided for basic authentication, client:
|
4
|
+
2012/08/29 07:51:59 [error] 25395#0: *5910 no user/password was provided for basic authentication, client:
|
5
|
+
2012/08/29 07:52:59 [error] 25395#0: *5910 no user/password was provided for basic authentication, client:
|
6
|
+
2012/08/29 07:53:59 [error] 25395#0: *5910 no user/password was provided for basic authentication, client:
|
data/test/logs/puppet.log
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
-
[2012-02-04 04:08:52]
|
1
|
+
[2012-02-04 04:08:52] example - - [04/Jul/2012:04:08:52 EDT] "GET /production/file_metadata/modules/base/git_completion.sh? HTTP/1.1" 200 310
|
2
2
|
[2012-02-06 04:08:52] - -> /production/file_metadata/modules/base/git_completion.sh?
|
3
|
-
[2012-07-04 04:08:52]
|
3
|
+
[2012-07-04 04:08:52] example - - [04/Jul/2012:04:08:52 EDT] "GET /production/file_metadata/modules/nodejs/node.sh? HTTP/1.1" 200 302
|
4
4
|
[2012-07-04 04:08:52] - -> /production/file_metadata/modules/nodejs/node.sh?
|
5
|
-
[2012-07-04 04:08:53]
|
5
|
+
[2012-07-04 04:08:53] example - - [04/Jul/2012:04:08:53 EDT] "GET /production/file_metadata/modules/ruby/ruby.sh? HTTP/1.1" 200 300
|
6
6
|
[2012-07-04 04:08:53] - -> /production/file_metadata/modules/ruby/ruby.sh?
|
7
|
-
[2012-07-04 04:08:54]
|
7
|
+
[2012-07-04 04:08:54] example - - [04/Jul/2012:04:08:54 EDT] "GET /production/file_metadata/modules/papertrail-logger/papertrail? HTTP/1.1" 200 316
|
8
8
|
[2012-07-04 04:08:54] - -> /production/file_metadata/modules/papertrail-logger/papertrail?
|
9
|
-
[2012-07-04 04:08:55]
|
9
|
+
[2012-07-04 04:08:55] example - - [04/Jul/2012:04:08:55 EDT] "GET /production/file_metadata/modules/base/aliases.sh? HTTP/1.1" 200 303
|
10
10
|
[2012-07-04 04:08:55] - -> /production/file_metadata/modules/base/aliases.sh?
|
11
|
-
[2012-07-04 04:08:55]
|
11
|
+
[2012-07-04 04:08:55] example - - [04/Jul/2012:04:08:55 EDT] "GET /production/file_metadata/modules/base/gemrc? HTTP/1.1" 200 298
|
12
12
|
[2012-07-04 04:08:55] - -> /production/file_metadata/modules/base/gemrc?
|
13
|
-
[2012-07-04 04:08:55]
|
13
|
+
[2012-07-04 04:08:55] example - - [04/Jul/2012:04:08:55 EDT] "GET /production/file_metadata/modules/base/irbrc? HTTP/1.1" 200 298
|
14
14
|
[2012-07-04 04:08:55] - -> /production/file_metadata/modules/base/irbrc?
|
15
|
-
[2012-07-04 04:08:56]
|
16
|
-
[2012-07-04 04:08:56] - -> /production/report/
|
15
|
+
[2012-07-04 04:08:56] example - - [04/Jul/2012:04:08:56 EDT] "PUT /production/report/example HTTP/1.1" 200 14
|
16
|
+
[2012-07-04 04:08:56] - -> /production/report/example
|
data/test/logs/syslog.log
CHANGED
@@ -1,29 +1,29 @@
|
|
1
|
-
Aug 1 17:36:55
|
2
|
-
Aug 9 17:36:55
|
3
|
-
Aug 26 19:09:13
|
4
|
-
Aug 27 15:16:25
|
5
|
-
Aug 27 15:18:39
|
6
|
-
Aug 27 15:19:07
|
7
|
-
Aug 27 15:19:08
|
8
|
-
Aug 27 15:19:08
|
9
|
-
Aug 27 15:19:18
|
10
|
-
Aug 27 16:38:49
|
11
|
-
Aug 27 16:38:50
|
12
|
-
Aug 28 18:16:40
|
13
|
-
Aug 28 18:23:17
|
14
|
-
Aug 28 18:23:17
|
15
|
-
Aug 28 18:25:58
|
16
|
-
Aug 28 18:27:17
|
17
|
-
Aug 28 18:27:17
|
18
|
-
Aug 28 18:27:20
|
19
|
-
Aug 28 18:27:40
|
20
|
-
Aug 29 23:01:12
|
21
|
-
Aug 29 23:01:12
|
22
|
-
Aug 29 23:01:14
|
23
|
-
Aug 30 12:12:24
|
24
|
-
Aug 30 12:12:26
|
25
|
-
Aug 30 12:26:45
|
26
|
-
Aug 30 12:26:50
|
27
|
-
Aug 30 12:27:22
|
28
|
-
Aug 30 12:27:22
|
29
|
-
Aug 30 12:27:32
|
1
|
+
Aug 1 17:36:55 localhost kernel: [519156.511540] UDF-fs: Partition marked readonly; forcing readonly mount
|
2
|
+
Aug 9 17:36:55 localhost kernel: [519156.527593] UDF-fs: INFO Mounting volume '', timestamp 2006/09/04 05:14 (1f10)
|
3
|
+
Aug 26 19:09:13 localhost kernel: [524694.010066] gnome-shell[1766] trap int3 ip:7f0aa38d6fdb sp:7ffff13ee210 error:0
|
4
|
+
Aug 27 15:16:25 localhost kernel: [597126.165437] EXT4-fs (sdb6): Unaligned AIO/DIO on inode 2490305 by VirtualBox; performance will be poor.
|
5
|
+
Aug 27 15:18:39 localhost kernel: [597260.513161] device eth1 entered promiscuous mode
|
6
|
+
Aug 27 15:19:07 localhost kernel: [597287.888586] device eth1 left promiscuous mode
|
7
|
+
Aug 27 15:19:08 localhost kernel: [597288.840206] vboxnetflt: dropped 0 out of 108 packets
|
8
|
+
Aug 27 15:19:08 localhost kernel: [597288.870127] vboxnetflt: dropped 0 out of 0 packets
|
9
|
+
Aug 27 15:19:18 localhost kernel: [597299.145176] device eth1 entered promiscuous mode
|
10
|
+
Aug 27 16:38:49 localhost kernel: [602070.406491] device eth1 left promiscuous mode
|
11
|
+
Aug 27 16:38:50 localhost kernel: [602070.903442] vboxnetflt: dropped 1017 out of 62608 packets
|
12
|
+
Aug 28 18:16:40 localhost kernel: [694341.478308] init: mongodb main process (1181) terminated with status 12
|
13
|
+
Aug 28 18:23:17 localhost kernel: [694738.296538] type=1400 audit(1346192597.536:26): apparmor="STATUS" operation="profile_replace" name="/usr/lib/telepathy/mission-control-5" pid=14487 comm="apparmor_parser"
|
14
|
+
Aug 28 18:23:17 localhost kernel: [694738.296801] type=1400 audit(1346192597.536:27): apparmor="STATUS" operation="profile_replace" name="/usr/lib/telepathy/telepathy-*" pid=14487 comm="apparmor_parser"
|
15
|
+
Aug 28 18:25:58 localhost kernel: [694899.747857] device eth1 entered promiscuous mode
|
16
|
+
Aug 28 18:27:17 localhost kernel: [694977.916831] EXT4-fs (sdb6): Unaligned AIO/DIO on inode 3276897 by VirtualBox; performance will be poor.
|
17
|
+
Aug 28 18:27:17 localhost kernel: [694977.928282] device eth1 left promiscuous mode
|
18
|
+
Aug 28 18:27:20 localhost kernel: [694981.044069] vboxnetflt: dropped 0 out of 1260 packets
|
19
|
+
Aug 28 18:27:40 localhost kernel: [695001.015865] device eth1 entered promiscuous mode
|
20
|
+
Aug 29 23:01:12 localhost kernel: [797813.489426] EXT4-fs (sdb6): Unaligned AIO/DIO on inode 3276897 by VirtualBox; performance will be poor.
|
21
|
+
Aug 29 23:01:12 localhost kernel: [797813.501063] device eth1 left promiscuous mode
|
22
|
+
Aug 29 23:01:14 localhost kernel: [797815.636073] vboxnetflt: dropped 0 out of 1658435 packets
|
23
|
+
Aug 30 12:12:24 localhost kernel: [845285.335141] r8169 0000:02:00.0: eth1: link down
|
24
|
+
Aug 30 12:12:26 localhost kernel: [845287.549804] r8169 0000:02:00.0: eth1: link up
|
25
|
+
Aug 30 12:26:45 localhost kernel: [846146.371234] r8169 0000:02:00.0: eth1: link down
|
26
|
+
Aug 30 12:26:50 localhost kernel: [846151.120878] ADDRCONF(NETDEV_UP): eth1: link is not ready
|
27
|
+
Aug 30 12:27:22 localhost kernel: [846183.129496] r8169 0000:02:00.0: eth1: link up
|
28
|
+
Aug 30 12:27:22 localhost kernel: [846183.130073] ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
|
29
|
+
Aug 30 12:27:32 localhost kernel: [846193.560089] eth1: no IPv6 routers present
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chainsaw
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -14,7 +14,7 @@ date: 2012-09-04 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: chronic
|
17
|
-
requirement: &
|
17
|
+
requirement: &70200863777840 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,10 +22,21 @@ dependencies:
|
|
22
22
|
version: 0.7.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70200863777840
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: rake
|
28
|
+
requirement: &70200863776780 !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.9.2.2
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: *70200863776780
|
26
37
|
- !ruby/object:Gem::Dependency
|
27
38
|
name: minitest
|
28
|
-
requirement: &
|
39
|
+
requirement: &70200863776040 !ruby/object:Gem::Requirement
|
29
40
|
none: false
|
30
41
|
requirements:
|
31
42
|
- - ~>
|
@@ -33,10 +44,10 @@ dependencies:
|
|
33
44
|
version: 3.0.0
|
34
45
|
type: :development
|
35
46
|
prerelease: false
|
36
|
-
version_requirements: *
|
47
|
+
version_requirements: *70200863776040
|
37
48
|
- !ruby/object:Gem::Dependency
|
38
49
|
name: mocha
|
39
|
-
requirement: &
|
50
|
+
requirement: &70200863775260 !ruby/object:Gem::Requirement
|
40
51
|
none: false
|
41
52
|
requirements:
|
42
53
|
- - ~>
|
@@ -44,7 +55,7 @@ dependencies:
|
|
44
55
|
version: 0.11.4
|
45
56
|
type: :development
|
46
57
|
prerelease: false
|
47
|
-
version_requirements: *
|
58
|
+
version_requirements: *70200863775260
|
48
59
|
description: Filter logfiles based on a time range
|
49
60
|
email:
|
50
61
|
- tdunn13@gmail.com
|
@@ -54,6 +65,7 @@ extensions: []
|
|
54
65
|
extra_rdoc_files: []
|
55
66
|
files:
|
56
67
|
- .gitignore
|
68
|
+
- .travis.yml
|
57
69
|
- Gemfile
|
58
70
|
- LICENSE
|
59
71
|
- README.md
|
@@ -74,7 +86,6 @@ files:
|
|
74
86
|
- test/logs/clf.log
|
75
87
|
- test/logs/django.log
|
76
88
|
- test/logs/mongodb.log
|
77
|
-
- test/logs/nginx_access.log
|
78
89
|
- test/logs/nginx_error.log
|
79
90
|
- test/logs/puppet.log
|
80
91
|
- test/logs/python.log
|
@@ -117,7 +128,6 @@ test_files:
|
|
117
128
|
- test/logs/clf.log
|
118
129
|
- test/logs/django.log
|
119
130
|
- test/logs/mongodb.log
|
120
|
-
- test/logs/nginx_access.log
|
121
131
|
- test/logs/nginx_error.log
|
122
132
|
- test/logs/puppet.log
|
123
133
|
- test/logs/python.log
|
data/test/logs/nginx_access.log
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
127.0.0.1 - - [08/Aug/2012:22:53:53 -0400] "GET / HTTP/1.1" 200 5 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19"
|
2
|
-
127.0.0.1 - - [08/Aug/2012:22:53:53 -0400] "GET /favicon.ico HTTP/1.1" 200 5 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19"
|
3
|
-
127.0.0.1 - - [08/Aug/2012:22:54:03 -0400] "-" 400 0 "-" "-"
|
4
|
-
127.0.0.1 - - [08/Aug/2012:23:36:44 -0400] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19"
|
5
|
-
127.0.0.1 - - [08/Aug/2012:23:36:44 -0400] "GET /favicon.ico HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19"
|
6
|
-
127.0.0.1 - - [08/Aug/2012:23:36:54 -0400] "-" 400 0 "-" "-"
|
7
|
-
127.0.0.1 - - [08/Aug/2012:23:40:19 -0400] "GET / HTTP/1.1" 200 5 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19"
|
8
|
-
127.0.0.1 - - [08/Aug/2012:23:40:19 -0400] "GET /favicon.ico HTTP/1.1" 200 5 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19"
|
9
|
-
127.0.0.1 - - [08/Aug/2012:23:40:34 -0400] "-" 400 0 "-" "-"
|
10
|
-
127.0.0.1 - - [08/Aug/2012:23:44:50 -0400] "GET / HTTP/1.1" 200 5 "-" "curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3"
|
11
|
-
127.0.0.1 - - [08/Aug/2012:23:49:06 -0400] "GET / HTTP/1.1" 200 5 "-" "curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3"
|
12
|
-
127.0.0.1 - - [08/Aug/2012:23:49:40 -0400] "GET / HTTP/1.0" 200 5 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19"
|
13
|
-
127.0.0.1 - - [08/Aug/2012:23:49:40 -0400] "GET /favicon.ico HTTP/1.0" 200 5 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19"
|
14
|
-
127.0.0.1 - - [08/Aug/2012:23:52:11 -0400] "GET / HTTP/1.1" 200 5 "-" "curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3"
|
15
|
-
127.0.0.1 - - [08/Aug/2012:23:53:38 -0400] "GET / HTTP/1.1" 200 5 "-" "curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3"
|
16
|
-
127.0.0.1 - - [08/Aug/2012:23:54:21 -0400] "GET / HTTP/1.0" 200 5 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19"
|
17
|
-
127.0.0.1 - - [08/Aug/2012:23:54:22 -0400] "GET /favicon.ico HTTP/1.0" 200 5 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19"
|
18
|
-
127.0.0.1 - - [08/Aug/2012:23:54:24 -0400] "GET / HTTP/1.0" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19"
|
19
|
-
127.0.0.1 - - [09/Aug/2012:00:04:14 -0400] "GET / HTTP/1.0" 200 5 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19"
|
20
|
-
127.0.0.1 - - [09/Aug/2012:00:04:14 -0400] "GET /favicon.ico HTTP/1.0" 200 5 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19"
|
21
|
-
127.0.0.1 - - [09/Aug/2012:00:04:21 -0400] "GET / HTTP/1.0" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19"
|
22
|
-
127.0.0.1 - - [09/Aug/2012:00:04:22 -0400] "GET / HTTP/1.0" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19"
|
23
|
-
127.0.0.1 - - [09/Aug/2012:00:04:22 -0400] "GET / HTTP/1.0" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19"
|
24
|
-
127.0.0.1 - - [09/Aug/2012:00:04:22 -0400] "GET / HTTP/1.0" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19"
|
25
|
-
127.0.0.1 - - [09/Aug/2012:00:04:23 -0400] "GET / HTTP/1.0" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19"
|
26
|
-
127.0.0.1 - - [09/Aug/2012:00:06:15 -0400] "GET / HTTP/1.0" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19"
|
27
|
-
127.0.0.1 - - [09/Aug/2012:00:06:17 -0400] "GET / HTTP/1.0" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19"
|
28
|
-
173.247.26.224 - - [09/Aug/2012:12:51:36 -0400] "\xFE" 400 173 "-" "-"
|