diff options
Diffstat (limited to 'text_collector_examples')
-rwxr-xr-x | text_collector_examples/storcli.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/text_collector_examples/storcli.py b/text_collector_examples/storcli.py index 65fc00f..9935e88 100755 --- a/text_collector_examples/storcli.py +++ b/text_collector_examples/storcli.py | |||
@@ -198,8 +198,9 @@ def print_all_metrics(metrics): | |||
198 | print('# HELP {}{} MegaRAID {}'.format(metric_prefix, metric, metric.replace('_', ' '))) | 198 | print('# HELP {}{} MegaRAID {}'.format(metric_prefix, metric, metric.replace('_', ' '))) |
199 | print('# TYPE {}{} gauge'.format(metric_prefix, metric)) | 199 | print('# TYPE {}{} gauge'.format(metric_prefix, metric)) |
200 | for measurement in measurements: | 200 | for measurement in measurements: |
201 | print('{}{}{} {}'.format(metric_prefix, metric, '{' + measurement['labels'] + '}', | 201 | if measurement['value'] != 'Unknown': |
202 | measurement['value'])) | 202 | print('{}{}{} {}'.format(metric_prefix, metric, '{' + measurement['labels'] + '}', |
203 | measurement['value'])) | ||
203 | 204 | ||
204 | 205 | ||
205 | def get_storcli_json(storcli_args): | 206 | def get_storcli_json(storcli_args): |