fluent-plugin-calyptia-monitoring 0.1.0.rc8 → 0.1.0.rc9
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e42e4240470d5d46bcf2d098699d82d1d0eb6440f88fd89ff004d7c79b5789f7
|
4
|
+
data.tar.gz: 7f164695485c5202e003a31defc1b5a4022b67ed25ac71550011eb6400946f43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce39e348d421451fda13460ec7072d35e6e79df6c5bc74dfb48fb8f5d9237ff3c4a97bee8034d6e69ba76540b0c375b0cc599b78606b18adecb146a8b316d24a
|
7
|
+
data.tar.gz: 171bf4f4c6230b68174aafb76d042059956f0404294157c06b6a763ffb4cd2d726fb93cf9dc9956aa598c12ed5cda1aebdba1fac0a8a7af293907d230e91ef18
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |spec|
|
5
5
|
spec.name = "fluent-plugin-calyptia-monitoring"
|
6
|
-
spec.version = "0.1.0.
|
6
|
+
spec.version = "0.1.0.rc9"
|
7
7
|
spec.authors = ["Hiroshi Hatake"]
|
8
8
|
spec.email = ["hatake@calyptia.com"]
|
9
9
|
|
@@ -23,6 +23,6 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 2.2.15"
|
24
24
|
spec.add_development_dependency "rake", "~> 13.0"
|
25
25
|
spec.add_development_dependency "test-unit", "~> 3.3"
|
26
|
-
spec.add_runtime_dependency "fluentd", [">= 1.
|
26
|
+
spec.add_runtime_dependency "fluentd", [">= 1.14.0.rc", "< 2"]
|
27
27
|
spec.add_runtime_dependency "fluent-plugin-metrics-cmetrics", ">= 0.1.0.rc3"
|
28
28
|
end
|
@@ -37,12 +37,17 @@ module Fluent::Plugin
|
|
37
37
|
ENV['HTTPS_PROXY'] || ENV['HTTP_PROXY'] || ENV['http_proxy'] || ENV['https_proxy']
|
38
38
|
end
|
39
39
|
|
40
|
+
def create_go_semver(version)
|
41
|
+
version.gsub(/.(?<prever>(rc|alpha|beta|pre))/,
|
42
|
+
'-\k<prever>')
|
43
|
+
end
|
44
|
+
|
40
45
|
def agent_metadata(current_config)
|
41
46
|
metadata = {
|
42
47
|
"name" => Socket.gethostname,
|
43
48
|
"type" => "fluentd",
|
44
49
|
"rawConfig" => current_config,
|
45
|
-
"version" => Fluent::VERSION,
|
50
|
+
"version" => create_go_semver(Fluent::VERSION),
|
46
51
|
"edition" => "community".freeze,
|
47
52
|
}
|
48
53
|
if system_config.workers.to_i > 1
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require "helper"
|
2
|
+
require "logger"
|
3
|
+
require "fluent/plugin/calyptia_monitoring_calyptia_api_requester"
|
4
|
+
|
5
|
+
class CalyptiaMonitoringMachineIdTest < Test::Unit::TestCase
|
6
|
+
API_KEY = 'YOUR_API_KEY'.freeze
|
7
|
+
API_ENDPOINT = "https://cloud-api.calyptia.com".freeze
|
8
|
+
|
9
|
+
setup do
|
10
|
+
@log = Logger.new($stdout)
|
11
|
+
worker_id = [1,2,3,4,5,6,7,8,9,10,11].sample
|
12
|
+
@api_requester = Fluent::Plugin::CalyptiaAPI::Requester.new(API_ENDPOINT,
|
13
|
+
API_KEY,
|
14
|
+
@log,
|
15
|
+
worker_id)
|
16
|
+
end
|
17
|
+
|
18
|
+
data("rc" => ["1.14.0.rc", "1.14.0-rc"],
|
19
|
+
"rc2" => ["1.14.0.rc2", "1.14.0-rc2"],
|
20
|
+
"alpha" => ["1.14.0.alpha", "1.14.0-alpha"],
|
21
|
+
"beta" => ["1.14.0.beta", "1.14.0-beta"],
|
22
|
+
"pre" => ["1.14.0.pre", "1.14.0-pre"],
|
23
|
+
)
|
24
|
+
def test_create_go_semver(data)
|
25
|
+
version, expected = data
|
26
|
+
actual = @api_requester.create_go_semver(version)
|
27
|
+
assert_equal expected, actual
|
28
|
+
end
|
29
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-calyptia-monitoring
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.rc9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroshi Hatake
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08-
|
11
|
+
date: 2021-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -58,7 +58,7 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
61
|
+
version: 1.14.0.rc
|
62
62
|
- - "<"
|
63
63
|
- !ruby/object:Gem::Version
|
64
64
|
version: '2'
|
@@ -68,7 +68,7 @@ dependencies:
|
|
68
68
|
requirements:
|
69
69
|
- - ">="
|
70
70
|
- !ruby/object:Gem::Version
|
71
|
-
version: 1.
|
71
|
+
version: 1.14.0.rc
|
72
72
|
- - "<"
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '2'
|
@@ -109,6 +109,7 @@ files:
|
|
109
109
|
- templates/calyptia-conf.erb
|
110
110
|
- test/command/test_config_generator.rb
|
111
111
|
- test/helper.rb
|
112
|
+
- test/plugin/test_calyptia_monitoring_calyptia_api_requester.rb
|
112
113
|
- test/plugin/test_calyptia_montoring_machine_id.rb
|
113
114
|
- test/plugin/test_in_calyptia_monitoring.rb
|
114
115
|
homepage: https://github.com/calyptia/fluent-plugin-calyptia-monitoring
|
@@ -137,5 +138,6 @@ summary: Monitoring Fluentd via Calyptia Cloud
|
|
137
138
|
test_files:
|
138
139
|
- test/command/test_config_generator.rb
|
139
140
|
- test/helper.rb
|
141
|
+
- test/plugin/test_calyptia_monitoring_calyptia_api_requester.rb
|
140
142
|
- test/plugin/test_calyptia_montoring_machine_id.rb
|
141
143
|
- test/plugin/test_in_calyptia_monitoring.rb
|