logstash-filter-emoji 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c457407f53496f9c1896fab9aeba881f7cb38a67
4
- data.tar.gz: 64007a22e81616ac020f1010f9a0d3d223d26b71
3
+ metadata.gz: 8bf678b6f5ecf91845711bf00ecb22fc666adc88
4
+ data.tar.gz: 9581d2694e591f9aa5ce2e1a6cdb8b39cece5d24
5
5
  SHA512:
6
- metadata.gz: da0358dfb1690e7194fcbd748699be46035301ecb486f81e0f007c59f6b0bed11af32970093156ed9df5604010145a435b9e1170fa0153d83edec2450e3e8603
7
- data.tar.gz: eb42aa2f86895d9056c3adc06f15e24b8e513f1e29088e6447c62504f4cb5ba9965f5effa8319bf12ea9e56dfba68aafb33be39dfcef0610c39652c1f9a33dba
6
+ metadata.gz: 5bbe89db72f2dfb11b458d4b6665c901f45b553d2601b1a22621aecf909b317896864fad538a639b64a87a24516ac4d5ed2160dcafa9fb687410ce7884042820
7
+ data.tar.gz: 18c71dffbe27f3d48b5ecc518a9b9a8f6b66ffea2a43aa014fd3ca41f9e6db24401dbb2d9e2967973df38e4fd30d35bd53c7170d5ac2e207ec4a5e4ac643a44b
data/Gemfile CHANGED
@@ -1,3 +1,11 @@
1
1
  source 'https://rubygems.org'
2
+
2
3
  gemspec
