fix(inputs.modbus): add slave id to failing connection (#12038)
This commit is contained in:
parent
eebe859ce6
commit
716394e55d
|
|
@ -158,7 +158,7 @@ func (m *Modbus) Gather(acc telegraf.Accumulator) error {
|
|||
return fmt.Errorf("disconnecting failed: %w", err)
|
||||
}
|
||||
if err := m.connect(); err != nil {
|
||||
return fmt.Errorf("connecting failed: %w", err)
|
||||
return fmt.Errorf("slave %d: connecting failed: %w", slaveID, err)
|
||||
}
|
||||
}
|
||||
continue
|
||||
|
|
|
|||
Loading…
Reference in New Issue