fbpx

Notifications

Elastigroup can provide notifications for a variety of events in the Elastigroup. This tutorial covers setting up a subscription to receive a notification.

Under the Actions menu in the Management view of the desired Elastigroup, select Add Notification.

You can register an Elastigroup to publish events to an SNS Subscription. This means you will be notified of events in the group based on your selection.

For first time set up, please press on ‘SUBSCRIBE TO A NOTIFICATION’

 

If you already have a subscription, simply select to add an additional subscription by selecting the “Subscribe” button.

Please note: existing subscriptions cannot be modified – please create a new suscription if you need to make modifications.

To set up a notification, select the SNS Topic ARN from the Drop down selection and specify the event that you would like to be notified about.

Please note: Setting up notificaiton for additional Platforms like “http”, “https”, “email”, “email-json” requires adding notifications via our API: for more information see: API Docs

Event Types:
  • Group Deployment Completed – You will get notified when deployment process has finished successfully (for more information please see: Deploy).
  • Group Deployment Failed – You will get notified when deployment process has failed to finish with errors (for more information please see: Deploy).
  • Group Update Completed – You will get notified when the Elastigroup updated successfully. This can be useful if you would like to monitor Elastigroup updates by other users or provisioning tools.
  • Instance Launch – You will get notified when a new instance is launched in the Elastigroup.
  • Instance Launch Failed – You will get notified when an on-demand instance failed to launch.
  • Instance Terminate – You will get notified when one of your instances has been marked for termination. This notification will be issued prior to `Instance Terminated`.
  • Instance Terminated – You will get notified when one of the instances was terminated.
  • Scale Failed – Max Capacity – You will get notified when the group hits the max capacity defined in the Elastigroup, preventing additional scale up actions from taking place.
  • Unhealthy Instance – You will get notified when one of the instances in your group recognized as unhealthy according to the Health check available by the Load balancer configured in the Elastigroup. This will also apply for HCS users
Format
The Format field is optional in case you wish to change the output of the notification. There is a default setting that will send all the relevant information.

The format of the notification content (JSON Format – Key+Value). with the following supported variables: %instance-id%%event%%resource-id%%resource-name%%subnet-id%%availability-zone%

 

Default content:

{
     "event": "<event>",
     "instanceId": "<instance-id>",
     "resourceId": "<resource-id>",
     "resourceName": "<resource-name>"
}

 

Custom content format example:

{
     "event": "%event%",
     "resourceId": "%resource-id%",
     "resourceName": "%resource-name%",
     "myCustomeKey": "My content is set here",
     "AWS_Account_ID": "1234567890"
}

 

Instance Launch:

{
 "default": "spotinst:notification:instance",
 "event": "AWS_EC2_INSTANCE_LAUNCH",
 "instanceId": "i-0d1c09565f353e90e",
 "resourceId": "sig-675240da",
 "resourceName": "ElasticSearch_Test"
}


Instance Launch Failed:

{
 "default": "spotinst:notification",
 "event": "AWS_EC2_CANT_SPIN_OD",
 "groupId": "sig-dc9db318",
 "groupName": "test-group",
 "reason": "can't spin OD - no available markets"
}

 

Instance Terminate:

{
 "default": "spotinst:notification:instance",
 "event": "AWS_EC2_INSTANCE_TERMINATE",
 "instanceId": "i-0d1c09565f353e90e",
 "resourceId": "sig-675240da",
 "resourceName": "ElasticSearch_Test"
}

 

Roll Finished:

{
 "default": "spotinst:notification:group",
 "event": "GROUP_ROLL_FINISHED",
 "groupId": "sig-9eb96b3a",
 "groupName": "ShiriTest-env-2",
 "message": "RollId:sbgd-44b438fb"
}

 

Roll Failed:

{
 "default": "spotinst:notification:group",
 "event": "GROUP_ROLL_FAILED",
 "groupId": "sig-9eb96b3a",
 "groupName": "ShiriTest-env-2",
 "errorMessage": "RollId:sbgd-bf1a4fff, There were too many unhealthy instances in batch 1"
}