rec 1.0.9 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. data/.yardopts +1 -1
  2. data/CHANGELOG +9 -5
  3. data/EXAMPLES +4 -0
  4. data/MULTIPLEX +36 -0
  5. data/README +15 -1
  6. metadata +7 -9
data/.yardopts CHANGED
@@ -1 +1 @@
1
- --title "Ruby Event Correlation" -m rdoc --main README lib/**/*.rb - README EXAMPLES
1
+ --title "Ruby Event Correlation" -m rdoc --main README lib/**/*.rb - README EXAMPLES MULTIPLEX
data/CHANGELOG CHANGED
@@ -1,14 +1,18 @@
1
+ Version 1.1.0::
2
+ - Added mplex.rb to support merging of event streams
3
+ - Added MULTIPLEX documentation
4
+
1
5
  Version 1.0.9::
2
- Removed mock-notify.rb
6
+ - Removed mock-notify.rb
3
7
 
4
8
  Version 1.0.7::
5
- Simplified rdoc markup for the benefit of yard.
9
+ - Simplified rdoc markup for the benefit of yard.
6
10
 
7
11
  Version 1.0.6::
8
- Restructured for better compatibility with gem standards
12
+ - Restructured for better compatibility with gem standards
9
13
 
10
14
  Version 1.0.4::
11
- Added examples
15
+ - Added examples
12
16
 
13
17
  Version 1.0.1::
14
- Initial version
18
+ - Initial version
data/EXAMPLES CHANGED
@@ -223,3 +223,7 @@ can be abbreviated in this way:
223
223
  :message => "User %user$s signed in via SSH from %ip$s",
224
224
  :action => State::Generate_and_release
225
225
  })
226
+
227
+ To write rules across multiple event streams, you'll need a way to +tail+ several log
228
+ files and merge the streams into a single input stream for REC. The mplex.rb tool does
229
+ that for you - for more details, see the MULTIPLEX file.
data/MULTIPLEX ADDED
@@ -0,0 +1,36 @@
1
+ = MULTIPLEX
2
+ Merging and broadcasting event streams with +mplex.rb+ command line tool.
3
+
4
+ == Purpose
5
+ REC can correlate events from a single event source (a log file), and that can
6
+ help to sift through each log and summarise it to a smaller set of meaningful
7
+ events.
8
+
9
+ But in more ambitious scenarios, we may need to correlate events from several
10
+ files. For example:
11
+ - SSH logs show one of the admins logging on
12
+ - Sudo logs show that admin executing commands to restart the web server
13
+ - Availability logs show the website was down for a short period
14
+
15
+ And we want to correlate these events and prevent the normal alert that would
16
+ be sent when the site is down.
17
+
18
+ To do that, we'll need to merge the event streams into a single stream. That is
19
+ what +mplex.rb+ does. It can merge several input streams into a single combined
20
+ stream. It can also distribute the combined stream to one or more output streams.
21
+
22
+ == Usage
23
+ mplex [OPTION] -i infile [-i infile2...] -o outfile [-o outfile2...]
24
+ where mplex reads from at least one infile and writes to at least one outfiles.
25
+ --input, -i the path to a log file to read from
26
+ --output, -o the path to a log file to write to
27
+ --help, -h display usage
28
+ --version, -v show version
29
+ --debug, -d display each line on stdout as it is passes through mplex
30
+
31
+ == Examples
32
+ $ mplex -i input1.log -i input2.log -o output3.log
33
+ combines two input files into a single output stream
34
+ $ mplex -i in.log -i in2.log -o out3.log -o out4.log -o out5.log
35
+ combines two input streams and writes to 3 output streams
36
+
data/README CHANGED
@@ -17,6 +17,15 @@ Correlates events in order to generate a smaller set of more meaningful events.
17
17
 
18
18
  $ rulesets/rules.rb < /var/log/mail.log 3>missed.log 2>control.log > newevents.log
19
19
 
20
+ - Use mplex.rb to merge event streams if desired
21
+
22
+ $ cd /var/log
23
+ $ mplex -i messages -i deamon -i authlog -o node4 -o node5
24
+
25
+ This would take input *lines* from each input and write out to two log files, named
26
+ +node4+ and +node5+ (which may be used by other REC processes). See the link:file.MULTIPLEX.html
27
+ for more details.
28
+
20
29
  == Why correlate events?
21
30
  We all know that we should read our log files. But reading log files is *really* boring,
22
31
  and frankly its easy to miss important things in all the superfluous detail.
@@ -27,6 +36,11 @@ smart enough to work out what needs monitoring and when you might want to pay at
27
36
  then wouldn't it be good if you could define those rules and let the computer do what it
28
37
  does best?
29
38
 
39
+ Aside::
40
+ Like most computer techie people, I'll happily spend 6 hours trying
41
+ to figure out how to do a 3 hour job in 10 minutes.
42
+ -- Rev. James Cort, ASR
43
+
30
44
  === Generate meaning
31
45
  The logs of many applications are filled with entries that are quite low level - perhaps
32
46
  wonderful for debugging, but typically not terribly meaningful in terms of business.
@@ -216,4 +230,4 @@ By the magic of Ruby's #method_missing method (Yes, I'm looking at you Java!) we
216
230
  refer to any parameter succinctly instead of a cumbersome hash notation, so:
217
231
  state.threshold === state.params['threshold']
218
232
 
219
- For more examples, see the EXAMPLES page.
233
+ For more examples, see the link:file.EXAMPLES.html page.
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rec
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
+ - 1
8
9
  - 0
9
- - 9
10
- version: 1.0.9
10
+ version: 1.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Richard Kernahan
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-09-18 00:00:00 Z
18
+ date: 2012-09-19 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: "\t\tSifts through your log files in real time, using stateful intelligence to determine\n\
@@ -30,11 +30,8 @@ executables: []
30
30
 
31
31
  extensions: []
32
32
 
33
- extra_rdoc_files:
34
- - README
35
- - EXAMPLES
36
- - LICENSE
37
- - CHANGELOG
33
+ extra_rdoc_files: []
34
+
38
35
  files:
39
36
  - lib/rec.rb
40
37
  - lib/rec/rule.rb
@@ -48,6 +45,7 @@ files:
48
45
  - .yardopts
49
46
  - README
50
47
  - EXAMPLES
48
+ - MULTIPLEX
51
49
  - LICENSE
52
50
  - CHANGELOG
53
51
  homepage: http://rubygems.org/gems/rec