[Pkg-puppet-devel] Bug#923976: Bug#923976: Bug#923976: puppet: Reports submitte
Kienan Stewart
kienan at koumbit.org
Fri Mar 8 17:26:18 GMT 2019
Hi,
I have made a patch which seems to resolve the issue. I'm not at all confident
it's in the right place. The patch applies to the PuppetDB source which is used
to make the puppet-terminus-puppetdb package.
diff --git a/puppet/lib/puppet/reports/puppetdb.rb b/puppet/lib/puppet/reports/puppetdb.rb
index d3f0c07..b78f02c 100644
--- a/puppet/lib/puppet/reports/puppetdb.rb
+++ b/puppet/lib/puppet/reports/puppetdb.rb
@@ -129,7 +129,7 @@ Puppet::Reports.register_report(:puppetdb) do
[:puppetdb, :metrics_list, :build]) do
metrics_list = []
metrics.each do |name, data|
- metric_hashes = data.values.map {|x| {"category" => data.name, "name" => x.first, "value" => x.last}}
+ metric_hashes = data.values.map {|x| {"category" => data.name, "name" => x.first, "value" => x.last.to_f}}
metrics_list.concat(metric_hashes)
end
metrics_list
I'm not aware if there will be consequences to forcing all the metrics values to
floats.
Thanks,
Kienan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-puppet-devel/attachments/20190308/bedd4d47/attachment.sig>
More information about the Pkg-puppet-devel
mailing list