compose-x / ecs_composex

Manage, Configure and Deploy your services and AWS services and applications from your docker-compose definitions
https://docs.compose-x.io
Mozilla Public License 2.0
160 stars 16 forks source link

[FR] x-alarms ServiceName - Dimension #634

Closed akanungo22 closed 1 year ago

akanungo22 commented 2 years ago

In x-alarms, when have a way to automatically set the Dimensions for a service (cluster and service name).

JohnPreston commented 2 years ago
services:
  my-app: {}

x-alarms:
  high-cpu:
    Properties:
    Dimensions: service::my-app

or

services:
  my-app:
  x-alarms:
    high-cpu:
      Properties: {} # Dimensions etc. replaced with the service values

would resolve to

services:
  my-app: {}

x-alarms:
  high-cpu:
    Properties:
    Dimensions:
      - Name: ClusterName
        Value: <the cluster name>
      - ServiceName:
        Value: <the ECS Service ID> 
akanungo22 commented 1 year ago

services: my-app: {}

x-alarms: high-cpu: Properties: Dimensions:

Is this service ID or the service name?

JohnPreston commented 1 year ago

Implemented & will be released officially (and documented) with 0.23

x-alarms:
  service-alarm:
    Properties:
      ActionsEnabled: true
      AlarmDescription: A simple CW alarm
      ComparisonOperator: GreaterThanOrEqualToThreshold
      DatapointsToAlarm: 1
      EvaluationPeriods: 5
      MetricName: TotalLagForTopicAndConsumerGroup
      Namespace: lag-metrics-v4
      Period: 60
      Statistic: Sum
      Threshold: 1.0
      TreatMissingData: notBreaching
    MacroParameters:
      ServiceName: bignicefamily
JohnPreston commented 1 year ago

Fixed in #650