dropsonde 0.0.7 → 0.1.0
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/CHANGELOG.md +35 -2
- data/bin/dropsonde +3 -3
- data/lib/dropsonde/cache.rb +9 -3
- data/lib/dropsonde/metrics/dependencies.rb +3 -4
- data/lib/dropsonde/metrics/modules.rb +87 -8
- data/lib/dropsonde/metrics/platforms.rb +4 -5
- data/lib/dropsonde/metrics/puppetfiles.rb +1 -1
- data/lib/dropsonde/metrics.rb +4 -4
- data/lib/dropsonde/submitter/dujour.rb +42 -0
- data/lib/dropsonde/submitter/open_telemetry.rb +10 -0
- data/lib/dropsonde/version.rb +1 -1
- data/lib/dropsonde.rb +15 -27
- metadata +12 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91f1b98200a2be8ff60cd36c8f8c3f8186505ddf78642baa92e9a3f964de7018
|
4
|
+
data.tar.gz: a930895cae5b9a4c93ce563394d11f1dce7b9de73365983ce5d9ca0f253d99f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d50ad9535e6b36eefb147ffeadfbe91db4ade2bbf78be6a0ec42a6c9343f2528396ff619a1ce2414f6e7ea27df770e0e691aadf0f5cac79bb10c3cbba5c2b558
|
7
|
+
data.tar.gz: 7978033d3e0a99dda1837d4de3e5f88e8a7a23d0577f7c0e3a281cb3c2cb3d733fb724c5f2488f5b1222601127cb87448cb2f0a4480ebe523b4a1ee9e55d307e
|
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,44 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## [0.0
|
3
|
+
## [0.1.0](https://github.com/OpenVoxProject/dropsonde/tree/0.1.0) (2025-06-10)
|
4
4
|
|
5
|
-
[Full Changelog](https://github.com/
|
5
|
+
[Full Changelog](https://github.com/OpenVoxProject/dropsonde/compare/v0.0.8...0.1.0)
|
6
|
+
|
7
|
+
**Breaking changes:**
|
8
|
+
|
9
|
+
- remove and abstract Puppet dependency; manually require the gem you want to use [\#1](https://github.com/OpenVoxProject/dropsonde/pull/1) ([binford2k](https://github.com/binford2k))
|
10
|
+
|
11
|
+
**Fixed bugs:**
|
12
|
+
|
13
|
+
- Fix a couple nil references [\#5](https://github.com/OpenVoxProject/dropsonde/pull/5) ([binford2k](https://github.com/binford2k))
|
14
|
+
- fix broken acceptance test [\#4](https://github.com/OpenVoxProject/dropsonde/pull/4) ([binford2k](https://github.com/binford2k))
|
15
|
+
|
16
|
+
**Merged pull requests:**
|
17
|
+
|
18
|
+
- dependabot: check for github actions and bundler [\#6](https://github.com/OpenVoxProject/dropsonde/pull/6) ([bastelfreak](https://github.com/bastelfreak))
|
19
|
+
- workflow housekeeping [\#3](https://github.com/OpenVoxProject/dropsonde/pull/3) ([binford2k](https://github.com/binford2k))
|
20
|
+
- No need to run specs nightly [\#2](https://github.com/OpenVoxProject/dropsonde/pull/2) ([binford2k](https://github.com/binford2k))
|
21
|
+
|
22
|
+
## [v0.0.8](https://github.com/puppetlabs/dropsonde/tree/0.0.8) (2022-08-29)
|
23
|
+
|
24
|
+
[Full Changelog](https://github.com/puppetlabs/dropsonde/compare/v0.0.7...0.0.8)
|
25
|
+
|
26
|
+
**Merged pull requests:**
|
27
|
+
|
28
|
+
- \[maint\] correct cache [\#29](https://github.com/puppetlabs/dropsonde/pull/29) ([binford2k](https://github.com/binford2k))
|
29
|
+
- \[maint\] rubocop style fixes [\#28](https://github.com/puppetlabs/dropsonde/pull/28) ([binford2k](https://github.com/binford2k))
|
30
|
+
- Fix example generation [\#27](https://github.com/puppetlabs/dropsonde/pull/27) ([binford2k](https://github.com/binford2k))
|
31
|
+
- unused modules [\#26](https://github.com/puppetlabs/dropsonde/pull/26) ([binford2k](https://github.com/binford2k))
|
32
|
+
- Adding changelog generation to Rakefile [\#23](https://github.com/puppetlabs/dropsonde/pull/23) ([binford2k](https://github.com/binford2k))
|
33
|
+
|
34
|
+
## [v0.0.7](https://github.com/puppetlabs/dropsonde/tree/v0.0.7) (2022-02-10)
|
35
|
+
|
36
|
+
[Full Changelog](https://github.com/puppetlabs/dropsonde/compare/v0.0.6...v0.0.7)
|
6
37
|
|
7
38
|
**Merged pull requests:**
|
8
39
|
|
40
|
+
- Releasing v00.7 [\#22](https://github.com/puppetlabs/dropsonde/pull/22) ([binford2k](https://github.com/binford2k))
|
41
|
+
- Releasing v00.7 [\#21](https://github.com/puppetlabs/dropsonde/pull/21) ([binford2k](https://github.com/binford2k))
|
9
42
|
- update server language [\#20](https://github.com/puppetlabs/dropsonde/pull/20) ([binford2k](https://github.com/binford2k))
|
10
43
|
- Updates the telemetry endpoint to a stable URL [\#19](https://github.com/puppetlabs/dropsonde/pull/19) ([MikaelSmith](https://github.com/MikaelSmith))
|
11
44
|
- docs updates now that it's shipped [\#18](https://github.com/puppetlabs/dropsonde/pull/18) ([binford2k](https://github.com/binford2k))
|
data/bin/dropsonde
CHANGED
@@ -69,14 +69,14 @@ class Dropsonde
|
|
69
69
|
desc 'Submit a telemetry report'
|
70
70
|
command :submit do |c|
|
71
71
|
c.desc 'Telemetry endpoint'
|
72
|
-
c.flag [:endpoint]
|
72
|
+
c.flag [:endpoint]
|
73
73
|
|
74
74
|
c.desc 'Telemetry port'
|
75
|
-
c.flag [:port], :
|
75
|
+
c.flag [:port], :type => Integer
|
76
76
|
|
77
77
|
c.action do |global, options, args|
|
78
78
|
@cache.autoupdate
|
79
|
-
Dropsonde.submit_report(options
|
79
|
+
Dropsonde.submit_report(options)
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
data/lib/dropsonde/cache.rb
CHANGED
@@ -7,11 +7,13 @@ require 'puppet_forge'
|
|
7
7
|
|
8
8
|
# cache class
|
9
9
|
class Dropsonde::Cache
|
10
|
+
@@cache = nil # rubocop:disable Style/ClassVars
|
10
11
|
@autoupdate = false
|
11
12
|
|
12
|
-
def initialize(path, ttl, autoupdate)
|
13
|
+
def initialize(path = '~/.dropsonde', ttl = 7, autoupdate = true) # rubocop:disable Style/OptionalBooleanParameter
|
14
|
+
path = File.expand_path(path)
|
13
15
|
FileUtils.mkdir_p(path)
|
14
|
-
@path = "#{
|
16
|
+
@path = "#{path}/forge.json"
|
15
17
|
@ttl = ttl
|
16
18
|
@autoupdate = autoupdate
|
17
19
|
|
@@ -27,10 +29,14 @@ class Dropsonde::Cache
|
|
27
29
|
PuppetForge.user_agent = 'Dropsonde Telemetry Client/0.0.1'
|
28
30
|
end
|
29
31
|
|
30
|
-
def modules
|
32
|
+
def self.modules
|
31
33
|
@@cache['modules']
|
32
34
|
end
|
33
35
|
|
36
|
+
def modules
|
37
|
+
Dropsonde::Cache.modules
|
38
|
+
end
|
39
|
+
|
34
40
|
def cache
|
35
41
|
@@cache
|
36
42
|
end
|
@@ -71,12 +71,11 @@ class Dropsonde::Metrics::Dependencies
|
|
71
71
|
# make it easier to write data aggregation queries without access to the
|
72
72
|
# actual private data that users have submitted.
|
73
73
|
|
74
|
-
dropsonde_cache = Dropsonde::Cache.new('foo', 7, true)
|
75
74
|
versions = ['>= 1.5.2', '>= 4.3.2', '>= 3.0.0 < 4.0.0', '>= 2.2.1 < 5.0.0', '>= 5.0.0 < 7.0.0', '>= 4.11.0']
|
76
75
|
[
|
77
|
-
dependencies:
|
78
|
-
|
79
|
-
|
76
|
+
dependencies: Dropsonde::Cache.modules
|
77
|
+
.sample(rand(250))
|
78
|
+
.map do |item|
|
80
79
|
{
|
81
80
|
name: item,
|
82
81
|
version_requirement: versions.sample,
|
@@ -5,6 +5,8 @@ class Dropsonde::Metrics::Modules
|
|
5
5
|
def self.initialize_modules
|
6
6
|
# require any libraries needed here -- no need to load puppet; it's already initialized
|
7
7
|
# All plugins are initialized before any metrics are generated.
|
8
|
+
require 'puppet/info_service'
|
9
|
+
require 'puppet/info_service/class_information_service'
|
8
10
|
end
|
9
11
|
|
10
12
|
def self.description
|
@@ -64,6 +66,46 @@ class Dropsonde::Metrics::Modules
|
|
64
66
|
"name": 'classes',
|
65
67
|
"type": 'RECORD',
|
66
68
|
},
|
69
|
+
{
|
70
|
+
"fields": [
|
71
|
+
{
|
72
|
+
"description": 'The module name',
|
73
|
+
"mode": 'NULLABLE',
|
74
|
+
"name": 'name',
|
75
|
+
"type": 'STRING',
|
76
|
+
},
|
77
|
+
{
|
78
|
+
"description": 'The module slug (author-name)',
|
79
|
+
"mode": 'NULLABLE',
|
80
|
+
"name": 'slug',
|
81
|
+
"type": 'STRING',
|
82
|
+
},
|
83
|
+
{
|
84
|
+
"description": 'The module version',
|
85
|
+
"mode": 'NULLABLE',
|
86
|
+
"name": 'version',
|
87
|
+
"type": 'STRING',
|
88
|
+
},
|
89
|
+
],
|
90
|
+
"description": 'List of modules whose classes are not declared in any environments.',
|
91
|
+
"mode": 'REPEATED',
|
92
|
+
"name": 'unused_modules',
|
93
|
+
"type": 'RECORD',
|
94
|
+
},
|
95
|
+
{
|
96
|
+
"fields": [
|
97
|
+
{
|
98
|
+
"description": 'The class name',
|
99
|
+
"mode": 'NULLABLE',
|
100
|
+
"name": 'name',
|
101
|
+
"type": 'STRING',
|
102
|
+
},
|
103
|
+
],
|
104
|
+
"description": 'List of unused classes in all environments.',
|
105
|
+
"mode": 'REPEATED',
|
106
|
+
"name": 'unused_classes',
|
107
|
+
"type": 'RECORD',
|
108
|
+
},
|
67
109
|
]
|
68
110
|
end
|
69
111
|
|
@@ -86,7 +128,7 @@ class Dropsonde::Metrics::Modules
|
|
86
128
|
end
|
87
129
|
}.flatten.compact.uniq
|
88
130
|
|
89
|
-
if puppetdb_session
|
131
|
+
if puppetdb_session&.puppet_db
|
90
132
|
# classes and how many nodes they're enforced on
|
91
133
|
results = puppetdb_session.puppet_db.request('', 'resources[type, title] { type = "Class" }').data
|
92
134
|
|
@@ -102,13 +144,45 @@ class Dropsonde::Metrics::Modules
|
|
102
144
|
count: results.count { |row| row['title'] == title },
|
103
145
|
}
|
104
146
|
}.compact
|
147
|
+
|
148
|
+
# now lets get a list of all classes so we can identify which are unused
|
149
|
+
infoservice = Puppet::InfoService::ClassInformationService.new
|
150
|
+
env_hash = {}
|
151
|
+
environments.each do |env|
|
152
|
+
manifests = Puppet.lookup(:environments).get(env).modules.reduce([]) do |acc, mod|
|
153
|
+
next acc unless mod.forge_module?
|
154
|
+
|
155
|
+
acc.concat mod.all_manifests
|
156
|
+
end
|
157
|
+
env_hash[env] = manifests
|
158
|
+
end
|
159
|
+
|
160
|
+
klasses_per_env = infoservice.classes_per_environment(env_hash)
|
161
|
+
|
162
|
+
installed_classes = klasses_per_env.reduce([]) do |klasses, (_key, env)|
|
163
|
+
names = env.reduce([]) do |acc, (_file, contents)|
|
164
|
+
acc.concat(contents[:classes].map { |c| c[:name] })
|
165
|
+
end
|
166
|
+
|
167
|
+
klasses.concat names
|
168
|
+
end
|
169
|
+
|
170
|
+
unused_modules = installed_classes.map { |c| c.split('::').first }.sort.uniq
|
171
|
+
classes.each { |c| unused_modules.delete(c[:name].split('::').first.downcase) }
|
172
|
+
|
173
|
+
unused_classes = installed_classes.dup
|
174
|
+
classes.each { |c| unused_classes.delete(c[:name].downcase) }
|
105
175
|
else
|
106
176
|
classes = []
|
177
|
+
unused_modules = []
|
178
|
+
unused_classes = []
|
107
179
|
end
|
108
180
|
|
109
181
|
[
|
110
182
|
{ modules: modules },
|
111
183
|
{ classes: classes },
|
184
|
+
{ unused_modules: unused_modules },
|
185
|
+
{ unused_classes: unused_classes },
|
112
186
|
]
|
113
187
|
end
|
114
188
|
|
@@ -119,25 +193,30 @@ class Dropsonde::Metrics::Modules
|
|
119
193
|
|
120
194
|
versions = ['1.3.2', '0.0.1', '0.1.2', '1.0.0', '3.0.2', '7.10', '6.1.0', '2.1.0', '1.4.0']
|
121
195
|
classes = ['', '::Config', '::Service', '::Server', '::Client', '::Packages']
|
122
|
-
dropsonde_cache = Dropsonde::Cache.new('foo', 7, true)
|
123
196
|
[
|
124
|
-
modules:
|
125
|
-
|
126
|
-
|
197
|
+
modules: Dropsonde::Cache.modules
|
198
|
+
.sample(rand(100))
|
199
|
+
.map do |item|
|
127
200
|
{
|
128
201
|
name: item.split('-').last,
|
129
202
|
slug: item,
|
130
203
|
version: versions.sample,
|
131
204
|
}
|
132
205
|
end,
|
133
|
-
classes:
|
134
|
-
|
135
|
-
|
206
|
+
classes: Dropsonde::Cache.modules
|
207
|
+
.sample(rand(500))
|
208
|
+
.map do |item|
|
136
209
|
{
|
137
210
|
name: item.split('-').last.capitalize + classes.sample,
|
138
211
|
count: rand(750),
|
139
212
|
}
|
140
213
|
end,
|
214
|
+
unused_modules: Dropsonde::Cache.modules
|
215
|
+
.sample(rand(500))
|
216
|
+
.map { |item| item.split('-').last },
|
217
|
+
unused_classes: Dropsonde::Cache.modules
|
218
|
+
.sample(rand(500))
|
219
|
+
.map { |item| item.split('-').last.capitalize + classes.sample },
|
141
220
|
]
|
142
221
|
end
|
143
222
|
|
@@ -54,7 +54,7 @@ class Dropsonde::Metrics::Platforms
|
|
54
54
|
|
55
55
|
def self.run(puppetdb_session = nil)
|
56
56
|
# skip this metric if we don't have an active PuppetDB connection
|
57
|
-
return unless puppetdb_session
|
57
|
+
return unless puppetdb_session&.puppet_db
|
58
58
|
|
59
59
|
classes = puppetdb_session.puppet_db.request('', 'resources[certname, title] { type = "Class" }').data
|
60
60
|
facts = puppetdb_session.puppet_db.request('', 'facts[certname, value] { name = "osfamily" }').data
|
@@ -100,10 +100,9 @@ class Dropsonde::Metrics::Platforms
|
|
100
100
|
platforms = %w[RedHat Debian Windows Suse FreeBSD Darwin Archlinux AIX]
|
101
101
|
classes = ['', '::Config', '::Service', '::Server', '::Client', '::Packages']
|
102
102
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
.map { |item|
|
103
|
+
data = Dropsonde::Cache.modules
|
104
|
+
.sample(rand(35))
|
105
|
+
.map { |item|
|
107
106
|
name = item.split('-').last.capitalize + classes.sample
|
108
107
|
|
109
108
|
rand(5).times.map do
|
@@ -54,7 +54,7 @@ class Dropsonde::Metrics::Puppetfiles
|
|
54
54
|
next unless File.file? puppetfile
|
55
55
|
|
56
56
|
tokens = Ripper.sexp(File.read(puppetfile)).flatten
|
57
|
-
indices = tokens.map.with_index { |a, i| a == :command ? i : nil }.compact
|
57
|
+
indices = tokens.map.with_index { |a, i| (a == :command) ? i : nil }.compact
|
58
58
|
|
59
59
|
indices.map { |i| tokens[i + 2] }
|
60
60
|
}.flatten.compact
|
data/lib/dropsonde/metrics.rb
CHANGED
@@ -52,7 +52,7 @@ class Dropsonde::Metrics
|
|
52
52
|
|
53
53
|
def schema
|
54
54
|
schema = skeleton_schema
|
55
|
-
Dropsonde::Metrics.plugins.
|
55
|
+
Dropsonde::Metrics.plugins.each_value do |plugin|
|
56
56
|
schema.concat(sanity_check_schema(plugin))
|
57
57
|
end
|
58
58
|
check_for_duplicates(schema)
|
@@ -62,7 +62,7 @@ class Dropsonde::Metrics
|
|
62
62
|
def preview(puppetdb_session = nil)
|
63
63
|
str = " Puppet Telemetry Report Preview\n"
|
64
64
|
str += " ===============================\n\n"
|
65
|
-
Dropsonde::Metrics.plugins.
|
65
|
+
Dropsonde::Metrics.plugins.each_value do |plugin|
|
66
66
|
schema = plugin.schema
|
67
67
|
|
68
68
|
plugin.setup if plugin.respond_to? :setup
|
@@ -91,7 +91,7 @@ class Dropsonde::Metrics
|
|
91
91
|
|
92
92
|
def report(puppetdb_session = nil)
|
93
93
|
snapshots = {}
|
94
|
-
Dropsonde::Metrics.plugins.
|
94
|
+
Dropsonde::Metrics.plugins.each_value do |plugin|
|
95
95
|
plugin.setup
|
96
96
|
sanity_check_data(plugin, plugin.run(puppetdb_session)).each do |row|
|
97
97
|
snapshots[row.keys.first] = {
|
@@ -115,7 +115,7 @@ class Dropsonde::Metrics
|
|
115
115
|
results[:ip] = IPAddr.new(rand(2**32), Socket::AF_INET)
|
116
116
|
results.delete(:'self-service-analytics')
|
117
117
|
|
118
|
-
Dropsonde::Metrics.plugins.
|
118
|
+
Dropsonde::Metrics.plugins.each_value do |plugin|
|
119
119
|
sanity_check_data(plugin, plugin.example).each do |row|
|
120
120
|
results.merge!(row)
|
121
121
|
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# This uses Puppet's standard Dujour telemetry endpoint.
|
4
|
+
# It currently expects a report formatted precisely to meet Dujour's odd schema.
|
5
|
+
# At some point, we'll define our own report format and this submitter will
|
6
|
+
# transform it to meet the expected schema.
|
7
|
+
#
|
8
|
+
# This is currently the only operational submitter.
|
9
|
+
class Dropsonde::Submitter::Dujour
|
10
|
+
def self.submit_report(options)
|
11
|
+
client = HTTPClient.new
|
12
|
+
|
13
|
+
endpoint = options[:endpoint] || Dropsonde.settings[:endpoint] || 'https://updates.puppet.com'
|
14
|
+
port = options[:port] || Dropsonde.settings[:port] || 443
|
15
|
+
|
16
|
+
# The httpclient gem ships with some expired CA certificates.
|
17
|
+
# This causes us to load the certs shipped with whatever
|
18
|
+
# Ruby is used to execute this gem's commands, which are generally
|
19
|
+
# more up-to-date, especially if using puppet-agent's Ruby.
|
20
|
+
#
|
21
|
+
# Note that this is no-op with Windows system Ruby.
|
22
|
+
client.ssl_config.set_default_paths
|
23
|
+
|
24
|
+
result = client.post("#{endpoint}:#{port}",
|
25
|
+
header: { 'Content-Type' => 'application/json' },
|
26
|
+
body: Dropsonde::Metrics.new.report.to_json)
|
27
|
+
|
28
|
+
if result.status == 200
|
29
|
+
data = JSON.parse(result.body)
|
30
|
+
if data['newer']
|
31
|
+
puts 'A newer version of the telemetry client is available:'
|
32
|
+
puts " -- #{data['link']}"
|
33
|
+
else
|
34
|
+
puts data['message']
|
35
|
+
end
|
36
|
+
else
|
37
|
+
puts 'Failed to submit report'
|
38
|
+
puts JSON.pretty_generate(result.body) if Dropsonde.settings[:verbose]
|
39
|
+
exit 1
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# This currently doesn't actually exist.
|
4
|
+
# It's just a placeholder for someday when it does exist!
|
5
|
+
class Dropsonde::Submitter::OpenTelemetry
|
6
|
+
def self.submit_report(options)
|
7
|
+
puts 'When Vox Pupuli has its own telemetry server, this will post there.'
|
8
|
+
puts options.inspect
|
9
|
+
end
|
10
|
+
end
|
data/lib/dropsonde/version.rb
CHANGED
data/lib/dropsonde.rb
CHANGED
@@ -4,7 +4,12 @@ require 'json'
|
|
4
4
|
require 'httpclient'
|
5
5
|
require 'puppetdb'
|
6
6
|
require 'inifile'
|
7
|
-
|
7
|
+
|
8
|
+
begin
|
9
|
+
require 'puppet'
|
10
|
+
rescue LoadError
|
11
|
+
raise 'Please install either Puppet or OpenVox gem to use this tool.'
|
12
|
+
end
|
8
13
|
|
9
14
|
# This class handles caching module process, generate reports,
|
10
15
|
# fetchs all plugins defined in lib/dropsonde/metrics and also
|
@@ -15,6 +20,9 @@ class Dropsonde
|
|
15
20
|
require 'dropsonde/monkeypatches'
|
16
21
|
require 'dropsonde/version'
|
17
22
|
|
23
|
+
# This class abstracts the endpoint we submit to.
|
24
|
+
class Dropsonde::Submitter; end
|
25
|
+
|
18
26
|
def self.puppet_settings_overrides
|
19
27
|
overrides = []
|
20
28
|
if (confdir = ENV['PUPPET_CONFDIR'])
|
@@ -75,33 +83,13 @@ class Dropsonde
|
|
75
83
|
end
|
76
84
|
end
|
77
85
|
|
78
|
-
def self.submit_report(
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
# This causes us to load the certs shipped with whatever
|
83
|
-
# Ruby is used to execute this gem's commands, which are generally
|
84
|
-
# more up-to-date, especially if using puppet-agent's Ruby.
|
85
|
-
#
|
86
|
-
# Note that this is no-op with Windows system Ruby.
|
87
|
-
client.ssl_config.set_default_paths
|
88
|
-
|
89
|
-
result = client.post("#{endpoint}:#{port}",
|
90
|
-
header: { 'Content-Type' => 'application/json' },
|
91
|
-
body: Dropsonde::Metrics.new.report.to_json)
|
92
|
-
|
93
|
-
if result.status == 200
|
94
|
-
data = JSON.parse(result.body)
|
95
|
-
if data['newer']
|
96
|
-
puts 'A newer version of the telemetry client is available:'
|
97
|
-
puts " -- #{data['link']}"
|
98
|
-
else
|
99
|
-
puts data['message']
|
100
|
-
end
|
86
|
+
def self.submit_report(options)
|
87
|
+
if Puppet.respond_to?(:implementation) && Puppet.implementation == 'openvox'
|
88
|
+
require 'dropsonde/submitter/open_telemetry'
|
89
|
+
Dropsonde::Submitter::OpenTelemetry.submit_report(options)
|
101
90
|
else
|
102
|
-
|
103
|
-
|
104
|
-
exit 1
|
91
|
+
require 'dropsonde/submitter/dujour'
|
92
|
+
Dropsonde::Submitter::Dujour.submit_report(options)
|
105
93
|
end
|
106
94
|
end
|
107
95
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dropsonde
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Ford
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -66,20 +66,6 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: puppet
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :runtime
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: puppet_forge
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,7 +126,7 @@ description: |
|
|
140
126
|
Dropsonde is a simple telemetry probe designed to run as a regular cron job. It
|
141
127
|
will gather metrics defined by self-contained plugins that each defines its own
|
142
128
|
partial schema and then gathers the data to meet that schema.
|
143
|
-
email:
|
129
|
+
email: binford2k@overlookinfratech.com
|
144
130
|
executables:
|
145
131
|
- dropsonde
|
146
132
|
extensions: []
|
@@ -159,12 +145,16 @@ files:
|
|
159
145
|
- lib/dropsonde/metrics/platforms.rb
|
160
146
|
- lib/dropsonde/metrics/puppetfiles.rb
|
161
147
|
- lib/dropsonde/monkeypatches.rb
|
148
|
+
- lib/dropsonde/submitter/dujour.rb
|
149
|
+
- lib/dropsonde/submitter/open_telemetry.rb
|
162
150
|
- lib/dropsonde/version.rb
|
163
|
-
homepage: https://github.com/
|
151
|
+
homepage: https://github.com/OpenVoxProject/dropsonde
|
164
152
|
licenses:
|
165
153
|
- Apache-2.0
|
166
154
|
metadata: {}
|
167
|
-
post_install_message:
|
155
|
+
post_install_message: |
|
156
|
+
For portability reasons, this gem no longer depends on Puppet. You will need to
|
157
|
+
install either Puppet or OpenVox gems manually.
|
168
158
|
rdoc_options: []
|
169
159
|
require_paths:
|
170
160
|
- lib
|
@@ -179,8 +169,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
179
169
|
- !ruby/object:Gem::Version
|
180
170
|
version: '0'
|
181
171
|
requirements: []
|
182
|
-
rubygems_version: 3.
|
172
|
+
rubygems_version: 3.4.19
|
183
173
|
signing_key:
|
184
174
|
specification_version: 4
|
185
|
-
summary: A simple telemetry probe for gathering usage information about
|
175
|
+
summary: A simple telemetry probe for gathering usage information about OpenVox and
|
176
|
+
Puppet infrastructures.
|
186
177
|
test_files: []
|