fluent-plugin-wodby 0.1.8 → 0.2.1
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: 02e47419c17b80995c000e6c8117210bbfc36760562a64d036d6356110ebe70b
|
4
|
+
data.tar.gz: 4e1d8bbca7b8f99ffb8515b770254352cf9836aba15351ed53c19af59fb1b55b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 376f2002415aebf0578f6974fdd87353a85e9a91417b5638419f314dc0d654630683ee7d5dd0cc36696c97e0cf3e8074fc88888d50443f370dc95c547995cea7
|
7
|
+
data.tar.gz: eabcafd0d91bac797658ee6f194973132ea1e229ac8d9a3c239352c9f6b62f40869351f346019e6ca663f958eee5888cf1975af76b26ad22cd3d9832ae03dd00
|
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['name'],
|
50
|
+
'organization_title' => org['title'],
|
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.1
|
4
|
+
version: 0.2.1
|
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
|