CloudOps

源文件

gcp/monitoring/policies/run-p95-latency.json

离线配置。未部署到任何云账号。

{
  "displayName": "insights-api Cloud Run p95 latency",
  "combiner": "OR",
  "severity": "WARNING",
  "enabled": true,
  "summary": "Request latency p95 above 800 milliseconds for 5 minutes.",
  "documentation": {
    "content": "insights-api p95 latency is above the demo threshold. Compare concurrency and instance count before raising maxScale. This policy is not deployed.",
    "mimeType": "text/markdown"
  },
  "conditions": [
    {
      "displayName": "p95 latency over 800ms",
      "conditionThreshold": {
        "filter": "resource.type=\"cloud_run_revision\" AND resource.labels.service_name=\"insights-api\" AND metric.type=\"run.googleapis.com/request_latencies\"",
        "comparison": "COMPARISON_GT",
        "thresholdValue": 800,
        "duration": "300s",
        "aggregations": [
          {
            "alignmentPeriod": "60s",
            "perSeriesAligner": "ALIGN_PERCENTILE_95",
            "crossSeriesReducer": "REDUCE_MAX"
          }
        ]
      }
    }
  ],
  "notificationChannels": [
    "projects/thistle-analytics-demo/notificationChannels/placeholder-channel"
  ]
}