Skip to content

Commit abcb2ea

Browse files
committed
fix null value parsing
metrics will not be published anymore if they are ull Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
1 parent dd65e5e commit abcb2ea

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/prometheus/client_golang v1.11.0
1313
github.com/remeh/sizedwaitgroup v1.0.0
1414
github.com/sirupsen/logrus v1.8.1
15-
github.com/webdevops/azure-resourcegraph-exporter v0.0.0-20210828132045-eb367b3180dc
15+
github.com/webdevops/azure-resourcegraph-exporter v0.0.0-20210830185910-36bc29b34b66
1616
)
1717

1818
require (

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
233233
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
234234
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
235235
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
236-
github.com/webdevops/azure-resourcegraph-exporter v0.0.0-20210828132045-eb367b3180dc h1:/CsGASswNlj8jGYuwkxRCTCaiX3QVGXvebvjxN5A6eI=
237-
github.com/webdevops/azure-resourcegraph-exporter v0.0.0-20210828132045-eb367b3180dc/go.mod h1:+O/vB3cTYLvYmBI1R0dO4VHbsrXAn3HopLiJBvJIUx8=
236+
github.com/webdevops/azure-resourcegraph-exporter v0.0.0-20210830185910-36bc29b34b66 h1:ehYAmLktbEIKVoJ7ZbONNUDO0boPmgriB5dNO18bG4w=
237+
github.com/webdevops/azure-resourcegraph-exporter v0.0.0-20210830185910-36bc29b34b66/go.mod h1:+O/vB3cTYLvYmBI1R0dO4VHbsrXAn3HopLiJBvJIUx8=
238238
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
239239
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
240240
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=

loganalytics/prober.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,9 @@ func (p *LogAnalyticsProber) Run() {
194194
}
195195
}
196196

197-
gaugeVec.With(metric.Labels).Set(metric.Value)
197+
if metric.Value != nil {
198+
gaugeVec.With(metric.Labels).Set(*metric.Value)
199+
}
198200
}
199201
}
200202
p.logger.WithField("duration", time.Since(requestTime).String()).Debug("finished request")

0 commit comments

Comments
 (0)