Use Mongodb to persist metrics.