How do I trigger a script when a process fails

COOLNETAU
COOLNETAU Member Posts: 43
edited July 18 in Automations

So - Syncro (my previous RMM) allowed me to automate restarting a process by alerting when an "app_crash_trigger" with faulting application path of "c:\path_to_binary" and then allowing me to restart said binary and raise a ticket to check out why

can this be done in Atera?

or do I need to run our own scheduled task?

not happy if so.

this way if client leaves? my task stays in

if I uninstall syncro? the fix leaves too

Comments

  • dragos.t
    dragos.t Support Moderator Posts: 48 admin

    Hello @COOLNETAU,

    When it comes to monitoring processes for Windows/Mac devices, you can create a threshold item with the Category of Process Monitoring. This threshold item will monitor if the process is running or not. If the process is not running, an alert is generated. You can then attach an Auto-Healing script which can be set up to start the process again on the device.
    https://support.atera.com/hc/en-us/articles/115000294187-Threshold-Profile-Monitoring-features#ProcessMonitoring

    https://support.atera.com/hc/en-us/articles/115001869607-Auto-Healing-Scripts

    The only other solution would be to use the script-based monitoring option, in case you want to monitor more complex things. With script-based monitoring, you create a script that generates an output and based on conditions set within the threshold item an alert is generated. You can then assign an Auto-healing script to run when the alert is generated.

    https://support.atera.com/hc/en-us/articles/7305491749276-Script-based-threshold-monitoring

    Regarding raising a ticket, there is no built-in option.

  • COOLNETAU
    COOLNETAU Member Posts: 43

    Awesome. thanks - I thought it would be something like that but could not find it - great work @dragos.t very helpful

  • dragos.t
    dragos.t Support Moderator Posts: 48 admin

    You re welcome @COOLNETAU

    Also, you have the option to create a ticket for such cases. The only issue is that the tickets are created automatically based on the severity of the alert. Within Admin>Alerts settings you have these 2 options to automatically create a ticket based on severity and customers/site, but you cannot create a ticket for a specific alert, hope it helps.
    Also, keep in mind that when the alert is generated for process monitoring, if the script solves the issue, the alert is set automatically to Resolved.

    You could also monitor the alerts on the Alerts page using filters and create a ticket manually. You can also create views, so you don't have to filter alerts everytime you wish to monitor these type of alerts.