Notify when azure container instance restarts
You can easily setup an alert rule to get SMS/Email or other methods to receive a notification regarding the restart of the container instance. Following are the steps to setup the alerts
1. Go to Alerts as shown below from the container blade
2. Select Alert rule from create button
3. Under the ‘Scope’ section, make sure that the container instance is selected.
4. Click ‘Add Condition’. Select ‘Restart Container Group’ Signal and press ‘Done’
5. Under ‘Actions’ click ‘Add Action Groups’. Click ‘Create Action Group’ in the window pops up
6. Select the Subscription Name, Resource Group name. Under Instance Details, enter an action group name like ‘alert’ and display name
7. Click Next: Notifications. Enter the preferred way of notification needed. Here, I am selecting the notifications to be received as email as indicated below:
8. Review and Create the alert rule. The email entered will get a notification now to indicate that the email has been added to receive alerts.
9. Under Alert rule details, enter a meaningful name and details so that the alert can be easily recognized up ton reception. Press Create Alert rule and you are done with setting up an alert while the container instance restarts.
10. You may test the alert created, by manually restarting the container and verifying the alert received in your email something like shown below: