...

Text file src/edge-infra.dev/cmd/edge/monitoring/alertman/cli/testdata/rundata/UnitTestPolicy_TestCreatePolicy2.json

Documentation: edge-infra.dev/cmd/edge/monitoring/alertman/cli/testdata/rundata

     1{
     2  "displayName": "Test Create Policy 2",
     3  "documentation": {
     4    "content": "Unit Test alertman validation",
     5    "mimeType": "text/markdown"
     6  },
     7  "userLabels": {
     8    "managed": "true",
     9    "policy-owner": "observability",
    10    "severity": "critical"
    11  },
    12  "conditions": [
    13    {
    14      "displayName": "Prometheus Target - prometheus/request_total/counter",
    15      "conditionThreshold": {
    16        "filter": "resource.type = \"prometheus_target\" AND metric.type = \"prometheus.googleapis.com/request_total/counter\"",
    17        "aggregations": [
    18          {
    19            "alignmentPeriod": "300s",
    20            "perSeriesAligner": "ALIGN_RATE"
    21          }
    22        ],
    23        "comparison": "COMPARISON_GT",
    24        "thresholdValue": 2,
    25        "duration": "0s",
    26        "trigger": {
    27          "count": 1
    28        }
    29      }
    30    }
    31  ],
    32  "combiner": "OR",
    33  "enabled": true,
    34  "notificationChannels": [
    35    "email TH"
    36  ],
    37  "alertStrategy": {
    38    "autoClose": "604800s"
    39  }
    40}

View as plain text