Skip to content

Commit

Permalink
operator: updates mixins to fix structured metadata dashboards
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoBraveCoding committed Jan 12, 2024
1 parent 0694d79 commit 2ea5e5f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@
"group": "A",
"mode": "normal"
}
}
},
"unit": "s"
},
"unit": "s"
}
},
"fill": 1,
"id": 3,
Expand Down Expand Up @@ -493,9 +493,9 @@
"group": "A",
"mode": "normal"
}
}
},
"unit": "s"
},
"unit": "s"
}
},
"fill": 1,
"id": 6,
Expand Down Expand Up @@ -769,9 +769,9 @@
"group": "A",
"mode": "normal"
}
}
},
"unit": "s"
},
"unit": "s"
}
},
"fill": 1,
"id": 9,
Expand Down Expand Up @@ -1045,9 +1045,9 @@
"group": "A",
"mode": "normal"
}
}
},
"unit": "s"
},
"unit": "s"
}
},
"fill": 1,
"id": 15,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"steppedLine": false,
"targets": [
{
"expr": "sum by (status) (\n label_replace(label_replace(rate(loki_request_duration_seconds_count{namespace=\"$namespace\",job=~\".+-distributor-http\",route=\"loki_api_v1_push\", route=~\"api_prom_push|loki_api_v1_push|/httpgrpc.HTTP/Handle\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-z]+)\"))\n",
"expr": "sum by (status) (\n label_replace(label_replace(rate(loki_request_duration_seconds_count{namespace=\"$namespace\",job=~\".+-distributor-http\", route=~\"api_prom_push|loki_api_v1_push|/httpgrpc.HTTP/Handle\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-z]+)\"))\n",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{status}}",
Expand Down Expand Up @@ -142,23 +142,23 @@
"steppedLine": false,
"targets": [
{
"expr": "histogram_quantile(0.99, sum by (le) (namespace_job_route:loki_request_duration_seconds_bucket:sum_rate{namespace=\"$namespace\", job=~\".+-distributor-http\", route=\"loki_api_v1_push\"})) * 1e3",
"expr": "histogram_quantile(0.99, sum by (le) (namespace_job_route:loki_request_duration_seconds_bucket:sum_rate{namespace=\"$namespace\", job=~\".+-distributor-http\", route=\"api_prom_push|loki_api_v1_push|/httpgrpc.HTTP/Handle\"})) * 1e3",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "99th Percentile",
"refId": "A",
"step": 10
},
{
"expr": "histogram_quantile(0.50, sum by (le) (namespace_job_route:loki_request_duration_seconds_bucket:sum_rate{namespace=\"$namespace\", job=~\".+-distributor-http\", route=\"loki_api_v1_push\"})) * 1e3",
"expr": "histogram_quantile(0.50, sum by (le) (namespace_job_route:loki_request_duration_seconds_bucket:sum_rate{namespace=\"$namespace\", job=~\".+-distributor-http\", route=\"api_prom_push|loki_api_v1_push|/httpgrpc.HTTP/Handle\"})) * 1e3",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "50th Percentile",
"refId": "B",
"step": 10
},
{
"expr": "1e3 * sum(namespace_job_route:loki_request_duration_seconds_sum:sum_rate{namespace=\"$namespace\", job=~\".+-distributor-http\", route=\"loki_api_v1_push\"}) / sum(namespace_job_route:loki_request_duration_seconds_count:sum_rate{namespace=\"$namespace\", job=~\".+-distributor-http\", route=\"loki_api_v1_push\"})",
"expr": "1e3 * sum(namespace_job_route:loki_request_duration_seconds_sum:sum_rate{namespace=\"$namespace\", job=~\".+-distributor-http\", route=\"api_prom_push|loki_api_v1_push|/httpgrpc.HTTP/Handle\"}) / sum(namespace_job_route:loki_request_duration_seconds_count:sum_rate{namespace=\"$namespace\", job=~\".+-distributor-http\", route=\"api_prom_push|loki_api_v1_push|/httpgrpc.HTTP/Handle\"})",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "Average",
Expand Down Expand Up @@ -246,7 +246,7 @@
"steppedLine": false,
"targets": [
{
"expr": "sum (rate(loki_distributor_structured_metadata_bytes_received_total{namespace=\"$namespace\",job=~\".+-distributor-http\",route=\"loki_api_v1_push\",}[$__rate_interval])) / sum(rate(loki_distributor_bytes_received_total{namespace=\"$namespace\",job=~\".+-distributor-http\",route=\"loki_api_v1_push\",}[$__rate_interval]))",
"expr": "sum (rate(loki_distributor_structured_metadata_bytes_received_total{namespace=\"$namespace\",job=~\".+-distributor-http\",}[$__rate_interval])) / sum(rate(loki_distributor_bytes_received_total{namespace=\"$namespace\",job=~\".+-distributor-http\",}[$__rate_interval]))",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "bytes",
Expand Down Expand Up @@ -322,7 +322,7 @@
"steppedLine": false,
"targets": [
{
"expr": "sum by (tenant) (rate(loki_distributor_structured_metadata_bytes_received_total{namespace=\"$namespace\",job=~\".+-distributor-http\",route=\"loki_api_v1_push\",}[$__rate_interval])) / ignoring(tenant) group_left sum(rate(loki_distributor_structured_metadata_bytes_received_total{namespace=\"$namespace\",job=~\".+-distributor-http\",route=\"loki_api_v1_push\",}[$__rate_interval]))",
"expr": "sum by (tenant) (rate(loki_distributor_structured_metadata_bytes_received_total{namespace=\"$namespace\",job=~\".+-distributor-http\",}[$__rate_interval])) / ignoring(tenant) group_left sum(rate(loki_distributor_structured_metadata_bytes_received_total{namespace=\"$namespace\",job=~\".+-distributor-http\",}[$__rate_interval]))",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{tenant}}",
Expand Down
1 change: 0 additions & 1 deletion operator/jsonnet/config.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ local utils = (import 'github.com/grafana/jsonnet-libs/mixin-utils/utils.libsonn
distributor:: [
utils.selector.eq('namespace', '$namespace'),
utils.selector.re('job', '.+-distributor-http'),
utils.selector.eq('route', 'loki_api_v1_push'),
],
ingester:: [
utils.selector.eq('namespace', '$namespace'),
Expand Down
2 changes: 1 addition & 1 deletion operator/jsonnet/jsonnetfile.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"subdir": "production/loki-mixin"
}
},
"version": "bd505f8e2d37172ff35a89f4ac42efec9566a263"
"version": "0694d797dec010393567704211638219c1971b46"
}
],
"legacyImports": true
Expand Down
4 changes: 2 additions & 2 deletions operator/jsonnet/jsonnetfile.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"subdir": "production/loki-mixin"
}
},
"version": "bd505f8e2d37172ff35a89f4ac42efec9566a263",
"sum": "yiXXBAcWfMkYSJthU2OZSgHHmveWvmRT6aM1V0MaAjs="
"version": "0694d797dec010393567704211638219c1971b46",
"sum": "Pw/9T/ZRjXLqTivU5xkJnrP5kFdET2FDUjjG1G96GmQ="
},
{
"source": {
Expand Down

0 comments on commit 2ea5e5f

Please sign in to comment.