Skip to content

Commit b755455

Browse files
authored
Merge pull request #76 from jarretlavallee/gh-74
(GH-74) Return null when a mbean is missing
2 parents b058216 + 48bb674 commit b755455

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

files/pe_metrics.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ def retrieve_additional_metrics(host, port, use_ssl, metrics_type, metrics)
133133
metric_data = metrics_output[index]
134134
if metric_data['status'] == 200
135135
metrics_array << { 'name' => metric_name, 'data' => metric_data['value'] }
136+
elsif metric_data['status'] == 404
137+
metrics_array << { 'name' => metric_name, 'data' => nil}
136138
else
137139
metric_mbean = metrics[index]['mbean']
138140
$error_array << "HTTP Error #{metric_data['status']} for #{metric_mbean}"

0 commit comments

Comments
 (0)