fluent-plugin-f5-beacon 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/README.md +1 -0
- data/fluent-plugin-f5-beacon.gemspec +1 -1
- data/lib/fluent/plugin/out_f5_beacon.rb +8 -3
- data/test/plugin/test_out_f5_beacon.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef9d4f296ac0d2123bdd6deb75b26688ef21c633f9ded3d12baf1a3489c21801
|
4
|
+
data.tar.gz: d6f486d86392abfae3f31dee2bf42091d5e38efda8715fe452c5a1f53fb68c39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d33e387074a4da1711d5701676ee7bf0b97f2f2eaf11fcd14d7284d0b74ccbe6e0b48ba141417d2b421e30f2d2554d5b365c6c33eb7c7f66a8ee127303763de
|
7
|
+
data.tar.gz: e90e35e373bea200d6b99acecff87c6965d8f90897b65bbac46a749133fc140fa5a6285ceafcbc4ffbacc81176264b46e9d40e66eb06d6dfd5ad75791769b833
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "fluent-plugin-f5-beacon"
|
6
|
-
s.version = '0.0.
|
6
|
+
s.version = '0.0.3'
|
7
7
|
s.authors = ["Matt Davey"]
|
8
8
|
s.email = ["m.davey@f5.com"]
|
9
9
|
s.description = %q{F5 Beacon output plugin for Fluentd}
|
@@ -36,7 +36,7 @@ module Fluent::Plugin class BeaconOutput < Output
|
|
36
36
|
config_param :measurement, :string, default: nil,
|
37
37
|
desc: "The measurement name to insert event. If not specified, fluentd's tag is used."
|
38
38
|
config_param :time_key, :string, default: 'time',
|
39
|
-
desc: 'Use value of this tag if it exists in event instead of event timestamp.'
|
39
|
+
desc: 'Use value of this tag if it exists in event instead of event timestamp. Values must be in Epoch time.'
|
40
40
|
config_param :auto_tags, :bool, default: false,
|
41
41
|
desc: "Enable/disable auto-tagging behavior which makes strings tags."
|
42
42
|
config_param :tag_keys, :array, default: [],
|
@@ -101,7 +101,7 @@ events and reset to zero for a new event with the different timestamp.
|
|
101
101
|
points = []
|
102
102
|
tag = chunk.metadata.tag
|
103
103
|
chunk.msgpack_each do |time, record|
|
104
|
-
timestamp = record.delete(@time_key) || time
|
104
|
+
timestamp = precision_time(record.delete(@time_key)) || time
|
105
105
|
if tag_keys.empty? && !@auto_tags
|
106
106
|
values = record
|
107
107
|
tags = {}
|
@@ -120,7 +120,6 @@ events and reset to zero for a new event with the different timestamp.
|
|
120
120
|
end
|
121
121
|
end
|
122
122
|
end
|
123
|
-
|
124
123
|
if @sequence_tag
|
125
124
|
if @prev_timestamp == timestamp
|
126
125
|
@seq += 1
|
@@ -179,6 +178,8 @@ events and reset to zero for a new event with the different timestamp.
|
|
179
178
|
end
|
180
179
|
|
181
180
|
def precision_time(time)
|
181
|
+
return if time.nil?
|
182
|
+
|
182
183
|
# nsec is supported from v0.14
|
183
184
|
time * (10 ** 9) + (time.is_a?(Integer) ? 0 : time.nsec)
|
184
185
|
end
|
@@ -202,6 +203,9 @@ events and reset to zero for a new event with the different timestamp.
|
|
202
203
|
def send_request(req, uri)
|
203
204
|
res = nil
|
204
205
|
|
206
|
+
log.debug { "sending data to Beacon" }
|
207
|
+
log.trace { req.body }
|
208
|
+
|
205
209
|
begin
|
206
210
|
res = Net::HTTP.start(uri.host, uri.port, **http_opts(uri)) {|http| http.request(req) }
|
207
211
|
|
@@ -233,3 +237,4 @@ events and reset to zero for a new event with the different timestamp.
|
|
233
237
|
|
234
238
|
end
|
235
239
|
end
|
240
|
+
|
@@ -389,7 +389,7 @@ class BeaconOutputTest < Test::Unit::TestCase
|
|
389
389
|
|
390
390
|
time = event_time("2020-01-02 13:14:15 UTC")
|
391
391
|
driver.run(default_tag: 'input.influxdb') do
|
392
|
-
driver.feed(time, {'a' => 1, 'b' =>
|
392
|
+
driver.feed(time, {'a' => 1, 'b' => 1293974055})
|
393
393
|
end
|
394
394
|
|
395
395
|
assert_equal([
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-f5-beacon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Davey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|