rabbithutch 0.1.4 → 0.1.5

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
@@ -1,55 +1,68 @@
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!
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rabbithutch (0.1.4)
5
+ amqp
6
+ bson_ext
7
+ daemons
8
+ eventmachine
9
+ haml
10
+ log4r
11
+ logger
12
+ mongo
13
+ mongo_ext
14
+ mq
15
+ mustache
16
+ shotgun
17
+ sinatra
18
+ thin
19
+ thor
20
+ yard
21
+
22
+ GEM
23
+ remote: https://rubygems.org/
24
+ specs:
25
+ amq-client (0.9.10)
26
+ amq-protocol (>= 0.9.4)
27
+ eventmachine
28
+ amq-protocol (1.0.1)
29
+ amqp (0.9.8)
30
+ amq-client (~> 0.9.5)
31
+ amq-protocol (>= 0.9.4)
32
+ eventmachine
33
+ bson (1.8.2)
34
+ bson_ext (1.8.1)
35
+ bson (~> 1.8.1)
36
+ daemons (1.1.9)
37
+ eventmachine (1.0.0)
38
+ haml (3.1.7)
39
+ log4r (1.1.10)
40
+ logger (1.2.8)
41
+ mongo (1.8.1)
42
+ bson (~> 1.8.1)
43
+ mongo_ext (0.19.3)
44
+ mq (0.1.3)
45
+ mustache (0.99.4)
46
+ rack (1.4.4)
47
+ rack-protection (1.3.2)
48
+ rack
49
+ shotgun (0.9)
50
+ rack (>= 1.0)
51
+ sinatra (1.3.3)
52
+ rack (~> 1.3, >= 1.3.6)
53
+ rack-protection (~> 1.2)
54
+ tilt (~> 1.3, >= 1.3.3)
55
+ thin (1.5.0)
56
+ daemons (>= 1.0.9)
57
+ eventmachine (>= 0.12.6)
58
+ rack (>= 1.0.0)
59
+ thor (0.16.0)
60
+ tilt (1.3.3)
61
+ yard (0.8.3)
62
+
63
+ PLATFORMS
64
+ ruby
65
+ x86-mingw32
66
+
67
+ DEPENDENCIES
68
+ rabbithutch!
@@ -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,107 +1,137 @@
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
-
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
+ Applications included
7
+ * rabbithutch - a service to listen to the exchanges
8
+ * rabbithutchweb - a web site to configure the service
9
+
10
+ # Overview
11
+
12
+ A ruby service for monotoring the trace output on RabbitMq Nodes and writing the
13
+ output to console, Log files or MongoDb.
14
+
15
+ Once tracing is started on the target rabbitMQ nodes, the service creates a queue
16
+ "rabbithutch" that binds to the exchange "amq.rabbitmq.trace". All messages that arrive
17
+ on the queue are then picked up by any registered consumers and written to standard
18
+ output, a log file or a MongoDb Database.
19
+
20
+ # Environment
21
+
22
+ This has been tested on
23
+ * Ubuntu Linux
24
+ * Windows 8
25
+
26
+ # Installation
27
+
28
+ ##Activate tracing on rabbitmq server
29
+
30
+ run the following command on each server you want to trace
31
+ rabbitmqctl trace_on
32
+
33
+ ##Install the rabbit-hutch service
34
+
35
+ gem install rabbithutch
36
+
37
+ #RabbitMq Configuration
38
+
39
+ In order for tracing to work, the trace_on option must be enabled on all rabbitMq nodes.
40
+ Turn on tracing on the nodes using the following command:
41
+ rabbitmqctl trace_on
42
+
43
+ # Usage
44
+
45
+ Start up the Web Interface
46
+
47
+ rabbithutchweb
48
+
49
+ Run as a command line process with a config file
50
+
51
+ rabbithutch run -- ~/config.yaml
52
+
53
+ Run as a service
54
+
55
+ rabbithutch start -- ~/config.yaml
56
+
57
+ For help on the service
58
+
59
+ rabbithutch
60
+
61
+ # Troubleshooting
62
+
63
+ Web Manager
64
+ If the web service has not been shut down properly the process my still be alive in the background
65
+ ERROR:
66
+ (/home/USERNAME/.rvm/gems/ruby-1.9.3-p327/gems/eventmachine-1.0.0/lib/eventmachine.rb:526:in
67
+ `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError))
68
+ To fix this kill the process named shotgun
69
+ - ps aux | grep shot
70
+ - kill -9 (the process number)
71
+
72
+ # Configuration
73
+
74
+ To add RabbitMq nodes to monitor and consumers to enable you will need to change the configuration.
75
+
76
+ The config below shows two RabbitMq nodes with each with console, mongoDb and log file consumers
77
+
78
+ ./config.yaml
79
+
80
+ application:
81
+ exchangename: amq.rabbitmq.trace
82
+ queuename: rabbithutch
83
+
84
+ rabbitmq:
85
+ hosts:
86
+ - displayname: local1
87
+ enabled: true
88
+ hostname: 127.0.0.1
89
+ username: guest
90
+ password: guest
91
+ - displayname: local2
92
+ enabled: false
93
+ hostname: 127.2.2.2
94
+ username: guest
95
+ password: guest
96
+
97
+ consumers_config:
98
+ consumers:
99
+ - name: console_consumer
100
+ enabled: true
101
+ - name: mongo_consumer
102
+ enabled: true
103
+ hostname: 127.0.0.1
104
+ username: guest
105
+ password: guest
106
+ database_prefix: rhutch_
107
+ port: 27017
108
+ - name: log4r_consumer
109
+ enabled: true
110
+ log_location: /tmp
111
+ log_prefix: rhutch_
112
+
113
+ #Contributing
114
+
115
+ Fork it
116
+ Create your feature branch (git checkout -b my-new-feature)
117
+ Commit your changes (git commit -am 'Add some feature')
118
+ Push to the branch (git push origin my-new-feature)
119
+ Create new Pull Request
120
+
121
+ ## Create the gem
122
+
123
+ Build and Test Locally
124
+ -gem build rabbithutch.gemspec
125
+ -gem install rabbithutch-X.X.X # where X.X.X is the version of the compiled gemspec
126
+
127
+ Build and deploy to rubygems.org
128
+ -gem update --system
129
+ -gem build rabbithutch.gemspec
130
+ -gem push rabbithutch-0.0.1.gem # where X.X.X is the version of the compiled gemspec
131
+
132
+ #To do
133
+
134
+ - [ ] Add Http Appender to post messages to url e.g. pastebin.org or mongodb REST interface
135
+ - [ ] Come up with better config mgt for gems like adding a management Command Line Interface to set env settings
136
+ - [x] Add a Web UI to manage the service
137
+