Check the Triggers page in the App Services App. Confirm the trigger is enabled and not disabled/suspended. Then confirm the configuration of the Trigger.
If trigger is ENABLED but not working
1. Check the App Services logs and see if there is a log entry related to the trigger.
If yes, this means the trigger was triggered successfully. If the Trigger is SUSPENDED, enable it. See βWhy is my database trigger suspended and how do I restart the suspended trigger?β. Otherwise, check the linked function to investigate the cause of the unexpected output. For more information, see App Services Functions and Troubleshooting App Services Functions.
If no, make sure the your trigger is correctly configured and confirm the trigger conditions (for example, whether a CRUD operation runs in the specified collection if you have a database trigger).
2. If you have a database trigger for insert events on a particular collection, insert a document manually into the targeted collection and confirm if the trigger was triggered.
If yes, repeat the step to insert a document into the targeted collection with your application to see if the trigger was triggered.
If no, create a new trigger with the same configuration that uses the same function and retry the steps above. If the trigger then fires successfully, keep the original trigger and contact Support for further investigation.
3. Check if your cluster has the appropriate oplog settings to handle the workload. The recommended minimum oplog window value is 24 hours. For size based Oplog, ensure to have enough size to store 24 hours worth of operations. Tou may refer to your cluster metrics tab (M10+) to investigate its oplog health:
See our Fix Oplog Issues documentation for more details.
Support
For further assistance, contact MongoDB Support with the following information:
name of the trigger and the function having issues
the full output of any informational or error messages logged upon encountering the issue
the date, time, and timezone of the first and the most recent occurrence of the issue