Predictable ASG and ELB names after environment rebuild

0

My customer is trying to monitor in their ElasticBeanstalk infrastructure.

They are using Grafana with Cloudwatch and in combination with ElasticBeanstalk. Every environment rebuild results in a completely new name for the ASGs and ELBs. The filter they're building to get the right ASG and ELB for their application in Grafana is quite complex and results in them not being able to configure any alerts.

Is there a way to achieve some predictability in the ASG and ELB names for ElasticBeanstalk applications? They were expecting what they see in ECS, where the names are somewhat more stable and easy to predict from Grafana.

1개 답변
0
수락된 답변

IMHO, you can use EBS notification feature in your case. https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.managing.sns.html

You will receive a notification like example below:

    {
  "Records": [
    {
      "EventSource": "aws:sns",
      "EventVersion": "1.0",
      "EventSubscriptionArn": "arn:aws:sns:us-east-1...ElasticBeanstalkNotifications-Environment-foo-app...",
      "Sns": {
        "Type": "Notification",
        "MessageId": "111",
        "TopicArn": "arn:aws:sns:us-east-1...ElasticBeanstalkNotifications-Environment-foo-app",
        "Subject": "AWS Elastic Beanstalk Notification - New application version was deployed to running EC2 instances",
        "Message": "Timestamp: Thu May 07 23:38:22 UTC 2015\nMessage: Lambda Function Test: New application version was deployed to running EC2 instances.\n\nEnvironment: foo-app\nApplication: FooApp\n\nEnvironment URL: http://foo.com\nRequestId: 222\nNotificationProcessId: 333",
        "Timestamp": "2015-05-07T23:39:18.628Z",
        "SignatureVersion": "1",
        "Signature": "hello-sig",
        "SigningCertUrl": "https://sns.us-east-1.amazonaws.com/...",
        "UnsubscribeUrl": "https://sns.us-east-1.amazonaws.com/...",
        "MessageAttributes": {}
      }
    }
  ]
}

You might use the 'Environment' value in 'Message' of this notification to modify grafana's resource in Lambda

답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