diff --git a/examples/dashboards/bucket-replicate.json b/examples/dashboards/bucket-replicate.json index 67dad483cb..5a01656188 100644 --- a/examples/dashboards/bucket-replicate.json +++ b/examples/dashboards/bucket-replicate.json @@ -123,7 +123,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job, result) (rate(thanos_replicate_replication_runs_total{result=\"error\", job=~\"$job\"}[$interval]))", + "expr": "sum by (job, result) (rate(thanos_replicate_replication_runs_total{result=\"error\", job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{result}}", @@ -329,7 +329,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job) (rate(blocks_meta_synced{state=\"loaded\", job=~\"$job\"}[$interval]))", + "expr": "sum by (job) (rate(blocks_meta_synced{state=\"loaded\", job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "meta loads", @@ -337,7 +337,7 @@ "step": 10 }, { - "expr": "sum by (job) (rate(blocks_meta_synced{state=\"failed\", job=~\"$job\"}[$interval]))", + "expr": "sum by (job) (rate(blocks_meta_synced{state=\"failed\", job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "partial meta reads", @@ -345,7 +345,7 @@ "step": 10 }, { - "expr": "sum by (job) (rate(thanos_replicate_blocks_already_replicated_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job) (rate(thanos_replicate_blocks_already_replicated_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "already replicated blocks", @@ -353,7 +353,7 @@ "step": 10 }, { - "expr": "sum by (job) (rate(thanos_replicate_blocks_replicated_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job) (rate(thanos_replicate_blocks_replicated_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "replicated blocks", @@ -361,7 +361,7 @@ "step": 10 }, { - "expr": "sum by (job) (rate(thanos_replicate_objects_replicated_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job) (rate(thanos_replicate_objects_replicated_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "replicated objects", diff --git a/examples/dashboards/compact.json b/examples/dashboards/compact.json index 889fcf47af..8fecc5a2c2 100644 --- a/examples/dashboards/compact.json +++ b/examples/dashboards/compact.json @@ -46,7 +46,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job, group) (rate(thanos_compact_group_compactions_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job, group) (rate(thanos_compact_group_compactions_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "compaction {{job}} {{group}}", @@ -213,7 +213,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job, group) (rate(thanos_compact_downsample_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job, group) (rate(thanos_compact_downsample_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "downsample {{job}} {{group}}", @@ -380,7 +380,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job) (rate(thanos_compact_garbage_collection_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job) (rate(thanos_compact_garbage_collection_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "garbage collection {{job}}", @@ -665,7 +665,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job) (rate(thanos_compact_blocks_cleaned_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job) (rate(thanos_compact_blocks_cleaned_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "Blocks cleanup {{job}}", @@ -742,7 +742,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job) (rate(thanos_compact_block_cleanup_failures_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job) (rate(thanos_compact_block_cleanup_failures_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "Blocks cleanup failures {{job}}", @@ -819,7 +819,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job) (rate(thanos_compact_blocks_marked_for_deletion_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job) (rate(thanos_compact_blocks_marked_for_deletion_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "Blocks marked {{job}}", @@ -908,7 +908,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job) (rate(thanos_blocks_meta_syncs_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job) (rate(thanos_blocks_meta_syncs_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "sync {{job}}", @@ -1193,7 +1193,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job, operation) (rate(thanos_objstore_bucket_operations_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job, operation) (rate(thanos_objstore_bucket_operations_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{job}} {{operation}}", diff --git a/examples/dashboards/overview.json b/examples/dashboards/overview.json index a539947600..2d274bac3c 100644 --- a/examples/dashboards/overview.json +++ b/examples/dashboards/overview.json @@ -1683,7 +1683,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job, alertmanager) (rate(thanos_alert_sender_alerts_sent_total{}[$interval]))", + "expr": "sum by (job, alertmanager) (rate(thanos_alert_sender_alerts_sent_total{}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{alertmanager}}", @@ -1968,7 +1968,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job) (rate(thanos_compact_group_compactions_total{}[$interval]))", + "expr": "sum by (job) (rate(thanos_compact_group_compactions_total{}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "compaction {{job}}", diff --git a/examples/dashboards/query-frontend.json b/examples/dashboards/query-frontend.json index 48421563bb..ee46320359 100644 --- a/examples/dashboards/query-frontend.json +++ b/examples/dashboards/query-frontend.json @@ -448,7 +448,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job, tripperware) (rate(cortex_cache_request_duration_seconds_count{job=~\"$job\"}[$interval]))", + "expr": "sum by (job, tripperware) (rate(cortex_cache_request_duration_seconds_count{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{job}} {{tripperware}}", @@ -525,7 +525,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job, tripperware) (rate(querier_cache_gets_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job, tripperware) (rate(querier_cache_gets_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "Cache gets - {{job}} {{tripperware}}", @@ -533,7 +533,7 @@ "step": 10 }, { - "expr": "sum by (job, tripperware) (rate(querier_cache_misses_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job, tripperware) (rate(querier_cache_misses_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "Cache misses - {{job}} {{tripperware}}", @@ -610,7 +610,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job, tripperware) (rate(cortex_cache_fetched_keys_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job, tripperware) (rate(cortex_cache_fetched_keys_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{job}} {{tripperware}}", @@ -687,7 +687,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job, tripperware) (rate(cortex_cache_hits_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job, tripperware) (rate(cortex_cache_hits_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{job}} {{tripperware}}", diff --git a/examples/dashboards/receive.json b/examples/dashboards/receive.json index 9d5244e201..be45ee84fb 100644 --- a/examples/dashboards/receive.json +++ b/examples/dashboards/receive.json @@ -350,7 +350,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (tenant, code) (rate(http_requests_total{job=~\"$job\", tenant=~\"$tenant\", handler=\"receive\"}[$interval]))", + "expr": "sum by (tenant, code) (rate(http_requests_total{job=~\"$job\", tenant=~\"$tenant\", handler=\"receive\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{code}} - {{tenant}}", @@ -426,7 +426,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (tenant, code) (rate(http_requests_total{job=~\"$job\", tenant=~\"$tenant\", handler=\"receive\", code!~\"2..\"}[$interval]))", + "expr": "sum by (tenant, code) (rate(http_requests_total{job=~\"$job\", tenant=~\"$tenant\", handler=\"receive\", code!~\"2..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{code}} - {{tenant}}", @@ -502,7 +502,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job, tenant) (rate(http_request_duration_seconds_sum{job=~\"$job\", tenant=~\"$tenant\", handler=\"receive\"}[$interval])) / sum by (job, tenant) (http_request_duration_seconds_count{job=~\"$job\", tenant=~\"$tenant\", handler=\"receive\"})", + "expr": "sum by (job, tenant) (rate(http_request_duration_seconds_sum{job=~\"$job\", tenant=~\"$tenant\", handler=\"receive\"}[$__rate_interval])) / sum by (job, tenant) (http_request_duration_seconds_count{job=~\"$job\", tenant=~\"$tenant\", handler=\"receive\"})", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{tenant}}", @@ -590,7 +590,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job, tenant) (rate(http_request_size_bytes_sum{job=~\"$job\", tenant=~\"$tenant\", handler=\"receive\", code=~\"2..\"}[$interval])) / sum by (job, tenant) (rate(http_request_size_bytes_count{job=~\"$job\", tenant=~\"$tenant\", handler=\"receive\", code=~\"2..\"}[$interval]))", + "expr": "sum by (job, tenant) (rate(http_request_size_bytes_sum{job=~\"$job\", tenant=~\"$tenant\", handler=\"receive\", code=~\"2..\"}[$__rate_interval])) / sum by (job, tenant) (rate(http_request_size_bytes_count{job=~\"$job\", tenant=~\"$tenant\", handler=\"receive\", code=~\"2..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{tenant}}", @@ -666,7 +666,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job, tenant) (rate(http_request_size_bytes_sum{job=~\"$job\", tenant=~\"$tenant\", handler=\"receive\", code!~\"2..\"}[$interval])) / sum by (job, tenant) (rate(http_request_size_bytes_count{job=~\"$job\", tenant=~\"$tenant\", handler=\"receive\", code!~\"2..\"}[$interval]))", + "expr": "sum by (job, tenant) (rate(http_request_size_bytes_sum{job=~\"$job\", tenant=~\"$tenant\", handler=\"receive\", code!~\"2..\"}[$__rate_interval])) / sum by (job, tenant) (rate(http_request_size_bytes_count{job=~\"$job\", tenant=~\"$tenant\", handler=\"receive\", code!~\"2..\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{tenant}}", @@ -830,7 +830,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(rate(thanos_receive_write_timeseries_bucket{job=~\"$job\", tenant=~\"$tenant\", code=~\"2..\"}[$interval])) by (job, tenant) ", + "expr": "sum(rate(thanos_receive_write_timeseries_bucket{job=~\"$job\", tenant=~\"$tenant\", code=~\"2..\"}[$__rate_interval])) by (job, tenant) ", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{tenant}}", @@ -906,7 +906,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(rate(thanos_receive_write_timeseries_bucket{job=~\"$job\", tenant=~\"$tenant\", code!~\"2..\"}[$interval])) by (tenant, code) ", + "expr": "sum(rate(thanos_receive_write_timeseries_bucket{job=~\"$job\", tenant=~\"$tenant\", code!~\"2..\"}[$__rate_interval])) by (tenant, code) ", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{code}} - {{tenant}}", @@ -982,7 +982,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(rate(thanos_receive_write_samples_sum{job=~\"$job\", tenant=~\"$tenant\", code=~\"2..\"}[$interval])) by (job, tenant) ", + "expr": "sum(rate(thanos_receive_write_samples_sum{job=~\"$job\", tenant=~\"$tenant\", code=~\"2..\"}[$__rate_interval])) by (job, tenant) ", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{tenant}}", @@ -1058,7 +1058,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(rate(thanos_receive_write_samples_sum{job=~\"$job\", tenant=~\"$tenant\", code!~\"2..\"}[$interval])) by (tenant, code) ", + "expr": "sum(rate(thanos_receive_write_samples_sum{job=~\"$job\", tenant=~\"$tenant\", code!~\"2..\"}[$__rate_interval])) by (tenant, code) ", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{code}} - {{tenant}}", @@ -1147,7 +1147,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job) (rate(thanos_receive_replications_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job) (rate(thanos_receive_replications_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "all {{job}}", @@ -1314,7 +1314,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job) (rate(thanos_receive_forward_requests_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job) (rate(thanos_receive_forward_requests_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "all {{job}}", diff --git a/examples/dashboards/rule.json b/examples/dashboards/rule.json index e25e4c7182..f7d7843859 100644 --- a/examples/dashboards/rule.json +++ b/examples/dashboards/rule.json @@ -45,7 +45,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job, strategy) (rate(prometheus_rule_evaluations_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job, strategy) (rate(prometheus_rule_evaluations_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{ strategy }}", @@ -121,7 +121,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job, strategy) (increase(prometheus_rule_group_iterations_missed_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job, strategy) (increase(prometheus_rule_group_iterations_missed_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{ strategy }}", @@ -286,7 +286,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job, alertmanager) (rate(thanos_alert_sender_alerts_dropped_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job, alertmanager) (rate(thanos_alert_sender_alerts_dropped_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{alertmanager}}", @@ -363,7 +363,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job, alertmanager) (rate(thanos_alert_sender_alerts_sent_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job, alertmanager) (rate(thanos_alert_sender_alerts_sent_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{alertmanager}}", @@ -648,7 +648,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job) (rate(thanos_alert_queue_alerts_dropped_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job) (rate(thanos_alert_queue_alerts_dropped_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{job}}", diff --git a/examples/dashboards/sidecar.json b/examples/dashboards/sidecar.json index 116d800504..26f3f5db05 100644 --- a/examples/dashboards/sidecar.json +++ b/examples/dashboards/sidecar.json @@ -883,7 +883,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job, operation) (rate(thanos_objstore_bucket_operations_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job, operation) (rate(thanos_objstore_bucket_operations_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{job}} {{operation}}", diff --git a/examples/dashboards/store.json b/examples/dashboards/store.json index bb239d412f..c932bb958e 100644 --- a/examples/dashboards/store.json +++ b/examples/dashboards/store.json @@ -760,7 +760,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job, operation) (rate(thanos_objstore_bucket_operations_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job, operation) (rate(thanos_objstore_bucket_operations_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{job}} {{operation}}", @@ -837,7 +837,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job, operation) (rate(thanos_objstore_bucket_operation_failures_total{job=~\"$job\"}[$interval])) / sum by (job, operation) (rate(thanos_objstore_bucket_operations_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job, operation) (rate(thanos_objstore_bucket_operation_failures_total{job=~\"$job\"}[$__rate_interval])) / sum by (job, operation) (rate(thanos_objstore_bucket_operations_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{job}} {{operation}}", @@ -914,7 +914,7 @@ "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum by (job, operation, le) (rate(thanos_objstore_bucket_operation_duration_seconds_bucket{job=~\"$job\"}[$interval]))) * 1", + "expr": "histogram_quantile(0.99, sum by (job, operation, le) (rate(thanos_objstore_bucket_operation_duration_seconds_bucket{job=~\"$job\"}[$__rate_interval]))) * 1", "format": "time_series", "intervalFactor": 2, "legendFormat": "P99 {{job}}", @@ -922,7 +922,7 @@ "step": 10 }, { - "expr": "sum by (job, operation) (rate(thanos_objstore_bucket_operation_duration_seconds_sum{job=~\"$job\"}[$interval])) * 1 / sum by (job, operation) (rate(thanos_objstore_bucket_operation_duration_seconds_count{job=~\"$job\"}[$interval]))", + "expr": "sum by (job, operation) (rate(thanos_objstore_bucket_operation_duration_seconds_sum{job=~\"$job\"}[$__rate_interval])) * 1 / sum by (job, operation) (rate(thanos_objstore_bucket_operation_duration_seconds_count{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "mean {{job}}", @@ -930,7 +930,7 @@ "step": 10 }, { - "expr": "histogram_quantile(0.50, sum by (job, operation, le) (rate(thanos_objstore_bucket_operation_duration_seconds_bucket{job=~\"$job\"}[$interval]))) * 1", + "expr": "histogram_quantile(0.50, sum by (job, operation, le) (rate(thanos_objstore_bucket_operation_duration_seconds_bucket{job=~\"$job\"}[$__rate_interval]))) * 1", "format": "time_series", "intervalFactor": 2, "legendFormat": "P50 {{job}}", @@ -1019,7 +1019,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job) (rate(thanos_bucket_store_block_loads_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job) (rate(thanos_bucket_store_block_loads_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "block loads", @@ -1174,7 +1174,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job, operation) (rate(thanos_bucket_store_block_drops_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job, operation) (rate(thanos_bucket_store_block_drops_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "block drops {{job}}", @@ -1341,7 +1341,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job, item_type) (rate(thanos_store_index_cache_requests_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job, item_type) (rate(thanos_store_index_cache_requests_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{job}} {{item_type}}", @@ -1418,7 +1418,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job, item_type) (rate(thanos_store_index_cache_hits_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job, item_type) (rate(thanos_store_index_cache_hits_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{job}} {{item_type}}", @@ -1495,7 +1495,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job, item_type) (rate(thanos_store_index_cache_items_added_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job, item_type) (rate(thanos_store_index_cache_items_added_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{job}} {{item_type}}", @@ -1572,7 +1572,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (job, item_type) (rate(thanos_store_index_cache_items_evicted_total{job=~\"$job\"}[$interval]))", + "expr": "sum by (job, item_type) (rate(thanos_store_index_cache_items_evicted_total{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{job}} {{item_type}}", @@ -1661,7 +1661,7 @@ "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum by (job, le) (rate(thanos_bucket_store_sent_chunk_size_bytes_bucket{job=~\"$job\"}[$interval])))", + "expr": "histogram_quantile(0.99, sum by (job, le) (rate(thanos_bucket_store_sent_chunk_size_bytes_bucket{job=~\"$job\"}[$__rate_interval])))", "format": "time_series", "intervalFactor": 2, "legendFormat": "P99", @@ -1669,7 +1669,7 @@ "step": 10 }, { - "expr": "sum by (job) (rate(thanos_bucket_store_sent_chunk_size_bytes_sum{job=~\"$job\"}[$interval])) / sum by (job) (rate(thanos_bucket_store_sent_chunk_size_bytes_count{job=~\"$job\"}[$interval]))", + "expr": "sum by (job) (rate(thanos_bucket_store_sent_chunk_size_bytes_sum{job=~\"$job\"}[$__rate_interval])) / sum by (job) (rate(thanos_bucket_store_sent_chunk_size_bytes_count{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "mean", @@ -1677,7 +1677,7 @@ "step": 10 }, { - "expr": "histogram_quantile(0.99, sum by (job, le) (rate(thanos_bucket_store_sent_chunk_size_bytes_bucket{job=~\"$job\"}[$interval])))", + "expr": "histogram_quantile(0.99, sum by (job, le) (rate(thanos_bucket_store_sent_chunk_size_bytes_bucket{job=~\"$job\"}[$__rate_interval])))", "format": "time_series", "intervalFactor": 2, "legendFormat": "P50", @@ -1773,7 +1773,7 @@ "step": 10 }, { - "expr": "sum by (job) (rate(thanos_bucket_store_series_blocks_queried_sum{job=~\"$job\"}[$interval])) / sum by (job) (rate(thanos_bucket_store_series_blocks_queried_count{job=~\"$job\"}[$interval]))", + "expr": "sum by (job) (rate(thanos_bucket_store_series_blocks_queried_sum{job=~\"$job\"}[$__rate_interval])) / sum by (job) (rate(thanos_bucket_store_series_blocks_queried_count{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "mean {{job}}", @@ -1866,7 +1866,7 @@ "step": 10 }, { - "expr": "sum by (job, data_type) (rate(thanos_bucket_store_series_data_fetched_sum{job=~\"$job\"}[$interval])) / sum by (job, data_type) (rate(thanos_bucket_store_series_data_fetched_count{job=~\"$job\"}[$interval]))", + "expr": "sum by (job, data_type) (rate(thanos_bucket_store_series_data_fetched_sum{job=~\"$job\"}[$__rate_interval])) / sum by (job, data_type) (rate(thanos_bucket_store_series_data_fetched_count{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "mean: {{data_type}} / {{job}}", @@ -1959,7 +1959,7 @@ "step": 10 }, { - "expr": "sum by (job, data_type) (rate(thanos_bucket_store_series_data_touched_sum{job=~\"$job\"}[$interval])) / sum by (job, data_type) (rate(thanos_bucket_store_series_data_touched_count{job=~\"$job\"}[$interval]))", + "expr": "sum by (job, data_type) (rate(thanos_bucket_store_series_data_touched_sum{job=~\"$job\"}[$__rate_interval])) / sum by (job, data_type) (rate(thanos_bucket_store_series_data_touched_count{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "mean: {{data_type}} / {{job}}", @@ -2051,7 +2051,7 @@ "step": 10 }, { - "expr": "sum by (job) (rate(thanos_bucket_store_series_result_series_sum{job=~\"$job\"}[$interval])) / sum by (job) (rate(thanos_bucket_store_series_result_series_count{job=~\"$job\"}[$interval]))", + "expr": "sum by (job) (rate(thanos_bucket_store_series_result_series_sum{job=~\"$job\"}[$__rate_interval])) / sum by (job) (rate(thanos_bucket_store_series_result_series_count{job=~\"$job\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "mean {{job}}", diff --git a/mixin/dashboards/bucket-replicate.libsonnet b/mixin/dashboards/bucket-replicate.libsonnet index 55ccfd3605..8a47aa8928 100644 --- a/mixin/dashboards/bucket-replicate.libsonnet +++ b/mixin/dashboards/bucket-replicate.libsonnet @@ -26,7 +26,7 @@ local g = import '../lib/thanos-grafana-builder/builder.libsonnet'; .addPanel( g.panel('Errors', 'Shows rate of errors.') + g.queryPanel( - 'sum by (%(dimensions)s, result) (rate(thanos_replicate_replication_runs_total{result="error", %(selector)s}[$interval]))' % thanos.bucketReplicate.dashboard, + 'sum by (%(dimensions)s, result) (rate(thanos_replicate_replication_runs_total{result="error", %(selector)s}[$__rate_interval]))' % thanos.bucketReplicate.dashboard, '{{result}}' ) + { yaxes: g.yaxes('percentunit') } + @@ -47,11 +47,11 @@ local g = import '../lib/thanos-grafana-builder/builder.libsonnet'; g.panel('Metrics') + g.queryPanel( [ - 'sum by (%(dimensions)s) (rate(blocks_meta_synced{state="loaded", %(selector)s}[$interval]))' % thanos.bucketReplicate.dashboard, - 'sum by (%(dimensions)s) (rate(blocks_meta_synced{state="failed", %(selector)s}[$interval]))' % thanos.bucketReplicate.dashboard, - 'sum by (%(dimensions)s) (rate(thanos_replicate_blocks_already_replicated_total{%(selector)s}[$interval]))' % thanos.bucketReplicate.dashboard, - 'sum by (%(dimensions)s) (rate(thanos_replicate_blocks_replicated_total{%(selector)s}[$interval]))' % thanos.bucketReplicate.dashboard, - 'sum by (%(dimensions)s) (rate(thanos_replicate_objects_replicated_total{%(selector)s}[$interval]))' % thanos.bucketReplicate.dashboard, + 'sum by (%(dimensions)s) (rate(blocks_meta_synced{state="loaded", %(selector)s}[$__rate_interval]))' % thanos.bucketReplicate.dashboard, + 'sum by (%(dimensions)s) (rate(blocks_meta_synced{state="failed", %(selector)s}[$__rate_interval]))' % thanos.bucketReplicate.dashboard, + 'sum by (%(dimensions)s) (rate(thanos_replicate_blocks_already_replicated_total{%(selector)s}[$__rate_interval]))' % thanos.bucketReplicate.dashboard, + 'sum by (%(dimensions)s) (rate(thanos_replicate_blocks_replicated_total{%(selector)s}[$__rate_interval]))' % thanos.bucketReplicate.dashboard, + 'sum by (%(dimensions)s) (rate(thanos_replicate_objects_replicated_total{%(selector)s}[$__rate_interval]))' % thanos.bucketReplicate.dashboard, ], ['meta loads', 'partial meta reads', 'already replicated blocks', 'replicated blocks', 'replicated objects'] ) diff --git a/mixin/dashboards/compact.libsonnet b/mixin/dashboards/compact.libsonnet index 21112417cd..031633d467 100644 --- a/mixin/dashboards/compact.libsonnet +++ b/mixin/dashboards/compact.libsonnet @@ -21,7 +21,7 @@ local g = import '../lib/thanos-grafana-builder/builder.libsonnet'; 'Shows rate of execution for compactions against blocks that are stored in the bucket by compaction group.' ) + g.queryPanel( - 'sum by (%(dimensions)s, group) (rate(thanos_compact_group_compactions_total{%(selector)s}[$interval]))' % thanos.compact.dashboard, + 'sum by (%(dimensions)s, group) (rate(thanos_compact_group_compactions_total{%(selector)s}[$__rate_interval]))' % thanos.compact.dashboard, 'compaction {{job}} {{group}}' ) + g.stack @@ -46,7 +46,7 @@ local g = import '../lib/thanos-grafana-builder/builder.libsonnet'; 'Shows rate of execution for downsampling against blocks that are stored in the bucket by compaction group.' ) + g.queryPanel( - 'sum by (%(dimensions)s, group) (rate(thanos_compact_downsample_total{%(selector)s}[$interval]))' % thanos.compact.dashboard, + 'sum by (%(dimensions)s, group) (rate(thanos_compact_downsample_total{%(selector)s}[$__rate_interval]))' % thanos.compact.dashboard, 'downsample {{job}} {{group}}' ) + g.stack @@ -68,7 +68,7 @@ local g = import '../lib/thanos-grafana-builder/builder.libsonnet'; 'Shows rate of execution for removals of blocks if their data is available as part of a block with a higher compaction level.' ) + g.queryPanel( - 'sum by (%(dimensions)s) (rate(thanos_compact_garbage_collection_total{%(selector)s}[$interval]))' % thanos.compact.dashboard, + 'sum by (%(dimensions)s) (rate(thanos_compact_garbage_collection_total{%(selector)s}[$__rate_interval]))' % thanos.compact.dashboard, 'garbage collection {{job}}' ) + g.stack @@ -94,7 +94,7 @@ local g = import '../lib/thanos-grafana-builder/builder.libsonnet'; 'Shows deletion rate of blocks already marked for deletion.' ) + g.queryPanel( - 'sum by (%(dimensions)s) (rate(thanos_compact_blocks_cleaned_total{%(selector)s}[$interval]))' % thanos.compact.dashboard, + 'sum by (%(dimensions)s) (rate(thanos_compact_blocks_cleaned_total{%(selector)s}[$__rate_interval]))' % thanos.compact.dashboard, 'Blocks cleanup {{job}}' ) + g.stack @@ -105,7 +105,7 @@ local g = import '../lib/thanos-grafana-builder/builder.libsonnet'; 'Shows deletion failures rate of blocks already marked for deletion.' ) + g.queryPanel( - 'sum by (%(dimensions)s) (rate(thanos_compact_block_cleanup_failures_total{%(selector)s}[$interval]))' % thanos.compact.dashboard, + 'sum by (%(dimensions)s) (rate(thanos_compact_block_cleanup_failures_total{%(selector)s}[$__rate_interval]))' % thanos.compact.dashboard, 'Blocks cleanup failures {{job}}' ) ) @@ -115,7 +115,7 @@ local g = import '../lib/thanos-grafana-builder/builder.libsonnet'; 'Shows rate at which blocks are marked for deletion (from GC and retention policy).' ) + g.queryPanel( - 'sum by (%(dimensions)s) (rate(thanos_compact_blocks_marked_for_deletion_total{%(selector)s}[$interval]))' % thanos.compact.dashboard, + 'sum by (%(dimensions)s) (rate(thanos_compact_blocks_marked_for_deletion_total{%(selector)s}[$__rate_interval]))' % thanos.compact.dashboard, 'Blocks marked {{job}}' ) ) @@ -128,7 +128,7 @@ local g = import '../lib/thanos-grafana-builder/builder.libsonnet'; 'Shows rate of execution for all meta files from blocks in the bucket into the memory.' ) + g.queryPanel( - 'sum by (%(dimensions)s) (rate(thanos_blocks_meta_syncs_total{%(selector)s}[$interval]))' % thanos.compact.dashboard, + 'sum by (%(dimensions)s) (rate(thanos_blocks_meta_syncs_total{%(selector)s}[$__rate_interval]))' % thanos.compact.dashboard, 'sync {{job}}' ) + g.stack @@ -151,7 +151,7 @@ local g = import '../lib/thanos-grafana-builder/builder.libsonnet'; .addPanel( g.panel('Rate', 'Shows rate of execution for operations against the bucket.') + g.queryPanel( - 'sum by (%(dimensions)s, operation) (rate(thanos_objstore_bucket_operations_total{%(selector)s}[$interval]))' % thanos.compact.dashboard, + 'sum by (%(dimensions)s, operation) (rate(thanos_objstore_bucket_operations_total{%(selector)s}[$__rate_interval]))' % thanos.compact.dashboard, '{{job}} {{operation}}' ) + g.stack @@ -181,7 +181,7 @@ local g = import '../lib/thanos-grafana-builder/builder.libsonnet'; 'Shows rate of execution for compactions against blocks that are stored in the bucket by compaction group.' ) + g.queryPanel( - 'sum by (%(dimensions)s) (rate(thanos_compact_group_compactions_total{%(selector)s}[$interval]))' % thanos.dashboard.overview, + 'sum by (%(dimensions)s) (rate(thanos_compact_group_compactions_total{%(selector)s}[$__rate_interval]))' % thanos.dashboard.overview, 'compaction {{job}}' ) + g.stack + diff --git a/mixin/dashboards/query-frontend.libsonnet b/mixin/dashboards/query-frontend.libsonnet index 9d2004a303..e0dd17f1cc 100644 --- a/mixin/dashboards/query-frontend.libsonnet +++ b/mixin/dashboards/query-frontend.libsonnet @@ -40,7 +40,7 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Requests', 'Show rate of cache requests.') + g.queryPanel( - 'sum by (%s) (rate(cortex_cache_request_duration_seconds_count{%s}[$interval]))' % [utils.joinLabels([thanos.queryFrontend.dashboard.dimensions, 'tripperware']), thanos.queryFrontend.dashboard.selector], + 'sum by (%s) (rate(cortex_cache_request_duration_seconds_count{%s}[$__rate_interval]))' % [utils.joinLabels([thanos.queryFrontend.dashboard.dimensions, 'tripperware']), thanos.queryFrontend.dashboard.selector], '{{job}} {{tripperware}}', ) + g.stack @@ -48,11 +48,11 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Querier cache gets vs misses', 'Show rate of Querier cache gets vs misses.') + g.queryPanel( - 'sum by (%s) (rate(querier_cache_gets_total{%s}[$interval]))' % [utils.joinLabels([thanos.queryFrontend.dashboard.dimensions, 'tripperware']), thanos.queryFrontend.dashboard.selector], + 'sum by (%s) (rate(querier_cache_gets_total{%s}[$__rate_interval]))' % [utils.joinLabels([thanos.queryFrontend.dashboard.dimensions, 'tripperware']), thanos.queryFrontend.dashboard.selector], 'Cache gets - {{job}} {{tripperware}}', ) + g.queryPanel( - 'sum by (%s) (rate(querier_cache_misses_total{%s}[$interval]))' % [utils.joinLabels([thanos.queryFrontend.dashboard.dimensions, 'tripperware']), thanos.queryFrontend.dashboard.selector], + 'sum by (%s) (rate(querier_cache_misses_total{%s}[$__rate_interval]))' % [utils.joinLabels([thanos.queryFrontend.dashboard.dimensions, 'tripperware']), thanos.queryFrontend.dashboard.selector], 'Cache misses - {{job}} {{tripperware}}', ) + g.stack @@ -60,7 +60,7 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Cortex fetched keys', 'Shows rate of cortex fetched keys.') + g.queryPanel( - 'sum by (%s) (rate(cortex_cache_fetched_keys_total{%s}[$interval]))' % [utils.joinLabels([thanos.queryFrontend.dashboard.dimensions, 'tripperware']), thanos.queryFrontend.dashboard.selector], + 'sum by (%s) (rate(cortex_cache_fetched_keys_total{%s}[$__rate_interval]))' % [utils.joinLabels([thanos.queryFrontend.dashboard.dimensions, 'tripperware']), thanos.queryFrontend.dashboard.selector], '{{job}} {{tripperware}}', ) + g.stack @@ -68,7 +68,7 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Cortex cache hits', 'Shows rate of cortex cache hits.') + g.queryPanel( - 'sum by (%s) (rate(cortex_cache_hits_total{%s}[$interval]))' % [utils.joinLabels([thanos.queryFrontend.dashboard.dimensions, 'tripperware']), thanos.queryFrontend.dashboard.selector], + 'sum by (%s) (rate(cortex_cache_hits_total{%s}[$__rate_interval]))' % [utils.joinLabels([thanos.queryFrontend.dashboard.dimensions, 'tripperware']), thanos.queryFrontend.dashboard.selector], '{{job}} {{tripperware}}', ) + g.stack diff --git a/mixin/dashboards/receive.libsonnet b/mixin/dashboards/receive.libsonnet index d96ce119cd..3a2f42c427 100644 --- a/mixin/dashboards/receive.libsonnet +++ b/mixin/dashboards/receive.libsonnet @@ -65,14 +65,14 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Rate of write requests (by tenant and code)') + g.queryPanel( - 'sum by (%s) (rate(http_requests_total{%s}[$interval]))' % [tenantWithHttpCodeDimensions, tenantReceiveHandlerSeclector], + 'sum by (%s) (rate(http_requests_total{%s}[$__rate_interval]))' % [tenantWithHttpCodeDimensions, tenantReceiveHandlerSeclector], '{{code}} - {{tenant}}' ) ) .addPanel( g.panel('Number of errors (by tenant and code)') + g.queryPanel( - 'sum by (%s) (rate(http_requests_total{%s}[$interval]))' % [ + 'sum by (%s) (rate(http_requests_total{%s}[$__rate_interval]))' % [ tenantWithHttpCodeDimensions, tenantHttpCodeNot2XXSelector, ], @@ -82,7 +82,7 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Average request duration (by tenant)') + g.queryPanel( - 'sum by (%s) (rate(http_request_duration_seconds_sum{%s}[$interval])) / sum by (%s) (http_request_duration_seconds_count{%s})' % [ + 'sum by (%s) (rate(http_request_duration_seconds_sum{%s}[$__rate_interval])) / sum by (%s) (http_request_duration_seconds_count{%s})' % [ thanos.receive.dashboard.tenantDimensions, tenantReceiveHandlerSeclector, thanos.receive.dashboard.tenantDimensions, @@ -97,7 +97,7 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Average successful HTTP request size (per tenant and code, only 2XX)') + g.queryPanel( - 'sum by (%s) (rate(http_request_size_bytes_sum{%s}[$interval])) / sum by (%s) (rate(http_request_size_bytes_count{%s}[$interval]))' % [ + 'sum by (%s) (rate(http_request_size_bytes_sum{%s}[$__rate_interval])) / sum by (%s) (rate(http_request_size_bytes_count{%s}[$__rate_interval]))' % [ thanos.receive.dashboard.tenantDimensions, tenantHttpCode2XXSelector, thanos.receive.dashboard.tenantDimensions, @@ -109,7 +109,7 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Average failed HTTP request size (per tenant and code, non 2XX)') + g.queryPanel( - 'sum by (%s) (rate(http_request_size_bytes_sum{%s}[$interval])) / sum by (%s) (rate(http_request_size_bytes_count{%s}[$interval]))' % [ + 'sum by (%s) (rate(http_request_size_bytes_sum{%s}[$__rate_interval])) / sum by (%s) (rate(http_request_size_bytes_count{%s}[$__rate_interval]))' % [ thanos.receive.dashboard.tenantDimensions, tenantHttpCodeNot2XXSelector, thanos.receive.dashboard.tenantDimensions, @@ -134,7 +134,7 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Rate of series received (per tenant, only 2XX)') + g.queryPanel( - 'sum(rate(thanos_receive_write_timeseries_bucket{%s}[$interval])) by (%s) ' % [ + 'sum(rate(thanos_receive_write_timeseries_bucket{%s}[$__rate_interval])) by (%s) ' % [ utils.joinLabels([thanos.receive.dashboard.tenantSelector, 'code=~"2.."']), thanos.receive.dashboard.tenantDimensions, ], @@ -144,7 +144,7 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Rate of series not written (per tenant and code, non 2XX)') + g.queryPanel( - 'sum(rate(thanos_receive_write_timeseries_bucket{%s}[$interval])) by (%s) ' % [ + 'sum(rate(thanos_receive_write_timeseries_bucket{%s}[$__rate_interval])) by (%s) ' % [ utils.joinLabels([thanos.receive.dashboard.tenantSelector, 'code!~"2.."']), tenantWithHttpCodeDimensions, ], @@ -154,7 +154,7 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Rate of samples received (per tenant, only 2XX)') + g.queryPanel( - 'sum(rate(thanos_receive_write_samples_sum{%s}[$interval])) by (%s) ' % [ + 'sum(rate(thanos_receive_write_samples_sum{%s}[$__rate_interval])) by (%s) ' % [ utils.joinLabels([thanos.receive.dashboard.tenantSelector, 'code=~"2.."']), thanos.receive.dashboard.tenantDimensions, ], @@ -164,7 +164,7 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Rate of samples not written (per tenant and code, non 2XX)') + g.queryPanel( - 'sum(rate(thanos_receive_write_samples_sum{%s}[$interval])) by (%s) ' % [ + 'sum(rate(thanos_receive_write_samples_sum{%s}[$__rate_interval])) by (%s) ' % [ utils.joinLabels([thanos.receive.dashboard.tenantSelector, 'code!~"2.."']), tenantWithHttpCodeDimensions, ], @@ -177,7 +177,7 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Rate', 'Shows rate of replications to other receive nodes.') + g.queryPanel( - 'sum by (%s) (rate(thanos_receive_replications_total{%s}[$interval]))' % [thanos.receive.dashboard.dimensions, thanos.receive.dashboard.selector], + 'sum by (%s) (rate(thanos_receive_replications_total{%s}[$__rate_interval]))' % [thanos.receive.dashboard.dimensions, thanos.receive.dashboard.selector], 'all {{job}}', ) ) @@ -195,7 +195,7 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Rate', 'Shows rate of forwarded requests to other receive nodes.') + g.queryPanel( - 'sum by (%s) (rate(thanos_receive_forward_requests_total{%s}[$interval]))' % [thanos.receive.dashboard.dimensions, thanos.receive.dashboard.selector], + 'sum by (%s) (rate(thanos_receive_forward_requests_total{%s}[$__rate_interval]))' % [thanos.receive.dashboard.dimensions, thanos.receive.dashboard.selector], 'all {{job}}', ) ) diff --git a/mixin/dashboards/rule.libsonnet b/mixin/dashboards/rule.libsonnet index 0c52c9ddc6..b62814f099 100644 --- a/mixin/dashboards/rule.libsonnet +++ b/mixin/dashboards/rule.libsonnet @@ -22,14 +22,14 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Rule Group Evaluations') + g.queryPanel( - 'sum by (%s) (rate(prometheus_rule_evaluations_total{%s}[$interval]))' % [utils.joinLabels([thanos.rule.dashboard.dimensions, 'strategy']), thanos.rule.dashboard.selector], + 'sum by (%s) (rate(prometheus_rule_evaluations_total{%s}[$__rate_interval]))' % [utils.joinLabels([thanos.rule.dashboard.dimensions, 'strategy']), thanos.rule.dashboard.selector], '{{ strategy }}', ) ) .addPanel( g.panel('Rule Group Evaluations Missed') + g.queryPanel( - 'sum by (%s) (increase(prometheus_rule_group_iterations_missed_total{%s}[$interval]))' % [utils.joinLabels([thanos.rule.dashboard.dimensions, 'strategy']), thanos.rule.dashboard.selector], + 'sum by (%s) (increase(prometheus_rule_group_iterations_missed_total{%s}[$__rate_interval]))' % [utils.joinLabels([thanos.rule.dashboard.dimensions, 'strategy']), thanos.rule.dashboard.selector], '{{ strategy }}', ) ) @@ -52,14 +52,14 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Dropped Rate', 'Shows rate of dropped alerts.') + g.queryPanel( - 'sum by (%(dimensions)s, alertmanager) (rate(thanos_alert_sender_alerts_dropped_total{%s}[$interval]))' % [thanos.rule.dashboard.dimensions, thanos.rule.dashboard.selector], + 'sum by (%(dimensions)s, alertmanager) (rate(thanos_alert_sender_alerts_dropped_total{%s}[$__rate_interval]))' % [thanos.rule.dashboard.dimensions, thanos.rule.dashboard.selector], '{{alertmanager}}' ) ) .addPanel( g.panel('Sent Rate', 'Shows rate of alerts that successfully sent to alert manager.') + g.queryPanel( - 'sum by (%(dimensions)s, alertmanager) (rate(thanos_alert_sender_alerts_sent_total{%s}[$interval]))' % [thanos.rule.dashboard.dimensions, thanos.rule.dashboard.selector], + 'sum by (%(dimensions)s, alertmanager) (rate(thanos_alert_sender_alerts_sent_total{%s}[$__rate_interval]))' % [thanos.rule.dashboard.dimensions, thanos.rule.dashboard.selector], '{{alertmanager}}' ) + g.stack @@ -82,7 +82,7 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Push Rate', 'Shows rate of queued alerts.') + g.queryPanel( - 'sum by (%s) (rate(thanos_alert_queue_alerts_dropped_total{%s}[$interval]))' % [thanos.rule.dashboard.dimensions, thanos.rule.dashboard.selector], + 'sum by (%s) (rate(thanos_alert_queue_alerts_dropped_total{%s}[$__rate_interval]))' % [thanos.rule.dashboard.dimensions, thanos.rule.dashboard.selector], '{{job}}' ) ) @@ -134,7 +134,7 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Alert Sent Rate', 'Shows rate of alerts that successfully sent to alert manager.') + g.queryPanel( - 'sum by (%s) (rate(thanos_alert_sender_alerts_sent_total{%s}[$interval]))' % [utils.joinLabels([thanos.dashboard.overview.dimensions, 'alertmanager']), thanos.dashboard.overview.selector], + 'sum by (%s) (rate(thanos_alert_sender_alerts_sent_total{%s}[$__rate_interval]))' % [utils.joinLabels([thanos.dashboard.overview.dimensions, 'alertmanager']), thanos.dashboard.overview.selector], '{{alertmanager}}' ) + g.addDashboardLink(thanos.rule.title) + diff --git a/mixin/dashboards/sidecar.libsonnet b/mixin/dashboards/sidecar.libsonnet index cc8f9d6b1e..f760b9aacf 100644 --- a/mixin/dashboards/sidecar.libsonnet +++ b/mixin/dashboards/sidecar.libsonnet @@ -68,7 +68,7 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Rate') + g.queryPanel( - 'sum by (%s) (rate(thanos_objstore_bucket_operations_total{%s}[$interval]))' % [utils.joinLabels([thanos.sidecar.dashboard.dimensions, 'operation']), thanos.sidecar.dashboard.selector], + 'sum by (%s) (rate(thanos_objstore_bucket_operations_total{%s}[$__rate_interval]))' % [utils.joinLabels([thanos.sidecar.dashboard.dimensions, 'operation']), thanos.sidecar.dashboard.selector], '{{job}} {{operation}}' ) + g.stack diff --git a/mixin/dashboards/store.libsonnet b/mixin/dashboards/store.libsonnet index ccf0f5adfa..f6c175368e 100644 --- a/mixin/dashboards/store.libsonnet +++ b/mixin/dashboards/store.libsonnet @@ -53,7 +53,7 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Rate', 'Shows rate of execution for operations against the bucket.') + g.queryPanel( - 'sum by (%s) (rate(thanos_objstore_bucket_operations_total{%s}[$interval]))' % [utils.joinLabels([thanos.store.dashboard.dimensions, 'operation']), thanos.store.dashboard.selector], + 'sum by (%s) (rate(thanos_objstore_bucket_operations_total{%s}[$__rate_interval]))' % [utils.joinLabels([thanos.store.dashboard.dimensions, 'operation']), thanos.store.dashboard.selector], '{{job}} {{operation}}' ) + g.stack @@ -61,7 +61,7 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Errors', 'Shows ratio of errors compared to the total number of executed operations against the bucket.') + g.queryPanel( - 'sum by (%(dimensions)s) (rate(thanos_objstore_bucket_operation_failures_total{%(selector)s}[$interval])) / sum by (%(dimensions)s) (rate(thanos_objstore_bucket_operations_total{%(selector)s}[$interval]))' % thanos.store.dashboard { dimensions: utils.joinLabels([thanos.store.dashboard.dimensions, 'operation']) }, + 'sum by (%(dimensions)s) (rate(thanos_objstore_bucket_operation_failures_total{%(selector)s}[$__rate_interval])) / sum by (%(dimensions)s) (rate(thanos_objstore_bucket_operations_total{%(selector)s}[$__rate_interval]))' % thanos.store.dashboard { dimensions: utils.joinLabels([thanos.store.dashboard.dimensions, 'operation']) }, '{{job}} {{operation}}' ) + { yaxes: g.yaxes({ format: 'percentunit' }) } + @@ -77,7 +77,7 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Block Load Rate', 'Shows rate of block loads from the bucket.') + g.queryPanel( - 'sum by (%s) (rate(thanos_bucket_store_block_loads_total{%s}[$interval]))' % [thanos.store.dashboard.dimensions, thanos.store.dashboard.selector], + 'sum by (%s) (rate(thanos_bucket_store_block_loads_total{%s}[$__rate_interval]))' % [thanos.store.dashboard.dimensions, thanos.store.dashboard.selector], 'block loads' ) + g.stack @@ -93,7 +93,7 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Block Drop Rate', 'Shows rate of block drops.') + g.queryPanel( - 'sum by (%s) (rate(thanos_bucket_store_block_drops_total{%s}[$interval]))' % [utils.joinLabels([thanos.store.dashboard.dimensions, 'operation']), thanos.store.dashboard.selector], + 'sum by (%s) (rate(thanos_bucket_store_block_drops_total{%s}[$__rate_interval]))' % [utils.joinLabels([thanos.store.dashboard.dimensions, 'operation']), thanos.store.dashboard.selector], 'block drops {{job}}' ) + g.stack @@ -112,7 +112,7 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Requests', 'Show rate of cache requests.') + g.queryPanel( - 'sum by (%s) (rate(thanos_store_index_cache_requests_total{%s}[$interval]))' % [utils.joinLabels([thanos.store.dashboard.dimensions, 'item_type']), thanos.store.dashboard.selector], + 'sum by (%s) (rate(thanos_store_index_cache_requests_total{%s}[$__rate_interval]))' % [utils.joinLabels([thanos.store.dashboard.dimensions, 'item_type']), thanos.store.dashboard.selector], '{{job}} {{item_type}}', ) + g.stack @@ -120,7 +120,7 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Hits', 'Shows ratio of errors compared to the total number of cache hits.') + g.queryPanel( - 'sum by (%s) (rate(thanos_store_index_cache_hits_total{%s}[$interval]))' % [utils.joinLabels([thanos.store.dashboard.dimensions, 'item_type']), thanos.store.dashboard.selector], + 'sum by (%s) (rate(thanos_store_index_cache_hits_total{%s}[$__rate_interval]))' % [utils.joinLabels([thanos.store.dashboard.dimensions, 'item_type']), thanos.store.dashboard.selector], '{{job}} {{item_type}}', ) + g.stack @@ -128,7 +128,7 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Added', 'Show rate of added items to cache.') + g.queryPanel( - 'sum by (%s) (rate(thanos_store_index_cache_items_added_total{%s}[$interval]))' % [utils.joinLabels([thanos.store.dashboard.dimensions, 'item_type']), thanos.store.dashboard.selector], + 'sum by (%s) (rate(thanos_store_index_cache_items_added_total{%s}[$__rate_interval]))' % [utils.joinLabels([thanos.store.dashboard.dimensions, 'item_type']), thanos.store.dashboard.selector], '{{job}} {{item_type}}', ) + g.stack @@ -136,7 +136,7 @@ local utils = import '../lib/utils.libsonnet'; .addPanel( g.panel('Evicted', 'Show rate of evicted items from cache.') + g.queryPanel( - 'sum by (%s) (rate(thanos_store_index_cache_items_evicted_total{%s}[$interval]))' % [utils.joinLabels([thanos.store.dashboard.dimensions, 'item_type']), thanos.store.dashboard.selector], + 'sum by (%s) (rate(thanos_store_index_cache_items_evicted_total{%s}[$__rate_interval]))' % [utils.joinLabels([thanos.store.dashboard.dimensions, 'item_type']), thanos.store.dashboard.selector], '{{job}} {{item_type}}', ) + g.stack @@ -148,9 +148,9 @@ local utils = import '../lib/utils.libsonnet'; g.panel('Chunk Size', 'Shows size of chunks that have sent to the bucket.') + g.queryPanel( [ - 'histogram_quantile(0.99, sum by (%s) (rate(thanos_bucket_store_sent_chunk_size_bytes_bucket{%s}[$interval])))' % [utils.joinLabels([thanos.store.dashboard.dimensions, 'le']), thanos.store.dashboard.selector], - 'sum by (%(dimensions)s) (rate(thanos_bucket_store_sent_chunk_size_bytes_sum{%(selector)s}[$interval])) / sum by (%(dimensions)s) (rate(thanos_bucket_store_sent_chunk_size_bytes_count{%(selector)s}[$interval]))' % thanos.store.dashboard, - 'histogram_quantile(0.99, sum by (%s) (rate(thanos_bucket_store_sent_chunk_size_bytes_bucket{%s}[$interval])))' % [utils.joinLabels([thanos.store.dashboard.dimensions, 'le']), thanos.store.dashboard.selector], + 'histogram_quantile(0.99, sum by (%s) (rate(thanos_bucket_store_sent_chunk_size_bytes_bucket{%s}[$__rate_interval])))' % [utils.joinLabels([thanos.store.dashboard.dimensions, 'le']), thanos.store.dashboard.selector], + 'sum by (%(dimensions)s) (rate(thanos_bucket_store_sent_chunk_size_bytes_sum{%(selector)s}[$__rate_interval])) / sum by (%(dimensions)s) (rate(thanos_bucket_store_sent_chunk_size_bytes_count{%(selector)s}[$__rate_interval]))' % thanos.store.dashboard, + 'histogram_quantile(0.99, sum by (%s) (rate(thanos_bucket_store_sent_chunk_size_bytes_bucket{%s}[$__rate_interval])))' % [utils.joinLabels([thanos.store.dashboard.dimensions, 'le']), thanos.store.dashboard.selector], ], [ 'P99', @@ -168,7 +168,7 @@ local utils = import '../lib/utils.libsonnet'; g.queryPanel( [ 'thanos_bucket_store_series_blocks_queried{%s, quantile="0.99"}' % thanos.store.dashboard.selector, - 'sum by (%(dimensions)s) (rate(thanos_bucket_store_series_blocks_queried_sum{%(selector)s}[$interval])) / sum by (%(dimensions)s) (rate(thanos_bucket_store_series_blocks_queried_count{%(selector)s}[$interval]))' % thanos.store.dashboard, + 'sum by (%(dimensions)s) (rate(thanos_bucket_store_series_blocks_queried_sum{%(selector)s}[$__rate_interval])) / sum by (%(dimensions)s) (rate(thanos_bucket_store_series_blocks_queried_count{%(selector)s}[$__rate_interval]))' % thanos.store.dashboard, 'thanos_bucket_store_series_blocks_queried{%s, quantile="0.50"}' % thanos.store.dashboard.selector, ], [ 'P99', @@ -182,7 +182,7 @@ local utils = import '../lib/utils.libsonnet'; g.queryPanel( [ 'thanos_bucket_store_series_data_fetched{%s, quantile="0.99"}' % thanos.store.dashboard.selector, - 'sum by (%s) (rate(thanos_bucket_store_series_data_fetched_sum{%s}[$interval])) / sum by (%s) (rate(thanos_bucket_store_series_data_fetched_count{%s}[$interval]))' % [dataSizeDimensions, thanos.store.dashboard.selector, dataSizeDimensions, thanos.store.dashboard.selector], + 'sum by (%s) (rate(thanos_bucket_store_series_data_fetched_sum{%s}[$__rate_interval])) / sum by (%s) (rate(thanos_bucket_store_series_data_fetched_count{%s}[$__rate_interval]))' % [dataSizeDimensions, thanos.store.dashboard.selector, dataSizeDimensions, thanos.store.dashboard.selector], 'thanos_bucket_store_series_data_fetched{%s, quantile="0.50"}' % thanos.store.dashboard.selector, ], [ 'P99: {{data_type}} / {{job}}', @@ -197,7 +197,7 @@ local utils = import '../lib/utils.libsonnet'; g.queryPanel( [ 'thanos_bucket_store_series_data_touched{%s, quantile="0.99"}' % thanos.store.dashboard.selector, - 'sum by (%s) (rate(thanos_bucket_store_series_data_touched_sum{%s}[$interval])) / sum by (%s) (rate(thanos_bucket_store_series_data_touched_count{%s}[$interval]))' % [dataSizeDimensions, thanos.store.dashboard.selector, dataSizeDimensions, thanos.store.dashboard.selector], + 'sum by (%s) (rate(thanos_bucket_store_series_data_touched_sum{%s}[$__rate_interval])) / sum by (%s) (rate(thanos_bucket_store_series_data_touched_count{%s}[$__rate_interval]))' % [dataSizeDimensions, thanos.store.dashboard.selector, dataSizeDimensions, thanos.store.dashboard.selector], 'thanos_bucket_store_series_data_touched{%s, quantile="0.50"}' % thanos.store.dashboard.selector, ], [ 'P99: {{data_type}} / {{job}}', @@ -212,7 +212,7 @@ local utils = import '../lib/utils.libsonnet'; g.queryPanel( [ 'thanos_bucket_store_series_result_series{%s,quantile="0.99"}' % thanos.store.dashboard.selector, - 'sum by (%(dimensions)s) (rate(thanos_bucket_store_series_result_series_sum{%(selector)s}[$interval])) / sum by (%(dimensions)s) (rate(thanos_bucket_store_series_result_series_count{%(selector)s}[$interval]))' % thanos.store.dashboard, + 'sum by (%(dimensions)s) (rate(thanos_bucket_store_series_result_series_sum{%(selector)s}[$__rate_interval])) / sum by (%(dimensions)s) (rate(thanos_bucket_store_series_result_series_count{%(selector)s}[$__rate_interval]))' % thanos.store.dashboard, 'thanos_bucket_store_series_result_series{%s,quantile="0.50"}' % thanos.store.dashboard.selector, ], [ 'P99', @@ -274,7 +274,7 @@ local utils = import '../lib/utils.libsonnet'; nullPointMode: 'null as zero', targets: [ { - expr: 'histogram_quantile(0.99, sum by (%(dimensions)s, operation, le) (rate(%(metricName)s_bucket{%(selector)s}[$interval]))) * %(multiplier)s' % params, + expr: 'histogram_quantile(0.99, sum by (%(dimensions)s, operation, le) (rate(%(metricName)s_bucket{%(selector)s}[$__rate_interval]))) * %(multiplier)s' % params, format: 'time_series', intervalFactor: 2, legendFormat: 'P99 {{job}}', @@ -282,7 +282,7 @@ local utils = import '../lib/utils.libsonnet'; step: 10, }, { - expr: 'sum by (%(dimensions)s, operation) (rate(%(metricName)s_sum{%(selector)s}[$interval])) * %(multiplier)s / sum by (%(dimensions)s, operation) (rate(%(metricName)s_count{%(selector)s}[$interval]))' % params, + expr: 'sum by (%(dimensions)s, operation) (rate(%(metricName)s_sum{%(selector)s}[$__rate_interval])) * %(multiplier)s / sum by (%(dimensions)s, operation) (rate(%(metricName)s_count{%(selector)s}[$__rate_interval]))' % params, format: 'time_series', intervalFactor: 2, legendFormat: 'mean {{job}}', @@ -290,7 +290,7 @@ local utils = import '../lib/utils.libsonnet'; step: 10, }, { - expr: 'histogram_quantile(0.50, sum by (%(dimensions)s, operation, le) (rate(%(metricName)s_bucket{%(selector)s}[$interval]))) * %(multiplier)s' % params, + expr: 'histogram_quantile(0.50, sum by (%(dimensions)s, operation, le) (rate(%(metricName)s_bucket{%(selector)s}[$__rate_interval]))) * %(multiplier)s' % params, format: 'time_series', intervalFactor: 2, legendFormat: 'P50 {{job}}',