`Host has index suggestions` alerts on oplog queries (Secondary node)

What should I do if I’m getting Host has index suggestions alerts for monitoring aggregation I am running against the oplog?
As I know, it will never be going to use indexes because this is the nature of this collection.
How can I avoid these atlas alerts being fired?

Thanks.

Hi @Shay_I and welcome to the community!!

The log alerts Host has index suggestions can be avoided if the Performance Advisor is disabled for the specific cluster. Please follow the documentation for the same.

May I ask why you are querying the oplog to begin with? The oplog is for MongoDB internal use, and may change without notice (since it’s not for general usage). For these type of purposes, it’s generally best to use Change Stream which is a lot more configurable than querying the oplog.
For example, change streams can monitor a single collection, a server, or a whole sharded cluster. You can also manipulate the output of the change stream using an aggregation pipeline. This is not possible to do using the oplog.

However if your use case does not allow the use of change streams, do you mind sharing it?

The Performance Advisor monitors the slow query and help in improving the performance.

Also, the Index suggestion in performance advisor help in performance improvement which the suggested index would bring. Hence, disabling the alerts would also result in disabling of other related alerts.

Please let us know if you have any further questions.

Thanks
Aasawari

1 Like