From c837bab76a2cf40facc31a2b0ae687720bf3211a Mon Sep 17 00:00:00 2001 From: adinhodovic Date: Wed, 18 Oct 2023 12:36:22 +0200 Subject: [PATCH] fix: Remove selector queries from dashboards --- .../dashboards/celery-tasks-by-task.libsonnet | 15 ++---- .../celery-tasks-overview.libsonnet | 35 ++++-------- .../dashboards_out/celery-tasks-by-task.json | 40 +++++++------- .../dashboards_out/celery-tasks-overview.json | 54 +++++++++---------- 4 files changed, 63 insertions(+), 81 deletions(-) diff --git a/celery-mixin/dashboards/celery-tasks-by-task.libsonnet b/celery-mixin/dashboards/celery-tasks-by-task.libsonnet index 23eab34..6e33cc0 100644 --- a/celery-mixin/dashboards/celery-tasks-by-task.libsonnet +++ b/celery-mixin/dashboards/celery-tasks-by-task.libsonnet @@ -70,14 +70,13 @@ local paginateTable = { increase( celery_task_failed_total{ job="$job", - %(celerySelector)s, name=~"$task", queue_name=~"$queue_name" }[$__range] ) ) by (name, exception) > 0 ) - ||| % $._config, + |||, local taskExceptionsTable = grafana.tablePanel.new( @@ -115,14 +114,13 @@ local paginateTable = { increase( celery_task_failed_total{ job="$job", - %(celerySelector)s, name=~"$task", queue_name=~"$queue_name" }[$__range] ) ) ) by (name) > 0 - ||| % $._config, + |||, local taskSucceededQuery = std.strReplace(taskFailedQuery, 'failed', 'succeeded'), local taskSentQuery = std.strReplace(taskFailedQuery, 'failed', 'sent'), local taskReceivedQuery = std.strReplace(taskFailedQuery, 'failed', 'received'), @@ -232,14 +230,13 @@ local paginateTable = { increase( celery_task_failed_total{ job="$job", - %(celerySelector)s, name=~"$task", queue_name=~"$queue_name" }[$__rate_interval] ) ) ) by (name, exception) - ||| % $._config, + |||, local tasksFailedByExceptionGraphPanel = grafana.graphPanel.new( @@ -267,14 +264,13 @@ local paginateTable = { increase( celery_task_failed_total{ job="$job", - %(celerySelector)s, name=~"$task", queue_name=~"$queue_name" }[$__rate_interval] ) ) ) by (name) - ||| % $._config, + |||, local taskSucceededIntervalQuery = std.strReplace(taskFailedIntervalQuery, 'failed', 'succeeded'), local taskSentIntervalQuery = std.strReplace(taskFailedIntervalQuery, 'failed', 'sent'), local taskReceivedIntervalQuery = std.strReplace(taskFailedIntervalQuery, 'failed', 'received'), @@ -332,14 +328,13 @@ local paginateTable = { irate( celery_task_runtime_bucket{ job="$job", - %(celerySelector)s, name=~"$task", queue_name=~"$queue_name" }[$__rate_interval] ) > 0 ) by (name, job, le) ) - ||| % $._config, + |||, local tasksRuntimeP95Query = std.strReplace(tasksRuntimeP50Query, '0.50', '0.95'), local tasksRuntimeP99Query = std.strReplace(tasksRuntimeP50Query, '0.50', '0.99'), diff --git a/celery-mixin/dashboards/celery-tasks-overview.libsonnet b/celery-mixin/dashboards/celery-tasks-overview.libsonnet index 4d2bce2..583571a 100644 --- a/celery-mixin/dashboards/celery-tasks-overview.libsonnet +++ b/celery-mixin/dashboards/celery-tasks-overview.libsonnet @@ -55,10 +55,9 @@ local paginateTable = { count( celery_worker_up{ job="$job", - %(celerySelector)s } == 1 ) - ||| % $._config, + |||, local celeryWorkersStatPanel = statPanel.new( 'Workers', @@ -75,10 +74,9 @@ local paginateTable = { sum( celery_worker_tasks_active{ job="$job", - %(celerySelector)s } ) - ||| % $._config, + |||, local celeryWorkersActiveStatPanel = statPanel.new( 'Tasks Active', @@ -97,13 +95,12 @@ local paginateTable = { increase( celery_task_failed_total{ job="$job", - %(celerySelector)s, queue_name=~"$queue_name" }[1w] ) ) ) - ||| % $._config, + |||, local taskSucceeded1wQuery = std.strReplace(taskFailed1wQuery, 'failed', 'succeeded'), local tasksReceived1wQuery = std.strReplace(taskFailed1wQuery, 'failed', 'received'), @@ -142,7 +139,6 @@ local paginateTable = { rate( celery_task_runtime_sum{ job="$job", - %(celerySelector)s, queue_name=~"$queue_name" }[1w] ) @@ -152,12 +148,11 @@ local paginateTable = { rate( celery_task_runtime_count{ job="$job", - %(celerySelector)s, queue_name=~"$queue_name" }[1w] ) ) > 0 - ||| % $._config, + |||, local taskRuntime1wStatPanel = statPanel.new( 'Average Runtime for Tasks [1w]', @@ -178,13 +173,12 @@ local paginateTable = { increase( celery_task_failed_total{ job="$job", - %(celerySelector)s, queue_name=~"$queue_name" }[1w] ) > 0 ) by (name) ) - ||| % $._config, + |||, local tasksFailed1wTable = grafana.tablePanel.new( @@ -227,13 +221,12 @@ local paginateTable = { increase( celery_task_failed_total{ job="$job", - %(celerySelector)s, queue_name=~"$queue_name" }[1w] ) ) by (exception) > 0 ) - ||| % $._config, + |||, local taskExceptions1wTable = grafana.tablePanel.new( @@ -266,7 +259,6 @@ local paginateTable = { rate( celery_task_runtime_sum{ job="$job", - %(celerySelector)s, queue_name=~"$queue_name" }[1w] ) @@ -276,12 +268,11 @@ local paginateTable = { rate( celery_task_runtime_count{ job="$job", - %(celerySelector)s, queue_name=~"$queue_name" }[1w] ) ) by (name) > 0 - ||| % $._config, + |||, local tasksRuntime1wTable = grafana.tablePanel.new( 'Top Average Task Runtime [1w]', @@ -326,11 +317,10 @@ local paginateTable = { sum ( celery_queue_length{ job="$job", - %(celerySelector)s, queue_name=~"$queue_name" } ) by (job, queue_name) - ||| % $._config, + |||, local celeryQueueLengthGraphPanel = grafana.graphPanel.new( @@ -358,13 +348,12 @@ local paginateTable = { increase( celery_task_failed_total{ job="$job", - %(celerySelector)s, queue_name=~"$queue_name" }[$__range] ) ) ) by (job) > 0 - ||| % $._config, + |||, local taskSucceededQuery = std.strReplace(taskFailedQuery, 'failed', 'succeeded'), local taskSentQuery = std.strReplace(taskFailedQuery, 'failed', 'sent'), local taskReceivedQuery = std.strReplace(taskFailedQuery, 'failed', 'received'), @@ -474,13 +463,12 @@ local paginateTable = { increase( celery_task_failed_total{ job="$job", - %(celerySelector)s, queue_name=~"$queue_name" }[$__rate_interval] ) ) ) - ||| % $._config, + |||, local taskSucceededIntervalQuery = std.strReplace(taskFailedIntervalQuery, 'failed', 'succeeded'), local taskSentIntervalQuery = std.strReplace(taskFailedIntervalQuery, 'failed', 'sent'), local taskReceivedIntervalQuery = std.strReplace(taskFailedIntervalQuery, 'failed', 'received'), @@ -538,13 +526,12 @@ local paginateTable = { irate( celery_task_runtime_bucket{ job="$job", - %(celerySelector)s, queue_name=~"$queue_name" }[$__rate_interval] ) > 0 ) by (job, le) ) - ||| % $._config, + |||, local tasksRuntimeP95Query = std.strReplace(tasksRuntimeP50Query, '0.50', '0.95'), local tasksRuntimeP99Query = std.strReplace(tasksRuntimeP50Query, '0.50', '0.99'), diff --git a/celery-mixin/dashboards_out/celery-tasks-by-task.json b/celery-mixin/dashboards_out/celery-tasks-by-task.json index 2bbebf5..9ec3952 100644 --- a/celery-mixin/dashboards_out/celery-tasks-by-task.json +++ b/celery-mixin/dashboards_out/celery-tasks-by-task.json @@ -118,7 +118,7 @@ ], "targets": [ { - "expr": "sum (\n round(\n increase(\n celery_task_succeeded_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (name)\n/(sum (\n round(\n increase(\n celery_task_succeeded_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (name)\n+sum (\n round(\n increase(\n celery_task_failed_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (name)\n) > -1\n", + "expr": "sum (\n round(\n increase(\n celery_task_succeeded_total{\n job=\"$job\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (name)\n/(sum (\n round(\n increase(\n celery_task_succeeded_total{\n job=\"$job\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (name)\n+sum (\n round(\n increase(\n celery_task_failed_total{\n job=\"$job\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (name)\n) > -1\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -126,7 +126,7 @@ "refId": "A" }, { - "expr": "sum (\n round(\n increase(\n celery_task_succeeded_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (name) > 0\n", + "expr": "sum (\n round(\n increase(\n celery_task_succeeded_total{\n job=\"$job\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (name) > 0\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -134,7 +134,7 @@ "refId": "B" }, { - "expr": "sum (\n round(\n increase(\n celery_task_failed_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (name) > 0\n", + "expr": "sum (\n round(\n increase(\n celery_task_failed_total{\n job=\"$job\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (name) > 0\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -142,7 +142,7 @@ "refId": "C" }, { - "expr": "sum (\n round(\n increase(\n celery_task_sent_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (name) > 0\n", + "expr": "sum (\n round(\n increase(\n celery_task_sent_total{\n job=\"$job\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (name) > 0\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -150,7 +150,7 @@ "refId": "D" }, { - "expr": "sum (\n round(\n increase(\n celery_task_received_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (name) > 0\n", + "expr": "sum (\n round(\n increase(\n celery_task_received_total{\n job=\"$job\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (name) > 0\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -158,7 +158,7 @@ "refId": "E" }, { - "expr": "sum (\n round(\n increase(\n celery_task_rejected_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (name) > 0\n", + "expr": "sum (\n round(\n increase(\n celery_task_rejected_total{\n job=\"$job\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (name) > 0\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -166,7 +166,7 @@ "refId": "F" }, { - "expr": "sum (\n round(\n increase(\n celery_task_retried_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (name) > 0\n", + "expr": "sum (\n round(\n increase(\n celery_task_retried_total{\n job=\"$job\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (name) > 0\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -174,7 +174,7 @@ "refId": "G" }, { - "expr": "sum (\n round(\n increase(\n celery_task_revoked_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (name) > 0\n", + "expr": "sum (\n round(\n increase(\n celery_task_revoked_total{\n job=\"$job\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (name) > 0\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -222,7 +222,7 @@ ], "targets": [ { - "expr": "round(\n sum (\n increase(\n celery_task_failed_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n ) by (name, exception) > 0\n)\n", + "expr": "round(\n sum (\n increase(\n celery_task_failed_total{\n job=\"$job\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n ) by (name, exception) > 0\n)\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -280,49 +280,49 @@ "steppedLine": false, "targets": [ { - "expr": "sum (\n round(\n increase(\n celery_task_succeeded_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n) by (name)\n", + "expr": "sum (\n round(\n increase(\n celery_task_succeeded_total{\n job=\"$job\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n) by (name)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "Succeeded - {{ name }}", "refId": "A" }, { - "expr": "sum (\n round(\n increase(\n celery_task_failed_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n) by (name)\n", + "expr": "sum (\n round(\n increase(\n celery_task_failed_total{\n job=\"$job\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n) by (name)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "Failed - {{ name }}", "refId": "B" }, { - "expr": "sum (\n round(\n increase(\n celery_task_sent_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n) by (name)\n", + "expr": "sum (\n round(\n increase(\n celery_task_sent_total{\n job=\"$job\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n) by (name)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "Sent - {{ name }}", "refId": "C" }, { - "expr": "sum (\n round(\n increase(\n celery_task_received_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n) by (name)\n", + "expr": "sum (\n round(\n increase(\n celery_task_received_total{\n job=\"$job\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n) by (name)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "Received - {{ name }}", "refId": "D" }, { - "expr": "sum (\n round(\n increase(\n celery_task_retried_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n) by (name)\n", + "expr": "sum (\n round(\n increase(\n celery_task_retried_total{\n job=\"$job\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n) by (name)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "Retried - {{ name }}", "refId": "E" }, { - "expr": "sum (\n round(\n increase(\n celery_task_rejected_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n) by (name)\n", + "expr": "sum (\n round(\n increase(\n celery_task_rejected_total{\n job=\"$job\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n) by (name)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "Rejected - {{ name }}", "refId": "F" }, { - "expr": "sum (\n round(\n increase(\n celery_task_revoked_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n) by (name)\n", + "expr": "sum (\n round(\n increase(\n celery_task_revoked_total{\n job=\"$job\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n) by (name)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "Revoked - {{ name }}", @@ -410,7 +410,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum (\n round(\n increase(\n celery_task_failed_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n) by (name, exception)\n", + "expr": "sum (\n round(\n increase(\n celery_task_failed_total{\n job=\"$job\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n) by (name, exception)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{ name }} - {{ exception }}", @@ -496,21 +496,21 @@ "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.50,\n sum(\n irate(\n celery_task_runtime_bucket{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n ) > 0\n ) by (name, job, le)\n)\n", + "expr": "histogram_quantile(0.50,\n sum(\n irate(\n celery_task_runtime_bucket{\n job=\"$job\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n ) > 0\n ) by (name, job, le)\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "50 - {{ name }}", "refId": "A" }, { - "expr": "histogram_quantile(0.95,\n sum(\n irate(\n celery_task_runtime_bucket{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n ) > 0\n ) by (name, job, le)\n)\n", + "expr": "histogram_quantile(0.95,\n sum(\n irate(\n celery_task_runtime_bucket{\n job=\"$job\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n ) > 0\n ) by (name, job, le)\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "95 - {{ name }}", "refId": "B" }, { - "expr": "histogram_quantile(0.99,\n sum(\n irate(\n celery_task_runtime_bucket{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n ) > 0\n ) by (name, job, le)\n)\n", + "expr": "histogram_quantile(0.99,\n sum(\n irate(\n celery_task_runtime_bucket{\n job=\"$job\",\n name=~\"$task\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n ) > 0\n ) by (name, job, le)\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "99 - {{ name }}", diff --git a/celery-mixin/dashboards_out/celery-tasks-overview.json b/celery-mixin/dashboards_out/celery-tasks-overview.json index 88d1f11..c62a1dc 100644 --- a/celery-mixin/dashboards_out/celery-tasks-overview.json +++ b/celery-mixin/dashboards_out/celery-tasks-overview.json @@ -78,7 +78,7 @@ "pluginVersion": "7", "targets": [ { - "expr": "count(\n celery_worker_up{\n job=\"$job\",\n job=~\"celery|celery-exporter\"\n } == 1\n)\n", + "expr": "count(\n celery_worker_up{\n job=\"$job\",\n } == 1\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "", @@ -136,7 +136,7 @@ "pluginVersion": "7", "targets": [ { - "expr": "sum(\n celery_worker_tasks_active{\n job=\"$job\",\n job=~\"celery|celery-exporter\"\n }\n)\n", + "expr": "sum(\n celery_worker_tasks_active{\n job=\"$job\",\n }\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "", @@ -194,7 +194,7 @@ "pluginVersion": "7", "targets": [ { - "expr": "sum(\n round(\n increase(\n celery_task_received_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[1w]\n )\n )\n)\n", + "expr": "sum(\n round(\n increase(\n celery_task_received_total{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[1w]\n )\n )\n)\n", "format": "time_series", "interval": "3h", "intervalFactor": 2, @@ -258,7 +258,7 @@ "pluginVersion": "7", "targets": [ { - "expr": "sum(\n round(\n increase(\n celery_task_succeeded_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[1w]\n )\n )\n)\n/(sum(\n round(\n increase(\n celery_task_succeeded_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[1w]\n )\n )\n)\n+sum(\n round(\n increase(\n celery_task_failed_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[1w]\n )\n )\n)\n)\n", + "expr": "sum(\n round(\n increase(\n celery_task_succeeded_total{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[1w]\n )\n )\n)\n/(sum(\n round(\n increase(\n celery_task_succeeded_total{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[1w]\n )\n )\n)\n+sum(\n round(\n increase(\n celery_task_failed_total{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[1w]\n )\n )\n)\n)\n", "format": "time_series", "interval": "3h", "intervalFactor": 2, @@ -317,7 +317,7 @@ "pluginVersion": "7", "targets": [ { - "expr": "sum(\n rate(\n celery_task_runtime_sum{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[1w]\n )\n)\n/\nsum(\n rate(\n celery_task_runtime_count{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[1w]\n )\n) > 0\n", + "expr": "sum(\n rate(\n celery_task_runtime_sum{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[1w]\n )\n)\n/\nsum(\n rate(\n celery_task_runtime_count{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[1w]\n )\n) > 0\n", "format": "time_series", "interval": "3h", "intervalFactor": 2, @@ -368,7 +368,7 @@ ], "targets": [ { - "expr": "round(\n sum (\n increase(\n celery_task_failed_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[1w]\n ) > 0\n ) by (name)\n)\n", + "expr": "round(\n sum (\n increase(\n celery_task_failed_total{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[1w]\n ) > 0\n ) by (name)\n)\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -412,7 +412,7 @@ ], "targets": [ { - "expr": "round(\n sum (\n increase(\n celery_task_failed_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[1w]\n )\n ) by (exception) > 0\n)\n", + "expr": "round(\n sum (\n increase(\n celery_task_failed_total{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[1w]\n )\n ) by (exception) > 0\n)\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -470,7 +470,7 @@ ], "targets": [ { - "expr": "sum (\n rate(\n celery_task_runtime_sum{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[1w]\n )\n) by(name)\n/\nsum (\n rate(\n celery_task_runtime_count{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[1w]\n )\n) by (name) > 0\n", + "expr": "sum (\n rate(\n celery_task_runtime_sum{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[1w]\n )\n) by(name)\n/\nsum (\n rate(\n celery_task_runtime_count{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[1w]\n )\n) by (name) > 0\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -547,7 +547,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum (\n celery_queue_length{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }\n) by (job, queue_name)\n", + "expr": "sum (\n celery_queue_length{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }\n) by (job, queue_name)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{ queue_name }}", @@ -696,7 +696,7 @@ ], "targets": [ { - "expr": "sum (\n round(\n increase(\n celery_task_succeeded_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (job)\n/(sum (\n round(\n increase(\n celery_task_succeeded_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (job)\n+sum (\n round(\n increase(\n celery_task_failed_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (job)\n) > -1\n", + "expr": "sum (\n round(\n increase(\n celery_task_succeeded_total{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (job)\n/(sum (\n round(\n increase(\n celery_task_succeeded_total{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (job)\n+sum (\n round(\n increase(\n celery_task_failed_total{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (job)\n) > -1\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -704,7 +704,7 @@ "refId": "A" }, { - "expr": "sum (\n round(\n increase(\n celery_task_succeeded_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (job) > 0\n", + "expr": "sum (\n round(\n increase(\n celery_task_succeeded_total{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (job) > 0\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -712,7 +712,7 @@ "refId": "B" }, { - "expr": "sum (\n round(\n increase(\n celery_task_failed_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (job) > 0\n", + "expr": "sum (\n round(\n increase(\n celery_task_failed_total{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (job) > 0\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -720,7 +720,7 @@ "refId": "C" }, { - "expr": "sum (\n round(\n increase(\n celery_task_sent_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (job) > 0\n", + "expr": "sum (\n round(\n increase(\n celery_task_sent_total{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (job) > 0\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -728,7 +728,7 @@ "refId": "D" }, { - "expr": "sum (\n round(\n increase(\n celery_task_received_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (job) > 0\n", + "expr": "sum (\n round(\n increase(\n celery_task_received_total{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (job) > 0\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -736,7 +736,7 @@ "refId": "E" }, { - "expr": "sum (\n round(\n increase(\n celery_task_rejected_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (job) > 0\n", + "expr": "sum (\n round(\n increase(\n celery_task_rejected_total{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (job) > 0\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -744,7 +744,7 @@ "refId": "F" }, { - "expr": "sum (\n round(\n increase(\n celery_task_retried_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (job) > 0\n", + "expr": "sum (\n round(\n increase(\n celery_task_retried_total{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (job) > 0\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -752,7 +752,7 @@ "refId": "G" }, { - "expr": "sum (\n round(\n increase(\n celery_task_revoked_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (job) > 0\n", + "expr": "sum (\n round(\n increase(\n celery_task_revoked_total{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[$__range]\n )\n )\n) by (job) > 0\n", "format": "table", "instant": true, "intervalFactor": 2, @@ -810,49 +810,49 @@ "steppedLine": false, "targets": [ { - "expr": "sum (\n round(\n increase(\n celery_task_succeeded_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n)\n", + "expr": "sum (\n round(\n increase(\n celery_task_succeeded_total{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "Succeeded", "refId": "A" }, { - "expr": "sum (\n round(\n increase(\n celery_task_failed_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n)\n", + "expr": "sum (\n round(\n increase(\n celery_task_failed_total{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "Failed", "refId": "B" }, { - "expr": "sum (\n round(\n increase(\n celery_task_sent_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n)\n", + "expr": "sum (\n round(\n increase(\n celery_task_sent_total{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "Sent", "refId": "C" }, { - "expr": "sum (\n round(\n increase(\n celery_task_received_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n)\n", + "expr": "sum (\n round(\n increase(\n celery_task_received_total{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "Received", "refId": "D" }, { - "expr": "sum (\n round(\n increase(\n celery_task_retried_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n)\n", + "expr": "sum (\n round(\n increase(\n celery_task_retried_total{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "Retried", "refId": "E" }, { - "expr": "sum (\n round(\n increase(\n celery_task_rejected_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n)\n", + "expr": "sum (\n round(\n increase(\n celery_task_rejected_total{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "Rejected", "refId": "F" }, { - "expr": "sum (\n round(\n increase(\n celery_task_revoked_total{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n)\n", + "expr": "sum (\n round(\n increase(\n celery_task_revoked_total{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n )\n )\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "Revoked", @@ -938,21 +938,21 @@ "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.50,\n sum(\n irate(\n celery_task_runtime_bucket{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n ) > 0\n ) by (job, le)\n)\n", + "expr": "histogram_quantile(0.50,\n sum(\n irate(\n celery_task_runtime_bucket{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n ) > 0\n ) by (job, le)\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "50", "refId": "A" }, { - "expr": "histogram_quantile(0.95,\n sum(\n irate(\n celery_task_runtime_bucket{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n ) > 0\n ) by (job, le)\n)\n", + "expr": "histogram_quantile(0.95,\n sum(\n irate(\n celery_task_runtime_bucket{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n ) > 0\n ) by (job, le)\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "95", "refId": "B" }, { - "expr": "histogram_quantile(0.99,\n sum(\n irate(\n celery_task_runtime_bucket{\n job=\"$job\",\n job=~\"celery|celery-exporter\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n ) > 0\n ) by (job, le)\n)\n", + "expr": "histogram_quantile(0.99,\n sum(\n irate(\n celery_task_runtime_bucket{\n job=\"$job\",\n queue_name=~\"$queue_name\"\n }[$__rate_interval]\n ) > 0\n ) by (job, le)\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "99",