プロジェクト

全般

プロフィール

Temp3

environment: production

your_command > /dev/null 2>&1 &

https://zenn.dev/solvio/articles/5675473b392b7f

cloudwatch alarmでamazon kendraの"IndexDocumentCount"メトリクスが"ProvisionedIndexDocumentCount"メトリクスの90%に達した場合にalarm状態にする設定はできますか?

AWSTemplateFormatVersion: '2010-09-09'
Description: CloudWatch Alarm for Kendra Index Usage Ratio >= 90%

Parameters:
  KendraIndexId:
    Type: String
    Description: ID of the Amazon Kendra index to monitor

Resources:
  KendraUsageAlarm:
    Type: AWS::CloudWatch::Alarm
    Properties:
      AlarmName: !Sub "Kendra-IndexUsage-${KendraIndexId}"
      ComparisonOperator: GreaterThanOrEqualToThreshold
      EvaluationPeriods: 1
      Threshold: 0.9
      TreatMissingData: missing
      Metrics:
        - Id: m1
          MetricStat:
            Metric:
              Namespace: AWS/Kendra
              MetricName: IndexDocumentCount
              Dimensions:
                - Name: IndexId
                  Value: !Ref KendraIndexId
            Period: 300
            Stat: Average
        - Id: m2
          MetricStat:
            Metric:
              Namespace: AWS/Kendra
              MetricName: ProvisionedIndexDocumentCount
              Dimensions:
                - Name: IndexId
                  Value: !Ref KendraIndexId
            Period: 300
            Stat: Average
        - Id: e1
          Expression: m1 / m2
          Label: IndexUsageRatio
          ReturnData: true
      AlarmDescription: !Sub "Triggers if IndexDocumentCount is >= 90% of ProvisionedIndexDocumentCount for Kendra index ${KendraIndexId}"
      AlarmActions: []