Monitoring Mechanic
Last updated
Was this helpful?
Last updated
Was this helpful?
Mechanic is frequently used for business-critical operations. The Mechanic team closely monitors the platform (and shares status information at ), but it can be useful to set up task-specific monitoring, specific to the visibility needs of each business.
Mechanic's platform status is available at . The system metrics area contains realtime data indicating how quickly Mechanic is processing runs, as well as information about observed delays in events coming from Shopify. (These can be useful in diagnosing whether an emergent issue is caused by Mechanic, or if it's a problem on Shopify's end.)
Mechanic's status page also supports alert subscriptions, via email, SMS, Slack, and webhooks. If Mechanic is an important part of your operations, we strongly recommend subscribing to status alerts.
To monitor actions, subscribe to the mechanic/actions/perform event, which re-invokes a task with the results of each action run. Use this opportunity to inspect the status of the action, responding accordingly. To learn more, see .
To monitor tasks, use the to ping a service like when critical tasks run, configuring that service to send alerts should the pings ever miss their schedule.
It's generally preferable to use an external service for this sort of thing, rather than using Mechanic to monitor itself. Still, monitoring tasks are viable, by using to check on an expiring flag in the . This way, by setting that flag during sensitive task runs (using the), a sort of can be created: if the scheduled run ever finds that the flag is not present, that task could then send an email (or post to Slack, or whatever's useful).
When run manually, this task sets an auto-expiring flag in the Mechanic cache, set to expire in ten minutes. Separately, this task checks for the presence of that flag every ten minutes. If the flag is missing (indicating that the task was not run manually in the last ten minutes), the task sends an email.