Skip to content

Commit 56a50aa

Browse files
authored
Fix Datadog Reports (#848)
* test * fix datadog_reports * fix rocky kitchen tests * fix rocky kitchen tests * kitchen
1 parent f268291 commit 56a50aa

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

kitchen.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,11 @@ platforms:
112112
- dnf module -y reset ruby
113113
- dnf module -y enable ruby:3.1
114114
- dnf module -y install ruby:3.1/common
115+
- dnf update -y
115116

116117
- rpm -Uvh https://yum.puppet.com/puppet8-release-el-9.noarch.rpm #installs the puppet-agent repo
117118
- yum install -y puppet-agent-8.10.0 rubygems ruby-devel procps-ng
118-
- dnf group install -y "Development Tools"
119+
- dnf group install -y "Development Tools" --nobest
119120
- ln -s /opt/puppetlabs/bin/puppet /usr/bin/puppet
120121

121122
- mkdir /home/kitchen/puppet -p

lib/puppet/reports/datadog_reports.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def process
127127
Puppet.debug "Sending metrics for #{@msg_host} to Datadog"
128128
@dog.batch_metrics do
129129
metrics.each do |metric, data|
130-
data.each_value do |val|
130+
data.values.each do |val| # rubocop:disable Style/HashEachMethods
131131
name = "puppet.#{val[1].tr(' ', '_')}.#{metric}".downcase
132132
value = val[2]
133133
@dog.emit_point(name.to_s, value, host: @msg_host.to_s)

0 commit comments

Comments
 (0)