logstash-filter-age 1.0.0 → 1.0.1
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.
- checksums.yaml +4 -4
- data/Gemfile +9 -0
- data/docs/index.asciidoc +66 -0
- data/logstash-filter-age.gemspec +2 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1ecf587f2ce31e27952c6d782028a9a6ee38728
|
4
|
+
data.tar.gz: 1785280505833c38c92ea69a3850a2220e7e1c3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fb4d152c32be935c07c329252aad119bb5898dc425ca2558ebdfe48024f0a835390873a117eab02b46532c784f9313b8e3d78555dd99c10bbeb442445f5fbde
|
7
|
+
data.tar.gz: 0046af6b60a0b3d91eca69663e6c007c914efe6f8a4f1374cc050791c39df27a951b2fe55ad588cbac59b3a238ad5eb0e0053440a7d9ee4924181f7b7cead172
|
data/Gemfile
CHANGED
@@ -1,2 +1,11 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
|
+
|
2
3
|
gemspec
|
4
|
+
|
5
|
+
logstash_path = ENV["LOGSTASH_PATH"] || "../../logstash"
|
6
|
+
use_logstash_source = ENV["LOGSTASH_SOURCE"] && ENV["LOGSTASH_SOURCE"].to_s == "1"
|
7
|
+
|
8
|
+
if Dir.exist?(logstash_path) && use_logstash_source
|
9
|
+
gem 'logstash-core', :path => "#{logstash_path}/logstash-core"
|
10
|
+
gem 'logstash-core-plugin-api', :path => "#{logstash_path}/logstash-core-plugin-api"
|
11
|
+
end
|
data/docs/index.asciidoc
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
:plugin: age
|
2
|
+
:type: filter
|
3
|
+
|
4
|
+
///////////////////////////////////////////
|
5
|
+
START - GENERATED VARIABLES, DO NOT EDIT!
|
6
|
+
///////////////////////////////////////////
|
7
|
+
:version: %VERSION%
|
8
|
+
:release_date: %RELEASE_DATE%
|
9
|
+
:changelog_url: %CHANGELOG_URL%
|
10
|
+
:include_path: ../../../../logstash/docs/include
|
11
|
+
///////////////////////////////////////////
|
12
|
+
END - GENERATED VARIABLES, DO NOT EDIT!
|
13
|
+
///////////////////////////////////////////
|
14
|
+
|
15
|
+
[id="plugins-{type}-{plugin}"]
|
16
|
+
|
17
|
+
=== Age filter plugin
|
18
|
+
|
19
|
+
include::{include_path}/plugin_header.asciidoc[]
|
20
|
+
|
21
|
+
==== Description
|
22
|
+
|
23
|
+
A simple filter for calculating the age of an event.
|
24
|
+
|
25
|
+
This filter calculates the age of an event by subtracting the event timestamp
|
26
|
+
from the current timestamp. This allows you to drop Logstash events that are
|
27
|
+
older than some threshold.
|
28
|
+
|
29
|
+
[source,ruby]
|
30
|
+
filter {
|
31
|
+
age {}
|
32
|
+
|
33
|
+
if [@metadata][age] > 86400 {
|
34
|
+
drop {}
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
|
39
|
+
[id="plugins-{type}s-{plugin}-options"]
|
40
|
+
==== Age Filter Configuration Options
|
41
|
+
|
42
|
+
This plugin supports the following configuration options plus the <<plugins-{type}s-{plugin}-common-options>> described later.
|
43
|
+
|
44
|
+
[cols="<,<,<",options="header",]
|
45
|
+
|=======================================================================
|
46
|
+
|Setting |Input type|Required
|
47
|
+
| <<plugins-{type}s-{plugin}-target>> |<<string,string>>|No
|
48
|
+
|=======================================================================
|
49
|
+
|
50
|
+
Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
|
51
|
+
filter plugins.
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
[id="plugins-{type}s-{plugin}-target"]
|
56
|
+
===== `target`
|
57
|
+
|
58
|
+
* Value type is <<string,string>>
|
59
|
+
* Default value is `"[@metadata][age]"`
|
60
|
+
|
61
|
+
Define the target field for the event age, in seconds.
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
[id="plugins-{type}s-{plugin}-common-options"]
|
66
|
+
include::{include_path}/{type}.asciidoc[]
|
data/logstash-filter-age.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-filter-age'
|
3
|
-
s.version
|
3
|
+
s.version = '1.0.1'
|
4
4
|
s.licenses = ['Apache License (2.0)']
|
5
5
|
s.summary = 'A Logstash filter for calculating the age of an 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/logstash-plugin install gemname. This gem is not a stand-alone program'
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.require_paths = ['lib']
|
11
11
|
|
12
12
|
# Files
|
13
|
-
s.files = Dir[
|
13
|
+
s.files = Dir["lib/**/*","spec/**/*","*.gemspec","*.md","CONTRIBUTORS","Gemfile","LICENSE","NOTICE.TXT", "vendor/jar-dependencies/**/*.jar", "vendor/jar-dependencies/**/*.rb", "VERSION", "docs/**/*"]
|
14
14
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
15
15
|
|
16
16
|
# Special flag to let us know this is actually a Logstash plugin
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-filter-age
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua Spence
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -55,6 +55,7 @@ files:
|
|
55
55
|
- Gemfile
|
56
56
|
- LICENSE
|
57
57
|
- README.md
|
58
|
+
- docs/index.asciidoc
|
58
59
|
- lib/logstash/filters/age.rb
|
59
60
|
- logstash-filter-age.gemspec
|
60
61
|
- spec/filters/age_spec.rb
|