Skip to content

Commit

Permalink
Don't log if no error in mongodb input
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnelson committed Nov 12, 2019
1 parent 7717375 commit 898c20c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/inputs/mongodb/mongodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}

Expand Down

0 comments on commit 898c20c

Please sign in to comment.