Skip to content

Commit 84d0d2b

Browse files
committed
Add debug informations when fail to scrap metrics.
1 parent 3561405 commit 84d0d2b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ func ScrapeGenericValues(db *sql.DB, ch chan<- prometheus.Metric, context string
234234
value, err := strconv.ParseFloat(strings.TrimSpace(row[metric]), 64)
235235
// If not a float, skip current metric
236236
if err != nil {
237+
log.Errorln("Unable to convert current value to float (metric=" + metric +
238+
",metricHelp=" + metricHelp + ",value=<" + row[metric] + ">)")
237239
continue
238240
}
239241
// If metric do not use a field content in metric's name

0 commit comments

Comments
 (0)