-
-
Save mgwilliams/5f25e32c86c7837d9ba1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- for key, val in saltdata.items(): | |
- # XXX: force datatype, needs typechecks, etc | |
- try: | |
- val = float(val) | |
- metrics.append((metric_base + '.' + key, val, timestamp)) | |
- except TypeError: | |
- log.info('Error in carbon returner, when trying to convert metric:{0}, with val:{1}'.format(key, val)) | |
+ for name, vals in saltdata.items(): | |
+ for key, val in vals.items(): | |
+ # XXX: force datatype, needs typechecks, etc | |
+ try: | |
+ val = float(val) | |
+ metrics.append((metric_base + '.' + _formatHostname(name) + '.' + key, val, timestamp)) | |
+ except TypeError: | |
+ log.info('Error in carbon returner, when trying to convert metric:{0}, with val:{1}'.format(key, val) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment