Skip to content

Commit ea1752a

Browse files
authored
fix(snmp_zabbix): health check for some special devices (flashcatcloud#1373)
1 parent 22e315f commit ea1752a

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

inputs/snmp_zabbix/snmp_client.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -314,17 +314,12 @@ func (m *SNMPClientManager) performHealthCheckNoLock(wrapper *ClientWrapper) err
314314
errChan := make(chan error, 1)
315315
go func() {
316316
// 执行简单的SNMP Get请求 (sysUpTime)
317-
result, err := wrapper.client.Get([]string{"1.3.6.1.2.1.1.3.0"})
317+
_, err := wrapper.client.Get([]string{"1.3.6.1.2.1.1.3.0"})
318318
if err != nil {
319319
errChan <- fmt.Errorf("health check SNMP get failed: %w", err)
320320
return
321321
}
322322

323-
if len(result.Variables) == 0 {
324-
errChan <- fmt.Errorf("health check returned no data")
325-
return
326-
}
327-
328323
errChan <- nil
329324
}()
330325

@@ -695,4 +690,4 @@ type ClientHealthDetail struct {
695690
RetryCount int
696691
ErrorCount uint64
697692
SuccessCount uint64
698-
}
693+
}

0 commit comments

Comments
 (0)