Skip to content

Commit

Permalink
Improve error handling for Azure system stats
Browse files Browse the repository at this point in the history
  • Loading branch information
seanlinsley committed Dec 2, 2024
1 parent c477eaf commit e27458f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion input/system/azure/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func GetSystemState(ctx context.Context, server *state.Server, logger *util.Logg
for _, metric := range metricsRes.Value {
// Should be only one data as 1 min time span with 1 min interval is selected, so getting first metric is good
metricValue := getFirstMetricValue(metric)
if metricValue.Average == nil {
if metricValue == nil || metricValue.Average == nil {
continue
}
switch *metric.Name.Value {
Expand Down

0 comments on commit e27458f

Please sign in to comment.