logstash-filter-aggregate 2.0.3 → 2.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/CONTRIBUTORS +3 -0
- data/README.md +12 -0
- data/lib/logstash/filters/aggregate.rb +13 -0
- data/logstash-filter-aggregate.gemspec +2 -2
- metadata +23 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4888d214c341865c9c54f9bf4e3c4e438a9b355
|
4
|
+
data.tar.gz: 495cc82d7bf71d00679198be178e40bc9a296048
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd15d7f6ad1dd1b1e30db72373c6bf787eff2caf6515c7e46262cdf681d984886e9c9edc6d8f4d622efaae9943f403ec9b516f9eec7dc9a3b800044f11c2609c
|
7
|
+
data.tar.gz: 90be8ce2b39f9d59404427c3833e5fb753f512e9c6a4e69f3093d0de6e0363e8c30bf922fe96b8e41582580b43bd7fae15bd2b8a65d02dca82f98fc32636a726
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# 2.0.5
|
2
|
+
- Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash
|
3
|
+
# 2.0.4
|
4
|
+
- New dependency requirements for logstash-core for the 5.0 release
|
1
5
|
# v 2.0.3
|
2
6
|
- fix issue #10 : numeric task_id is now well processed
|
3
7
|
|
data/CONTRIBUTORS
CHANGED
data/README.md
CHANGED
@@ -3,6 +3,10 @@
|
|
3
3
|
[![Build Status](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Filters/job/logstash-plugin-filter-aggregate-unit/badge/icon)](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Filters/job/logstash-plugin-filter-aggregate-unit/)
|
4
4
|
|
5
5
|
The aim of this filter is to aggregate information available among several events (typically log lines) belonging to a same task, and finally push aggregated information into final task event.
|
6
|
+
|
7
|
+
You should be very careful to set logstash filter workers to 1 (`-w 1` flag) for this filter to work
|
8
|
+
correctly otherwise documents
|
9
|
+
may be processed out of sequence and unexpected results will occur.
|
6
10
|
|
7
11
|
## Example #1
|
8
12
|
|
@@ -108,6 +112,14 @@ it allows to initialize 'sql_duration' map entry to 0 only if this map entry is
|
|
108
112
|
- if no timeout is defined, by default, all maps older than 1800 seconds are automatically deleted
|
109
113
|
- finally, if `code` execution raises an exception, the error is logged and event is tagged '_aggregateexception'
|
110
114
|
|
115
|
+
## Use Cases
|
116
|
+
- extract some cool metrics from task logs and push them into task final log event (like in example #1 and #2)
|
117
|
+
- extract error information in any task log line, and push it in final task event (to get a final document with all error information if any)
|
118
|
+
- extract all back-end calls as a list, and push this list in final task event (to get a task profile)
|
119
|
+
- extract all http headers logged in several lines to push this list in final task event (complete http request info)
|
120
|
+
- for every back-end call, collect call details available on several lines, analyse it and finally tag final back-end call log line (error, timeout, business-warning, ...)
|
121
|
+
- Finally, task id can be any correlation id matching your need : it can be a session id, a file path, ...
|
122
|
+
|
111
123
|
## Aggregate Plugin Options
|
112
124
|
- **task_id :**
|
113
125
|
The expression defining task ID to correlate logs.
|
@@ -7,6 +7,10 @@ require "thread"
|
|
7
7
|
#
|
8
8
|
# The aim of this filter is to aggregate information available among several events (typically log lines) belonging to a same task,
|
9
9
|
# and finally push aggregated information into final task event.
|
10
|
+
#
|
11
|
+
# You should be very careful to set logstash filter workers to 1 (`-w 1` flag) for this filter to work
|
12
|
+
# correctly otherwise documents
|
13
|
+
# may be processed out of sequence and unexpected results will occur.
|
10
14
|
#
|
11
15
|
# ==== Example #1
|
12
16
|
#
|
@@ -117,6 +121,15 @@ require "thread"
|
|
117
121
|
# * finally, if `code` execution raises an exception, the error is logged and event is tagged '_aggregateexception'
|
118
122
|
#
|
119
123
|
#
|
124
|
+
# ==== Use Cases
|
125
|
+
# * extract some cool metrics from task logs and push them into task final log event (like in example #1 and #2)
|
126
|
+
# * extract error information in any task log line, and push it in final task event (to get a final document with all error information if any)
|
127
|
+
# * extract all back-end calls as a list, and push this list in final task event (to get a task profile)
|
128
|
+
# * extract all http headers logged in several lines to push this list in final task event (complete http request info)
|
129
|
+
# * for every back-end call, collect call details available on several lines, analyse it and finally tag final back-end call log line (error, timeout, business-warning, ...)
|
130
|
+
# * Finally, task id can be any correlation id matching your need : it can be a session id, a file path, ...
|
131
|
+
#
|
132
|
+
#
|
120
133
|
class LogStash::Filters::Aggregate < LogStash::Filters::Base
|
121
134
|
|
122
135
|
config_name "aggregate"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-filter-aggregate'
|
3
|
-
s.version = '2.0.
|
3
|
+
s.version = '2.0.5'
|
4
4
|
s.licenses = ['Apache License (2.0)']
|
5
5
|
s.summary = "The aim of this filter is to aggregate information available among several events (typically log lines) belonging to a same task, and finally push aggregated information into final task event."
|
6
6
|
s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
|
@@ -19,6 +19,6 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.metadata = { "logstash_plugin" => "true", "logstash_group" => "filter" }
|
20
20
|
|
21
21
|
# Gem dependencies
|
22
|
-
s.add_runtime_dependency "logstash-core", "
|
22
|
+
s.add_runtime_dependency "logstash-core-plugin-api", "~> 1.0"
|
23
23
|
s.add_development_dependency 'logstash-devutils', '~> 0'
|
24
24
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-filter-aggregate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
@@ -9,58 +9,52 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-03-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name: logstash-core
|
16
|
-
version_requirements: !ruby/object:Gem::Requirement
|
17
|
-
requirements:
|
18
|
-
- - '>='
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: 2.0.0
|
21
|
-
- - <
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 3.0.0
|
24
15
|
requirement: !ruby/object:Gem::Requirement
|
25
16
|
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
version: 2.0.0
|
29
|
-
- - <
|
17
|
+
- - "~>"
|
30
18
|
- !ruby/object:Gem::Version
|
31
|
-
version:
|
19
|
+
version: '1.0'
|
20
|
+
name: logstash-core-plugin-api
|
32
21
|
prerelease: false
|
33
22
|
type: :runtime
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: logstash-devutils
|
36
23
|
version_requirements: !ruby/object:Gem::Requirement
|
37
24
|
requirements:
|
38
|
-
- - ~>
|
25
|
+
- - "~>"
|
39
26
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
27
|
+
version: '1.0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
41
29
|
requirement: !ruby/object:Gem::Requirement
|
42
30
|
requirements:
|
43
|
-
- - ~>
|
31
|
+
- - "~>"
|
44
32
|
- !ruby/object:Gem::Version
|
45
33
|
version: '0'
|
34
|
+
name: logstash-devutils
|
46
35
|
prerelease: false
|
47
36
|
type: :development
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
48
42
|
description: This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program
|
49
43
|
email: info@elastic.co
|
50
44
|
executables: []
|
51
45
|
extensions: []
|
52
46
|
extra_rdoc_files: []
|
53
47
|
files:
|
54
|
-
- lib/logstash/filters/aggregate.rb
|
55
|
-
- spec/filters/aggregate_spec.rb
|
56
|
-
- spec/filters/aggregate_spec_helper.rb
|
57
|
-
- logstash-filter-aggregate.gemspec
|
58
48
|
- BUILD.md
|
59
49
|
- CHANGELOG.md
|
60
|
-
- README.md
|
61
50
|
- CONTRIBUTORS
|
62
51
|
- Gemfile
|
63
52
|
- LICENSE
|
53
|
+
- README.md
|
54
|
+
- lib/logstash/filters/aggregate.rb
|
55
|
+
- logstash-filter-aggregate.gemspec
|
56
|
+
- spec/filters/aggregate_spec.rb
|
57
|
+
- spec/filters/aggregate_spec_helper.rb
|
64
58
|
homepage: https://github.com/logstash-plugins/logstash-filter-aggregate
|
65
59
|
licenses:
|
66
60
|
- Apache License (2.0)
|
@@ -73,17 +67,17 @@ require_paths:
|
|
73
67
|
- lib
|
74
68
|
required_ruby_version: !ruby/object:Gem::Requirement
|
75
69
|
requirements:
|
76
|
-
- -
|
70
|
+
- - ">="
|
77
71
|
- !ruby/object:Gem::Version
|
78
72
|
version: '0'
|
79
73
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
74
|
requirements:
|
81
|
-
- -
|
75
|
+
- - ">="
|
82
76
|
- !ruby/object:Gem::Version
|
83
77
|
version: '0'
|
84
78
|
requirements: []
|
85
79
|
rubyforge_project:
|
86
|
-
rubygems_version: 2.
|
80
|
+
rubygems_version: 2.4.8
|
87
81
|
signing_key:
|
88
82
|
specification_version: 4
|
89
83
|
summary: The aim of this filter is to aggregate information available among several events (typically log lines) belonging to a same task, and finally push aggregated information into final task event.
|