Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

Get AWS Health Events as Entity #90

Open
tuxlife opened this issue Feb 23, 2017 · 0 comments
Open

Get AWS Health Events as Entity #90

tuxlife opened this issue Feb 23, 2017 · 0 comments
Labels
Feature zmon-arch Relevant issues. To be tackled during architecture discussions

Comments

@tuxlife
Copy link

tuxlife commented Feb 23, 2017

If we use the Health API we can show up open and upcoming issues and maintenance.

benefits:

$ aws --region us-east-1 health describe-events --filter "eventStatusCodes=open,upcoming"
{
    "events": [
        {
            "lastUpdatedTime": 1486951398.0,
            "eventTypeCategory": "scheduledChange",
            "arn": "arn:aws:health:eu-west-1::event/a6540dbb-dbad-4c71-9940-9c8bc409f764",
            "eventTypeCode": "AWS_EC2_PERSISTENT_INSTANCE_RETIREMENT_SCHEDULED",
            "startTime": 1488160800.0,
            "region": "eu-west-1",
            "statusCode": "upcoming",
            "service": "EC2",
            "endTime": 1488160800.0
        }
    ]
}
$ aws --region us-east-1 health describe-event-details --event-arns \
       arn:aws:health:eu-west-1::event/a6540dbb-dbad-4c71-9940-9c8bc409f764
{
    "failedSet": [],
    "successfulSet": [
        {
            "event": {
                "eventTypeCode": "AWS_EC2_PERSISTENT_INSTANCE_RETIREMENT_SCHEDULED",
                "startTime": 1488160800.0,
                "service": "EC2",
                "arn": "arn:aws:health:eu-west-1::event/a6540dbb-dbad-4c71-9940-9c8bc409f764",
                "statusCode": "upcoming",
                "eventTypeCategory": "scheduledChange",
                "lastUpdatedTime": 1486951398.0,
                "region": "eu-west-1",
                "endTime": 1488160800.0
            },
            "eventDescription": {
                "latestDescription": "EC2 has detected degradation of the underlying hardware hosting your Amazon EC2 instance associated with this event in the eu-west-1 region. Due to this degradation, your instance could already be unreachable. After 2017-02-27 02:00 UTC your instance, which has an EBS volume as the root device, will be stopped.\n\nYou can see more information on your instances that are scheduled for retirement in the AWS Management Console (https://console.aws.amazon.com/ec2/v2/home?region=eu-west-1#Events)\n\n* How does this affect you?\nYour instance's root device is an EBS volume and the instance will be stopped after the specified retirement date. You can start it again at any time. Note that if you have EC2 instance store volumes attached to the instance, any data on these volumes will be lost when the instance is stopped or terminated as these volumes are physically attached to the host computer\n\n* What do you need to do?\nYou may still be able to access the instance. We recommend that you replace the instance by creating an AMI of your instance and launch a new instance from the AMI. For more information please see Amazon Machine Images (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html) in the EC2 User Guide. In case of difficulties stopping your EBS-backed instance, please see the Instance FAQ (http://aws.amazon.com/instance-help/#ebs-stuck-stopping).\n\n* Why retirement?\nAWS may schedule instances for retirement in cases where there is an unrecoverable issue with the underlying hardware. For more information about scheduled retirement events please see the EC2 user guide (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-retirement.html). To avoid single points of failure within critical applications, please refer to our architecture center for more information on implementing fault-tolerant architectures: http://aws.amazon.com/architecture\n\nIf you have any questions or concerns, you can contact the AWS Support Team on the community forums and via AWS Premium Support at: http://aws.amazon.com/support"
            }
        }
    ]
}
$ aws --region us-east-1 health describe-affected-entities --filter \
     "eventArns=arn:aws:health:eu-west-1::event/a6540dbb-dbad-4c71-9940-9c8bc409f764" 
{
    "entities": [
        {
            "eventArn": "arn:aws:health:eu-west-1::event/a6540dbb-dbad-4c71-9940-9c8bc409f764",
            "lastUpdatedTime": 1486951398.0,
            "entityValue": "i-13e701d3",
            "entityArn": "arn:aws:health:eu-west-1:786011980701:entity/AVo1Nb-EZUIH_-T6pbaj",
            "awsAccountId": "786011980701"
        }
    ]
}
@rajatparida86 rajatparida86 added the zmon-arch Relevant issues. To be tackled during architecture discussions label Jul 25, 2018
@pitr pitr added the Feature label May 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature zmon-arch Relevant issues. To be tackled during architecture discussions
Projects
None yet
Development

No branches or pull requests

3 participants