3
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
@@ -0,0 +1,176 @@
1
+ :plugin: emoji
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
+ === Emoji filter plugin
18
+
19
+ include::{include_path}/plugin_header.asciidoc[]
20
+
21
+ ==== Description
22
+
23
+ This plugin maps the severity names or numeric codes as defined in
24
+ https://tools.ietf.org/html/rfc3164#section-4.1.1[RFC 3164] and
25
+ https://tools.ietf.org/html/rfc5424#section-6.2.1[RFC 5424] to the emoji
26
+ as defined in the configuration.
27
+
28
+ [id="plugins-{type}s-{plugin}-options"]
29
+ ==== Emoji Filter Configuration Options
30
+
31
+ This plugin supports the following configuration options plus the <<plugins-{type}s-{plugin}-common-options>> described later.
32
+
33
+ [cols="<,<,<",options="header",]
34
+ |=======================================================================
35
+ |Setting |Input type|Required
36
+ | <<plugins-{type}s-{plugin}-fallback>> |<<string,string>>|No
37
+ | <<plugins-{type}s-{plugin}-field>> |<<string,string>>|Yes
38
+ | <<plugins-{type}s-{plugin}-override>> |<<boolean,boolean>>|No
39
+ | <<plugins-{type}s-{plugin}-sev_alert>> |<<string,string>>|No
40
+ | <<plugins-{type}s-{plugin}-sev_critical>> |<<string,string>>|No
41
+ | <<plugins-{type}s-{plugin}-sev_debug>> |<<string,string>>|No
42
+ | <<plugins-{type}s-{plugin}-sev_emergency>> |<<string,string>>|No
43
+ | <<plugins-{type}s-{plugin}-sev_error>> |<<string,string>>|No
44
+ | <<plugins-{type}s-{plugin}-sev_info>> |<<string,string>>|No
45
+ | <<plugins-{type}s-{plugin}-sev_notice>> |<<string,string>>|No
46
+ | <<plugins-{type}s-{plugin}-sev_warning>> |<<string,string>>|No
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
+ &nbsp;
54
+
55
+ [id="plugins-{type}s-{plugin}-fallback"]
56
+ ===== `fallback`
57
+
58
+ * Value type is <<string,string>>
59
+ * There is no default value for this setting.
60
+
61
+ In case no match is found in the event, this will add a default emoji, which
62
+ will always populate `target`, if the match failed.
63
+
64
+ For example, if we have configured `fallback => "`❓`"`, using this
65
+ dictionary:
66
+ [source,ruby]
67
+ foo: 👤
68
+
69
+ Then, if logstash received an event with the field `foo` set to 👤, the
70
+ target field would be set to 👤. However, if logstash received an event with
71
+ `foo` set to `nope`, then the target field would still be populated, but
72
+ with the value of ❓.
73
+ This configuration can be dynamic and include parts of the event using the
74
+ `%{field}` syntax.
75
+
76
+ [id="plugins-{type}s-{plugin}-field"]
77
+ ===== `field`
78
+
79
+ * This is a required setting.
80
+ * Value type is <<string,string>>
81
+ * There is no default value for this setting.
82
+
83
+ The name of the logstash event field containing the value to be compared for
84
+ a match by the emoji filter (e.g. `severity`).
85
+
86
+ If this field is an array, only the first value will be used.
87
+
88
+ [id="plugins-{type}s-{plugin}-override"]
89
+ ===== `override`
90
+
91
+ * Value type is <<boolean,boolean>>
92
+ * Default value is `false`
93
+
94
+ If the target field already exists, this configuration item specifies
95
+ whether the filter should skip being rewritten as an emoji (default) or
96
+ overwrite the target field value with the emoji value.
97
+
98
+ [id="plugins-{type}s-{plugin}-sev_alert"]
99
+ ===== `sev_alert`
100
+
101
+ * Value type is <<string,string>>
102
+ * Default value is `"🚨"`
103
+
104
+ `sev_alert` selects the emoji/unicode character for Alert severity
105
+
106
+ [id="plugins-{type}s-{plugin}-sev_critical"]
107
+ ===== `sev_critical`
108
+
109
+ * Value type is <<string,string>>
110
+ * Default value is `"đŸ”Ĩ"`
111
+
112
+ `sev_critical` selects the emoji/unicode character for Critical severity
113
+
114
+ [id="plugins-{type}s-{plugin}-sev_debug"]
115
+ ===== `sev_debug`
116
+
117
+ * Value type is <<string,string>>
118
+ * Default value is `"🐛"`
119
+
120
+ `sev_debug` selects the emoji/unicode character for Debug severity
121
+
122
+ [id="plugins-{type}s-{plugin}-sev_emergency"]
123
+ ===== `sev_emergency`
124
+
125
+ * Value type is <<string,string>>
126
+ * Default value is `"đŸ’Ĩ"`
127
+
128
+ `sev_emergency` selects the emoji/unicode character for Emergency severity
129
+
130
+ [id="plugins-{type}s-{plugin}-sev_error"]
131
+ ===== `sev_error`
132
+
133
+ * Value type is <<string,string>>
134
+ * Default value is `"❌"`
135
+
136
+ `sev_error` selects the emoji/unicode character for Error severity
137
+
138
+ [id="plugins-{type}s-{plugin}-sev_info"]
139
+ ===== `sev_info`
140
+
141
+ * Value type is <<string,string>>
142
+ * Default value is `"â„šī¸"`
143
+
144
+ `sev_info` selects the emoji/unicode character for Informational severity
145
+
146
+ [id="plugins-{type}s-{plugin}-sev_notice"]
147
+ ===== `sev_notice`
148
+
149
+ * Value type is <<string,string>>
150
+ * Default value is `"👀"`
151
+
152
+ `sev_notice` selects the emoji/unicode character for Notice severity
153
+
154
+ [id="plugins-{type}s-{plugin}-sev_warning"]
155
+ ===== `sev_warning`
156
+
157
+ * Value type is <<string,string>>
158
+ * Default value is `"âš ī¸"`
159
+
160
+ `sev_warning` selects the emoji/unicode character for Warning severity
161
+
162
+ [id="plugins-{type}s-{plugin}-target"]
163
+ ===== `target`
164
+
165
+ * Value type is <<string,string>>
166
+ * Default value is `"emoji"`
167
+
168
+ The target field you wish to populate with the emoji. The default
169
+ is a field named `emoji`. Set this to the same value as the source (`field`)
170
+ if you want to do a substitution, in this case filter will allways succeed.
171
+ This will overwrite the old value of the source field!
172
+
173
+
174
+
175
+ [id="plugins-{type}s-{plugin}-common-options"]
176
+ include::{include_path}/{type}.asciidoc[]
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-filter-emoji'
3
- s.version = '1.0.0'
3
+ s.version = '1.0.1'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = "The emoji filter allows you to match field values with emoji and either replace them, or insert the emoji into a target field"
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['lib/**/*','spec/**/*','vendor/**/*','*.gemspec','*.md','CONTRIBUTORS','Gemfile','LICENSE','NOTICE.TXT']
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
  # Tests
15
15
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
16
16
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-emoji
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-08 00:00:00.000000000 Z
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
@@ -50,6 +50,7 @@ files:
50
50
  - Gemfile
51
51
  - LICENSE
52
52
  - README.md
53
+ - docs/index.asciidoc
53
54
  - lib/logstash/filters/emoji.rb
54
55
  - logstash-filter-emoji.gemspec
55
56
  - spec/filters/emoji_spec.rb