enix / hpmsa_exporter

Prometheus exporter for HP MSA storage SAN
https://enix.io
MIT License
23 stars 13 forks source link

Fix NaN float error #3

Closed tigre-bleu closed 4 years ago

tigre-bleu commented 4 years ago

Fix the following exception: Traceback (most recent call last): File "./msa_exporter.py", line 855, in scrap_msa(metrics_store, args.hostname, args.login, args.password) File "./msa_exporter.py", line 839, in scrap_msa metrics_store.get_or_create(metric.get('type', 'gauge'), name, metric['description'], labels).set(value) File "/usr/local/lib/python3.6/site-packages/prometheus_client/core.py", line 678, in set self._value.set(float(value)) ValueError: could not convert string to float: 'N/A'

NaPs commented 4 years ago

Merged. Thank you for PR (and sorry for the delay ;-)).