Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

2.3 KB
Raw Blame
{
  "alert": "disabled_rule",
  "ruleType": "threshold_rule",
  "alertType": "METRIC_BASED_ALERT",
  "disabled": true,
  "condition": {
    "thresholds": {
      "kind": "basic",
      "spec": [
        {
          "name": "critical",
          "target": 10,
          "matchType": "at_least_once",
          "op": "above",
          "channels": [
            "test channel"
          ]
        }
      ]
    },
    "compositeQuery": {
      "queryType": "clickhouse_sql",
      "panelType": "graph",
      "queries": [
        {
          "type": "clickhouse_sql",
          "spec": {
            "name": "A",
            "query": "WITH __temporal_aggregation_cte AS (\n SELECT \n fingerprint, \n toStartOfInterval(toDateTime(intDiv(unix_milli, 1000)), toIntervalSecond(60)) AS ts, \n avg(value) AS per_series_value \n FROM signoz_metrics.distributed_samples_v4 AS points \n INNER JOIN (\n SELECT fingerprint \n FROM signoz_metrics.time_series_v4 \n WHERE metric_name IN ('request_total_disabled_rule') \n AND LOWER(temporality) LIKE LOWER('cumulative') \n GROUP BY fingerprint\n ) AS filtered_time_series ON points.fingerprint = filtered_time_series.fingerprint \n WHERE metric_name IN ('request_total_disabled_rule') \n AND unix_milli >= $start_timestamp_ms \n AND unix_milli < $end_timestamp_ms \n GROUP BY fingerprint, ts \n ORDER BY fingerprint, ts\n), \n__spatial_aggregation_cte AS (\n SELECT \n ts, \n sum(per_series_value) AS value \n FROM __temporal_aggregation_cte \n WHERE isNaN(per_series_value) = 0 \n GROUP BY ts\n) \nSELECT * FROM __spatial_aggregation_cte \nORDER BY ts"
          }
        }
      ]
    },
    "selectedQueryName": "A"
  },
  "evaluation": {
    "kind": "rolling",
    "spec": {
      "evalWindow": "5m0s",
      "frequency": "15s"
    }
  },
  "labels": {},
  "annotations": {
    "description": "This alert is fired when the defined metric (current value: {{$value}}) crosses the threshold ({{$threshold}})",
    "summary": "This alert is fired when the defined metric (current value: {{$value}}) crosses the threshold ({{$threshold}})"
  },
  "notificationSettings": {
    "groupBy": [],
    "usePolicy": false,
    "renotify": {
      "enabled": false,
      "interval": "30m",
      "alertStates": []
    }
  },
  "version": "v5",
  "schemaVersion": "v2alpha1"
}