Add health collector (#70)

* Add health collector for voltage & temperature
* Run gofmt
* Add help text to health collector
This commit is contained in:
Ben Reedy
2020-02-10 18:55:10 +00:00
committed by GitHub
parent 8578c271bb
commit 3b33400d24
6 changed files with 116 additions and 6 deletions

View File

@@ -13,9 +13,13 @@ func metricStringCleanup(in string) string {
}
func descriptionForPropertyName(prefix, property string, labelNames []string) *prometheus.Desc {
return descriptionForPropertyNameHelpText(prefix, property, labelNames, property)
}
func descriptionForPropertyNameHelpText(prefix, property string, labelNames []string, helpText string) *prometheus.Desc {
return prometheus.NewDesc(
prometheus.BuildFQName(namespace, prefix, metricStringCleanup(property)),
property,
helpText,
labelNames,
nil,
)