fluent-plugin-wodby 0.1.8 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fluent-plugin-wodby.gemspec +1 -1
- data/lib/fluent/plugin/filter_wodby.rb +21 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23ae85cc153a514e34cca03046b10a61ad3147fef2e2116fd94dead6d14e0fbb
|
4
|
+
data.tar.gz: 9e98ed0e992289f9b3d6fa0143c27d72377d460bed2bce9343b80b863723a70a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59116055801189e0e2a14af1783d9c3d32eeb3796c7f15ca6d78e0299bfe37e86d11b5fd18ee63db5ff47d623359bcbfcf2e54e1d6c6249aa0f4fbf5681afa50
|
7
|
+
data.tar.gz: 8ab9b95f8843fed694541bc4e1489fba6338b0870f16a161a6fa736f059273902252b4b4a194a39396e759bfa8df8dd22bc8850ccf6df4726cdfd626220ac68f
|
data/fluent-plugin-wodby.gemspec
CHANGED
@@ -40,15 +40,22 @@ module Fluent
|
|
40
40
|
record['wodby.instance_query'] = namespace
|
41
41
|
instance = get_instance(namespace)
|
42
42
|
app = get_app(instance['app_id'])
|
43
|
+
org = get_org(app['org_id'])
|
43
44
|
|
44
45
|
@instance_map[namespace] = {
|
45
46
|
'name' => "#{app['name']}.#{instance['name']}",
|
46
47
|
'title' => "#{app['title']} - #{instance['title']}",
|
48
|
+
'type' => instance['type'],
|
49
|
+
'organization' => org['title'],
|
50
|
+
'organization_name' => org['name'],
|
47
51
|
}
|
48
52
|
end
|
49
53
|
|
50
54
|
record['wodby.instance'] = @instance_map[namespace]['name']
|
51
55
|
record['wodby.instance_title'] = @instance_map[namespace]['title']
|
56
|
+
record['wodby.instance_type'] = @instance_map[namespace]['type']
|
57
|
+
record['wodby.organization'] = @instance_map[namespace]['organization']
|
58
|
+
record['wodby.organization_name'] = @instance_map[namespace]['organization_name']
|
52
59
|
else
|
53
60
|
log.info "No namespace found"
|
54
61
|
log.info record
|
@@ -86,6 +93,20 @@ module Fluent
|
|
86
93
|
|
87
94
|
app
|
88
95
|
end
|
96
|
+
|
97
|
+
def get_org(org_id)
|
98
|
+
begin
|
99
|
+
response = RestClient.get(
|
100
|
+
"https://api.wodby.com/api/v3/orgs/#{org_id}",
|
101
|
+
headers={'X-API-KEY': @api_key}
|
102
|
+
)
|
103
|
+
org = JSON.parse(response)
|
104
|
+
rescue RestClient::ExceptionWithResponse
|
105
|
+
org = {}
|
106
|
+
end
|
107
|
+
|
108
|
+
org
|
109
|
+
end
|
89
110
|
end
|
90
111
|
end
|
91
112
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-wodby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Wunderer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
requirements: []
|
140
|
-
rubygems_version: 3.3.
|
140
|
+
rubygems_version: 3.3.26
|
141
141
|
signing_key:
|
142
142
|
specification_version: 4
|
143
143
|
summary: Tranlates Wodbys instance UUIDs into instance names
|