Create alert on slow queries

Hello, I am aware that an alert can be created for average execution time of certain commands.
I would like to know if there is a way to trigger an alert if there was any command that takes longer than x seconds to execute.

Thank you!

Hi @Andrei_Stoica - Welcome to the community :slight_smile:

There are currently no Alert Conditions which you can configure for each individual query execution time. If you haven’t already tried, you can use the Atlas Profiler to monitor query performance.

In regards to the Atls Profiler, please note that Atlas manages the threshold for slow operations for each mongod host based on average operation execution time on that host. This threshold can be changed using the db.setProfilingLevel mongosh command.

In saying so, you could log the alert trigger feature you’ve described in the MongoDB feedback engine where others can vote for it as well.

Regards,
Jason

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.