Don't log if no error in mongodb input
This commit is contained in:
parent
7717375bc9
commit
898c20c01e
|
@ -100,7 +100,10 @@ func (m *MongoDB) Gather(acc telegraf.Accumulator) error {
|
|||
wg.Add(1)
|
||||
go func(srv *Server) {
|
||||
defer wg.Done()
|
||||
m.Log.Error(m.gatherServer(srv, acc))
|
||||
err := m.gatherServer(srv, acc)
|
||||
if err != nil {
|
||||
m.Log.Errorf("Error in plugin: %v", err)
|
||||
}
|
||||
}(m.getMongoServer(u))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue