bin/metrics-jenkins-jqs.rb in sensu-plugins-jenkins-1.7.1 vs bin/metrics-jenkins-jqs.rb in sensu-plugins-jenkins-2.0.0
- old
+ new
@@ -73,10 +73,10 @@
def run
begin
https ||= config[:https] ? 'https' : 'http'
r = RestClient::Resource.new("#{https}://#{config[:server]}:#{config[:port]}#{config[:uri]}", timeout: 5).get
- all_metrics = JSON.parse(r)
+ all_metrics = ::JSON.parse(r)
metric_groups = all_metrics.keys - SKIP_ROOT_KEYS
metric_groups.each do |metric_groups_key|
all_metrics[metric_groups_key].each do |metric_key, metric_value|
metric_value.each do |metric_hash_key, metric_hash_value|
output([config[:scheme], metric_groups_key, metric_key, metric_hash_key].join('.'), metric_hash_value) \