logstash-filter-influxdb 0.0.2 → 0.0.3
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/lib/logstash/filters/influxdb.rb +3 -10
- data/logstash-filter-influxdb.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d29f2a71ef317e8a933619eaf2ae28f14f32110294a2b4a63eff1c0c5683479
|
4
|
+
data.tar.gz: c48759318cb92c7f59c068ab89d9214317e9f4755c577f140a9933512e5d62eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19f87a0ffb755e45c869ef24c765a397db35961a91d1368ebc5039e72e0789fb7e330b686388fe70aa6c46b7418d8795f1792b6e8947e606b6224ec2a5f2c638
|
7
|
+
data.tar.gz: b4c1b6b5698b9750c249e8c1a135fa62f5293d886a30f1a289fb9e59c715d5830eb35a8fc2d51d6311046f70166e824fa217114790b2ec23b5f9526cc605277f
|
@@ -19,8 +19,7 @@ class LogStash::Filters::Influxdb < LogStash::Filters::Base
|
|
19
19
|
config_name "influxdb"
|
20
20
|
|
21
21
|
# Replace the message with this value.
|
22
|
-
config :
|
23
|
-
|
22
|
+
config :source, :validate => :string, :default => "message"
|
24
23
|
|
25
24
|
public
|
26
25
|
def register
|
@@ -29,20 +28,14 @@ class LogStash::Filters::Influxdb < LogStash::Filters::Base
|
|
29
28
|
|
30
29
|
public
|
31
30
|
def filter(event)
|
31
|
+
|
32
|
+
point = InfluxParser.parse_point(event.get(@source))
|
32
33
|
|
33
|
-
point = InfluxParser.parse_point(event.get('message'))
|
34
34
|
if point
|
35
35
|
event.set('point', point)
|
36
36
|
else
|
37
37
|
event.set('point', {'_influxparseerror' => true })
|
38
38
|
end
|
39
|
-
# event.set("point")
|
40
|
-
# if @message
|
41
|
-
# # Replace the event message with our message as configured in the
|
42
|
-
# # config file.
|
43
|
-
# # event.set("message", @message)
|
44
|
-
|
45
|
-
# end
|
46
39
|
|
47
40
|
# filter_matched should go in the last line of our successful code
|
48
41
|
filter_matched(event)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-filter-influxdb'
|
3
|
-
s.version = '0.0.
|
3
|
+
s.version = '0.0.3'
|
4
4
|
s.licenses = ['Apache License (2.0)']
|
5
5
|
s.summary = "Parse a string of influx line protocol to fields"
|
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"
|