oohlalog_syslog 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: fc08791ec9daf7ae9ecfb85a8de01f985e7e08d6
4
+ data.tar.gz: a0832f239763d4400e169ab72613827dbcbedb8f
5
+ SHA512:
6
+ metadata.gz: 0624e2a352135ff5b5cc58103af7f49810b17fcca091a886aad5583a35737747ebbeba832d195b982f6adafc43b8c0b9638f87010f9781ff7fde13aa3dbc672e
7
+ data.tar.gz: a621fded32876b2a9c5429d9358752fca42ca75c76092cf9de8e8fb4aded5b06845e2c32395a3ab9ac89c25416f3161689b67a3640382de88661506a399d15d7
data/README.md CHANGED
@@ -4,10 +4,13 @@ A syslog/log file tail monitor for forwarding to the oohlalog system.
4
4
 
5
5
  ## Installation
6
6
 
7
- Install the oohlalog_syslog scripts with:
7
+ Prerequisites: Ruby 1.9.2 or higher needs to be installed along with rubygems (normally included with ruby)
8
8
 
9
- gem install 'oohlalog_syslog'
9
+ Install the oohlalog_syslog scripts with:
10
10
 
11
+ ```
12
+ gem install 'oohlalog_syslog'
13
+ ```
11
14
 
12
15
 
13
16
  ## Usage
@@ -20,10 +23,14 @@ Create a configuration file in `/etc/oohlalog/config.yml`
20
23
  syslog:
21
24
  path: /var/log/system.log
22
25
  api_key: YOUR_API_KEY
26
+ default_level: INFO
27
+ error_pattern: ERROR
28
+ warn_pattern: WARN
29
+ info_pattern: INFO
23
30
  ```
24
31
 
25
32
  Multiple log files can be listed here by name (in the example above we are naming this log syslog).
26
- This gives us the ability to tie logging into other services like perhaps your mysql logs, mongo logs, whatever log file you want to monitor really.
33
+ This gives us the ability to tie logging into other services like perhaps your mysql logs, mongo logs, whatever log file you want to monitor really. Regular expressions may also be defined on a file by file basis as shown in hte config above.
27
34
 
28
35
  To kick off the monitor one can simply test by typing `oohlalog` in the shell. This will startup the monitor script and start forwarding log messages to oohlalog. It will also confirm your config is setup correctly.
29
36
 
@@ -12,6 +12,7 @@ class OohlalogSyslog::FileWatcher
12
12
 
13
13
  def run
14
14
  File::Tail::Logfile.open(@filename) do |log|
15
+ log.backward(0)
15
16
  log.tail do |line|
16
17
  if @options.has_key?("error_pattern") && line.match(@options["error_pattern"])
17
18
  @logger.error(line, @category)
@@ -1,3 +1,3 @@
1
1
  module OohlalogSyslog
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.0"
3
3
  end
data/sample_config.yaml CHANGED
@@ -2,7 +2,7 @@ syslog:
2
2
  api_key: APIKEYHERE
3
3
  path: "/var/log/syslog"
4
4
  default_level: INFO
5
- error_pattern: /ERROR/
6
- warn_pattern: /WARN/
7
- info_pattern: /INFO/
5
+ error_pattern: ERROR
6
+ warn_pattern: WARN
7
+ info_pattern: INFO
8
8
 
metadata CHANGED
@@ -1,68 +1,60 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oohlalog_syslog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
5
- prerelease:
4
+ version: 0.1.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - David Estes
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-10-11 00:00:00.000000000 Z
11
+ date: 2013-10-27 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: oohlalog
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: daemons
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: file-tail
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: bundler
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ~>
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ~>
76
67
  - !ruby/object:Gem::Version
@@ -78,17 +69,15 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: rake
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - '>='
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - '>='
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  description: Log File Watcher Daemon Written in ruby
@@ -116,27 +105,26 @@ files:
116
105
  homepage: http://www.oohlalog.com/
117
106
  licenses:
118
107
  - MIT
108
+ metadata: {}
119
109
  post_install_message:
120
110
  rdoc_options: []
121
111
  require_paths:
122
112
  - lib
123
113
  required_ruby_version: !ruby/object:Gem::Requirement
124
- none: false
125
114
  requirements:
126
- - - ! '>='
115
+ - - '>='
127
116
  - !ruby/object:Gem::Version
128
117
  version: '0'
129
118
  required_rubygems_version: !ruby/object:Gem::Requirement
130
- none: false
131
119
  requirements:
132
- - - ! '>='
120
+ - - '>='
133
121
  - !ruby/object:Gem::Version
134
122
  version: '0'
135
123
  requirements: []
136
124
  rubyforge_project:
137
- rubygems_version: 1.8.25
125
+ rubygems_version: 2.0.5
138
126
  signing_key:
139
- specification_version: 3
127
+ specification_version: 4
140
128
  summary: Monitors log files as specified in etc config and passes them to the oohlalog
141
129
  logging service.
142
130
  test_files: []