rabbithutch 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore CHANGED
@@ -1,24 +1,24 @@
1
- *~
2
- *.gem
3
- *.rbc
4
- .bundle
5
- .config
6
- coverage
7
- InstalledFiles
8
- lib/bundler/man
9
- pkg
10
- rdoc
11
- spec/reports
12
- test/tmp
13
- test/version_tmp
14
- tmp
15
-
16
- # YARD artifacts
17
- .yardoc
18
- _yardoc
19
- doc/
20
-
21
- .project
22
- *.pid
23
-
24
-
1
+ *~
2
+ *.gem
3
+ *.rbc
4
+ .bundle
5
+ .config
6
+ coverage
7
+ InstalledFiles
8
+ lib/bundler/man
9
+ pkg
10
+ rdoc
11
+ spec/reports
12
+ test/tmp
13
+ test/version_tmp
14
+ tmp
15
+
16
+ # YARD artifacts
17
+ .yardoc
18
+ _yardoc
19
+ doc/
20
+
21
+ .project
22
+ *.pid
23
+
24
+
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in hash-that-tree.gemspec
4
- gemspec
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in hash-that-tree.gemspec
4
+ gemspec
data/Gemfile.lock CHANGED
@@ -1,53 +1,55 @@
1
- PATH
2
- remote: .
3
- specs:
4
- rabbithutch (0.1.0)
5
- amqp
6
- bson_ext
7
- daemons
8
- eventmachine
9
- log4r
10
- logger
11
- mongo
12
- mongo_ext
13
- mq
14
- thor
15
- yard
16
-
17
- GEM
18
- remote: https://rubygems.org/
19
- specs:
20
- activesupport (3.2.9)
21
- i18n (~> 0.6)
22
- multi_json (~> 1.0)
23
- amq-client (0.9.10)
24
- amq-protocol (>= 0.9.4)
25
- eventmachine
26
- amq-protocol (1.0.1)
27
- amqp (0.9.8)
28
- amq-client (~> 0.9.5)
29
- amq-protocol (>= 0.9.4)
30
- eventmachine
31
- bson (1.8.0)
32
- activesupport
33
- bson_ext (1.8.0)
34
- bson (~> 1.8.0)
35
- daemons (1.1.9)
36
- eventmachine (1.0.0)
37
- i18n (0.6.1)
38
- log4r (1.1.10)
39
- logger (1.2.8)
40
- mongo (1.8.0)
41
- bson (~> 1.8.0)
42
- mongo_ext (0.19.3)
43
- mq (0.1.3)
44
- multi_json (1.5.0)
45
- thor (0.16.0)
46
- yard (0.8.3)
47
-
48
- PLATFORMS
49
- ruby
50
- x86-mingw32
51
-
52
- DEPENDENCIES
53
- rabbithutch!
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rabbithutch (0.1.3)
5
+ amqp
6
+ bson_ext
7
+ daemons
8
+ eventmachine
9
+ log4r
10
+ logger
11
+ mongo
12
+ mongo_ext
13
+ mq
14
+ mustache
15
+ thor
16
+ yard
17
+
18
+ GEM
19
+ remote: https://rubygems.org/
20
+ specs:
21
+ activesupport (3.2.9)
22
+ i18n (~> 0.6)
23
+ multi_json (~> 1.0)
24
+ amq-client (0.9.10)
25
+ amq-protocol (>= 0.9.4)
26
+ eventmachine
27
+ amq-protocol (1.0.1)
28
+ amqp (0.9.8)
29
+ amq-client (~> 0.9.5)
30
+ amq-protocol (>= 0.9.4)
31
+ eventmachine
32
+ bson (1.8.0)
33
+ activesupport
34
+ bson_ext (1.8.0)
35
+ bson (~> 1.8.0)
36
+ daemons (1.1.9)
37
+ eventmachine (1.0.0)
38
+ i18n (0.6.1)
39
+ log4r (1.1.10)
40
+ logger (1.2.8)
41
+ mongo (1.8.0)
42
+ bson (~> 1.8.0)
43
+ mongo_ext (0.19.3)
44
+ mq (0.1.3)
45
+ multi_json (1.5.0)
46
+ mustache (0.99.4)
47
+ thor (0.16.0)
48
+ yard (0.8.3)
49
+
50
+ PLATFORMS
51
+ ruby
52
+ x86-mingw32
53
+
54
+ DEPENDENCIES
55
+ rabbithutch!
data/LICENSE.txt CHANGED
@@ -1,22 +1,22 @@
1
- Copyright (c) 2012 John Ryan
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1
+ Copyright (c) 2012 John Ryan
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
22
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,105 +1,107 @@
1
- #rabbit-hutch
2
-
3
- RabbitMq Trace Logger - Listen to multiple RabbitMq instances and log them to a
4
- single location or MongoDb database.
5
-
6
- # Overview
7
-
8
- A ruby service for monotoring the trace output on RabbitMq Nodes and writing the
9
- output to console, Log files or MongoDb.
10
-
11
- Once tracing is started on the target rabbitMQ nodes, the service creates a queue
12
- "rabbithutch" that binds to the exchange "amq.rabbitmq.trace". All messages that arrive
13
- on the queue are then picked up by any registered consumers and written to standard
14
- output, a log file or a MongoDb Database.
15
-
16
- # Environment
17
-
18
- * Linux
19
- * Windows
20
-
21
- # Installation
22
-
23
- ##Activate tracing on rabbitmq server
24
-
25
- run the following command on each server you want to trace
26
- rabbitmqctl trace_on
27
-
28
- ##Install the rabbit-hutch service
29
-
30
- gem install rabbithutch
31
-
32
- # Usage
33
-
34
- Run as a command line process with a config file
35
- rabbithutch run -- ~/config.yaml
36
-
37
- Run as a service
38
- rabbithutch start -- ~/config.yaml
39
-
40
- For help on the service
41
- rabbithutch
42
-
43
- # Configuration
44
-
45
- To add RabbitMq nodes to monitor and consumers to enable you will need to change the configuration.
46
-
47
- The config below shows two RabbitMq nodes with each with console, mongoDb and log file consumers
48
-
49
- ./config.yaml
50
-
51
- application:
52
- exchangename: amq.rabbitmq.trace
53
- queuename: rabbithutch
54
-
55
- rabbitmq:
56
- hosts:
57
- - displayname: local1
58
- enabled: true
59
- hostname: 127.0.0.1
60
- username: guest
61
- password: guest
62
- - displayname: local2
63
- enabled: false
64
- hostname: 127.2.2.2
65
- username: guest
66
- password: guest
67
-
68
- consumers_config:
69
- consumers:
70
- - name: console_consumer
71
- enabled: true
72
- - name: mongo_consumer
73
- enabled: true
74
- hostname: 127.0.0.1
75
- username: guest
76
- password: guest
77
- database_prefix: rhutch_
78
- port: 27017
79
- - name: log4r_consumer
80
- enabled: true
81
- log_location: /tmp
82
- log_prefix: rhutch_
83
-
84
- #Contributing
85
-
86
- Fork it
87
- Create your feature branch (git checkout -b my-new-feature)
88
- Commit your changes (git commit -am 'Add some feature')
89
- Push to the branch (git push origin my-new-feature)
90
- Create new Pull Request
91
-
92
- ## Create the gem
93
-
94
- Build and Test Locally
95
- -gem build rabbithutch.gemspec
96
- -gem install rabbithutch-X.X.X # where X.X.X is the version of the compiled gemspec
97
-
98
- Build and deploy to rubygems.org
99
- -gem update --system
100
- -gem build rabbithutch.gemspec
101
- -gem push rabbithutch-0.0.1.gem # where X.X.X is the version of the compiled gemspec
102
-
103
-
104
- References
105
-
1
+ #rabbit-hutch
2
+
3
+ RabbitMq Trace Logger - Listen to multiple RabbitMq instances and log them to a
4
+ single location or MongoDb database.
5
+
6
+ # Overview
7
+
8
+ A ruby service for monotoring the trace output on RabbitMq Nodes and writing the
9
+ output to console, Log files or MongoDb.
10
+
11
+ Once tracing is started on the target rabbitMQ nodes, the service creates a queue
12
+ "rabbithutch" that binds to the exchange "amq.rabbitmq.trace". All messages that arrive
13
+ on the queue are then picked up by any registered consumers and written to standard
14
+ output, a log file or a MongoDb Database.
15
+
16
+ # Environment
17
+
18
+ * Linux
19
+ * Windows
20
+
21
+ # Installation
22
+
23
+ ##Activate tracing on rabbitmq server
24
+
25
+ run the following command on each server you want to trace
26
+ rabbitmqctl trace_on
27
+
28
+ ##Install the rabbit-hutch service
29
+
30
+ gem install rabbithutch
31
+
32
+ # Usage
33
+
34
+ Run as a command line process with a config file
35
+ rabbithutch run -- ~/config.yaml
36
+
37
+ Run as a service
38
+ rabbithutch start -- ~/config.yaml
39
+
40
+ For help on the service
41
+ rabbithutch
42
+
43
+ # Configuration
44
+
45
+ To add RabbitMq nodes to monitor and consumers to enable you will need to change the configuration.
46
+
47
+ The config below shows two RabbitMq nodes with each with console, mongoDb and log file consumers
48
+
49
+ ./config.yaml
50
+
51
+ application:
52
+ exchangename: amq.rabbitmq.trace
53
+ queuename: rabbithutch
54
+
55
+ rabbitmq:
56
+ hosts:
57
+ - displayname: local1
58
+ enabled: true
59
+ hostname: 127.0.0.1
60
+ username: guest
61
+ password: guest
62
+ - displayname: local2
63
+ enabled: false
64
+ hostname: 127.2.2.2
65
+ username: guest
66
+ password: guest
67
+
68
+ consumers_config:
69
+ consumers:
70
+ - name: console_consumer
71
+ enabled: true
72
+ - name: mongo_consumer
73
+ enabled: true
74
+ hostname: 127.0.0.1
75
+ username: guest
76
+ password: guest
77
+ database_prefix: rhutch_
78
+ port: 27017
79
+ - name: log4r_consumer
80
+ enabled: true
81
+ log_location: /tmp
82
+ log_prefix: rhutch_
83
+
84
+ #Contributing
85
+
86
+ Fork it
87
+ Create your feature branch (git checkout -b my-new-feature)
88
+ Commit your changes (git commit -am 'Add some feature')
89
+ Push to the branch (git push origin my-new-feature)
90
+ Create new Pull Request
91
+
92
+ ## Create the gem
93
+
94
+ Build and Test Locally
95
+ -gem build rabbithutch.gemspec
96
+ -gem install rabbithutch-X.X.X # where X.X.X is the version of the compiled gemspec
97
+
98
+ Build and deploy to rubygems.org
99
+ -gem update --system
100
+ -gem build rabbithutch.gemspec
101
+ -gem push rabbithutch-0.0.1.gem # where X.X.X is the version of the compiled gemspec
102
+
103
+ #To do
104
+
105
+ - [ ] Add Http Appender to post messages to url e.g. pastebin.org or mongodb REST interface
106
+ - [ ] Come up with better config mgt for gems like adding a management Command Line Interface to set env settings
107
+
data/bin/rabbithutch CHANGED
@@ -1 +1 @@
1
- require_relative '../rabbithutchservice.rb'
1
+ require_relative '../lib/rabbithutchservice.rb'
@@ -0,0 +1 @@
1
+ require_relative '../lib/rabbithutchmgr.rb'
data/config.yaml CHANGED
@@ -1,32 +1,32 @@
1
- application:
2
- exchangename: amq.rabbitmq.trace
3
- queuename: rabbithutch
4
-
5
- rabbitmq:
6
- hosts:
7
- - displayname: localserver
8
- enabled: true
9
- hostname: 127.0.0.1
10
- username: guest
11
- password: guest
12
- - displayname: anotherserver
13
- enabled: false
14
- hostname: 127.0.0.2
15
- username: guest
16
- password: guest
17
-
18
- consumers_config:
19
- consumers:
20
- - name: console_consumer
21
- enabled: true
22
- - name: mongo_consumer
23
- enabled: true
24
- hostname: 127.0.0.1
25
- username: guest
26
- password: guest
27
- database_prefix: rhutch_
28
- port: 27017
29
- - name: log4r_consumer
30
- enabled: true
31
- log_location: /tmp
32
- log_prefix: rhutch_
1
+ application:
2
+ exchangename: amq.rabbitmq.trace
3
+ queuename: rabbithutch
4
+
5
+ rabbitmq:
6
+ hosts:
7
+ - displayname: localserver
8
+ enabled: true
9
+ hostname: 127.0.0.1
10
+ username: guest
11
+ password: guest
12
+ - displayname: anotherserver
13
+ enabled: false
14
+ hostname: 127.0.0.2
15
+ username: guest
16
+ password: guest
17
+
18
+ consumers_config:
19
+ consumers:
20
+ - name: console_consumer
21
+ enabled: true
22
+ - name: mongo_consumer
23
+ enabled: true
24
+ hostname: 127.0.0.1
25
+ username: guest
26
+ password: guest
27
+ database_prefix: rhutch_
28
+ port: 27017
29
+ - name: log4r_consumer
30
+ enabled: true
31
+ log_location: /tmp
32
+ log_prefix: rhutch_