diff --git a/charts/meta-monitoring/src/rules/loki-rules.yaml b/charts/meta-monitoring/src/rules/loki-rules.yaml index 0a4f600..b0db8ba 100644 --- a/charts/meta-monitoring/src/rules/loki-rules.yaml +++ b/charts/meta-monitoring/src/rules/loki-rules.yaml @@ -1,52 +1,53 @@ -- name: "loki_rules" - rules: - - expr: "histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket[5m])) - by (le, cluster, job))" - record: "cluster_job:loki_request_duration_seconds:99quantile" - - expr: "histogram_quantile(0.50, sum(rate(loki_request_duration_seconds_bucket[5m])) - by (le, cluster, job))" - record: "cluster_job:loki_request_duration_seconds:50quantile" - - expr: "sum(rate(loki_request_duration_seconds_sum[5m])) by (cluster, job) / sum(rate(loki_request_duration_seconds_count[5m])) - by (cluster, job)" - record: "cluster_job:loki_request_duration_seconds:avg" - - expr: "sum(rate(loki_request_duration_seconds_bucket[5m])) by (le, cluster, job)" - record: "cluster_job:loki_request_duration_seconds_bucket:sum_rate" - - expr: "sum(rate(loki_request_duration_seconds_sum[5m])) by (cluster, job)" - record: "cluster_job:loki_request_duration_seconds_sum:sum_rate" - - expr: "sum(rate(loki_request_duration_seconds_count[5m])) by (cluster, job)" - record: "cluster_job:loki_request_duration_seconds_count:sum_rate" - - expr: "histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket[5m])) - by (le, cluster, job, route))" - record: "cluster_job_route:loki_request_duration_seconds:99quantile" - - expr: "histogram_quantile(0.50, sum(rate(loki_request_duration_seconds_bucket[5m])) - by (le, cluster, job, route))" - record: "cluster_job_route:loki_request_duration_seconds:50quantile" - - expr: "sum(rate(loki_request_duration_seconds_sum[5m])) by (cluster, job, route) - / sum(rate(loki_request_duration_seconds_count[5m])) by (cluster, job, route)" - record: "cluster_job_route:loki_request_duration_seconds:avg" - - expr: "sum(rate(loki_request_duration_seconds_bucket[5m])) by (le, cluster, job, - route)" - record: "cluster_job_route:loki_request_duration_seconds_bucket:sum_rate" - - expr: "sum(rate(loki_request_duration_seconds_sum[5m])) by (cluster, job, route)" - record: "cluster_job_route:loki_request_duration_seconds_sum:sum_rate" - - expr: "sum(rate(loki_request_duration_seconds_count[5m])) by (cluster, job, route)" - record: "cluster_job_route:loki_request_duration_seconds_count:sum_rate" - - expr: "histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket[5m])) - by (le, cluster, namespace, job, route))" - record: "cluster_namespace_job_route:loki_request_duration_seconds:99quantile" - - expr: "histogram_quantile(0.50, sum(rate(loki_request_duration_seconds_bucket[5m])) - by (le, cluster, namespace, job, route))" - record: "cluster_namespace_job_route:loki_request_duration_seconds:50quantile" - - expr: "sum(rate(loki_request_duration_seconds_sum[5m])) by (cluster, namespace, - job, route) / sum(rate(loki_request_duration_seconds_count[5m])) by (cluster, - namespace, job, route)" - record: "cluster_namespace_job_route:loki_request_duration_seconds:avg" - - expr: "sum(rate(loki_request_duration_seconds_bucket[5m])) by (le, cluster, namespace, - job, route)" - record: "cluster_namespace_job_route:loki_request_duration_seconds_bucket:sum_rate" - - expr: "sum(rate(loki_request_duration_seconds_sum[5m])) by (cluster, namespace, - job, route)" - record: "cluster_namespace_job_route:loki_request_duration_seconds_sum:sum_rate" - - expr: "sum(rate(loki_request_duration_seconds_count[5m])) by (cluster, namespace, - job, route)" - record: "cluster_namespace_job_route:loki_request_duration_seconds_count:sum_rate" \ No newline at end of file +groups: + - name: "loki_rules" + rules: + - expr: "histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket[5m])) + by (le, cluster, job))" + record: "cluster_job:loki_request_duration_seconds:99quantile" + - expr: "histogram_quantile(0.50, sum(rate(loki_request_duration_seconds_bucket[5m])) + by (le, cluster, job))" + record: "cluster_job:loki_request_duration_seconds:50quantile" + - expr: "sum(rate(loki_request_duration_seconds_sum[5m])) by (cluster, job) / sum(rate(loki_request_duration_seconds_count[5m])) + by (cluster, job)" + record: "cluster_job:loki_request_duration_seconds:avg" + - expr: "sum(rate(loki_request_duration_seconds_bucket[5m])) by (le, cluster, job)" + record: "cluster_job:loki_request_duration_seconds_bucket:sum_rate" + - expr: "sum(rate(loki_request_duration_seconds_sum[5m])) by (cluster, job)" + record: "cluster_job:loki_request_duration_seconds_sum:sum_rate" + - expr: "sum(rate(loki_request_duration_seconds_count[5m])) by (cluster, job)" + record: "cluster_job:loki_request_duration_seconds_count:sum_rate" + - expr: "histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket[5m])) + by (le, cluster, job, route))" + record: "cluster_job_route:loki_request_duration_seconds:99quantile" + - expr: "histogram_quantile(0.50, sum(rate(loki_request_duration_seconds_bucket[5m])) + by (le, cluster, job, route))" + record: "cluster_job_route:loki_request_duration_seconds:50quantile" + - expr: "sum(rate(loki_request_duration_seconds_sum[5m])) by (cluster, job, route) + / sum(rate(loki_request_duration_seconds_count[5m])) by (cluster, job, route)" + record: "cluster_job_route:loki_request_duration_seconds:avg" + - expr: "sum(rate(loki_request_duration_seconds_bucket[5m])) by (le, cluster, job, + route)" + record: "cluster_job_route:loki_request_duration_seconds_bucket:sum_rate" + - expr: "sum(rate(loki_request_duration_seconds_sum[5m])) by (cluster, job, route)" + record: "cluster_job_route:loki_request_duration_seconds_sum:sum_rate" + - expr: "sum(rate(loki_request_duration_seconds_count[5m])) by (cluster, job, route)" + record: "cluster_job_route:loki_request_duration_seconds_count:sum_rate" + - expr: "histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket[5m])) + by (le, cluster, namespace, job, route))" + record: "cluster_namespace_job_route:loki_request_duration_seconds:99quantile" + - expr: "histogram_quantile(0.50, sum(rate(loki_request_duration_seconds_bucket[5m])) + by (le, cluster, namespace, job, route))" + record: "cluster_namespace_job_route:loki_request_duration_seconds:50quantile" + - expr: "sum(rate(loki_request_duration_seconds_sum[5m])) by (cluster, namespace, + job, route) / sum(rate(loki_request_duration_seconds_count[5m])) by (cluster, + namespace, job, route)" + record: "cluster_namespace_job_route:loki_request_duration_seconds:avg" + - expr: "sum(rate(loki_request_duration_seconds_bucket[5m])) by (le, cluster, namespace, + job, route)" + record: "cluster_namespace_job_route:loki_request_duration_seconds_bucket:sum_rate" + - expr: "sum(rate(loki_request_duration_seconds_sum[5m])) by (cluster, namespace, + job, route)" + record: "cluster_namespace_job_route:loki_request_duration_seconds_sum:sum_rate" + - expr: "sum(rate(loki_request_duration_seconds_count[5m])) by (cluster, namespace, + job, route)" + record: "cluster_namespace_job_route:loki_request_duration_seconds_count:sum_rate" \ No newline at end of file