Needs to send an email Notification whenever instance is restarted.

Subbaiah vempati 0 Reputation points
2024-05-02T13:16:05.8566667+00:00

I currently have a container instance in my Azure subscription. This container instance is set to restart on failure. I want to get notified when it gets restarted so I can notify those entities that they have to change their firewall rules.

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
654 questions
{count} votes

1 answer

Sort by: Most helpful
  1. v-vvellanki-MSFT 4,520 Reputation points Microsoft Vendor
    2024-05-02T13:57:07.13+00:00

    Hi @Subbaiah vempati ,

    Thanks for contacting Microsoft Q&A platform.

    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.
    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.

    Hope this helps you.

    0 comments No comments