diff --git a/vitess-mixin/Makefile b/vitess-mixin/Makefile index e3743deae1..08a40623ed 100644 --- a/vitess-mixin/Makefile +++ b/vitess-mixin/Makefile @@ -57,6 +57,7 @@ test: #: Compare your .json generated dashboards local version with the origin/m tools: tools.go @# -mod='' tells go to ignore the vendor/ directory @cat $^ | grep _ | awk -F'"' '{print $$2}' | xargs -I% go install -mod='' % + @jb install @jb update https://github.com/grafana/grafonnet-lib/grafonnet > /dev/null 2>&1 diff --git a/vitess-mixin/README.md b/vitess-mixin/README.md index 1c9a808dd9..6be5f7dd7b 100644 --- a/vitess-mixin/README.md +++ b/vitess-mixin/README.md @@ -13,13 +13,13 @@ A set of Grafana dashboards, Prometheus rules and alerts for Vitess, packaged to export PATH="$GOPATH/bin:/usr/local/go/bin:$PATH" ``` -1. Install the go tools: `make tools`. `jb`, `jsonnet`, `jsonnetfmt`, and `promtool` should now be in `$GOPATH/bin`. - 1. Install the dependencies by running: `jb install` +1. Install the go tools: `make tools`. `jb`, `jsonnet`, `jsonnetfmt`, and `promtool` should now be in `$GOPATH/bin`. + ## ℹ️ How-to -Customize `config.libsonnet` based on your setup. Example: specify the `dataSource` name (default to `Prometheus_Vitess`) and add any custom selectors in `customCommonSelector`. You can then generate: +Customize `config.libsonnet` based on your setup. Example: specify the `dataSource` name (default to `Prometheus_Vitess`). You can then generate: - Prometheus alerts: `$ make prometheus_alerts.yaml` (Note: This files is empty because the current version of the mixin uses Grafana Alerts) diff --git a/vitess-mixin/config.libsonnet b/vitess-mixin/config.libsonnet index bd99460b1a..8aa109e049 100644 --- a/vitess-mixin/config.libsonnet +++ b/vitess-mixin/config.libsonnet @@ -8,8 +8,6 @@ vtworkerSelector: 'job="vitess-vtworker"', vtgateNodeSelector: 'job="node-exporter-vitess-vtgate"', mysqlSelector: 'job="mysql"', - customCommonSelector: 'region="$region"', - defaultRegion: 'us-east-1', defaultTimeFrom: 'now-30m', // Datasource to use diff --git a/vitess-mixin/dashboards/layouts/cluster_overview.libsonnet b/vitess-mixin/dashboards/layouts/cluster_overview.libsonnet index 0059df80b3..294a533521 100644 --- a/vitess-mixin/dashboards/layouts/cluster_overview.libsonnet +++ b/vitess-mixin/dashboards/layouts/cluster_overview.libsonnet @@ -14,7 +14,6 @@ local config = import '../../config.libsonnet'; helpers.dashboard.getDashboard(config._config.grafanaDashboardMetadata.clusterOverview) .addTemplates([ templates.interval, - templates.region, ]) .addLink(helpers.default.getDashboardLink(config._config.dashborardLinks)) .addPanels([ diff --git a/vitess-mixin/dashboards/layouts/keyspace_overview.libsonnet b/vitess-mixin/dashboards/layouts/keyspace_overview.libsonnet index 00a8302620..b9e307c72d 100644 --- a/vitess-mixin/dashboards/layouts/keyspace_overview.libsonnet +++ b/vitess-mixin/dashboards/layouts/keyspace_overview.libsonnet @@ -15,7 +15,6 @@ local config = import '../../config.libsonnet'; .addTemplates( [ templates.interval, - templates.region, templates.keyspace, templates.table, ] diff --git a/vitess-mixin/dashboards/layouts/vtgate_host_view.libsonnet b/vitess-mixin/dashboards/layouts/vtgate_host_view.libsonnet index b5d5337fd6..c394330826 100644 --- a/vitess-mixin/dashboards/layouts/vtgate_host_view.libsonnet +++ b/vitess-mixin/dashboards/layouts/vtgate_host_view.libsonnet @@ -15,7 +15,6 @@ local config = import '../../config.libsonnet'; helpers.dashboard.getDashboard(config._config.grafanaDashboardMetadata.vtgateHostView) .addTemplates([ - templates.region, templates.host, ]) .addLink(helpers.default.getDashboardLink(config._config.dashborardLinks)) diff --git a/vitess-mixin/dashboards/layouts/vtgate_overview.libsonnet b/vitess-mixin/dashboards/layouts/vtgate_overview.libsonnet index 19ccea2020..b2c14eb856 100644 --- a/vitess-mixin/dashboards/layouts/vtgate_overview.libsonnet +++ b/vitess-mixin/dashboards/layouts/vtgate_overview.libsonnet @@ -14,9 +14,6 @@ local config = import '../../config.libsonnet'; 'vtgate_overview.json': helpers.dashboard.getDashboard(config._config.grafanaDashboardMetadata.vtgateOverview) - .addTemplates([ - templates.region, - ]) .addLink(helpers.default.getDashboardLink(config._config.dashborardLinks)) .addPanels([ texts.vtgateOverview { gridPos: { h: 3, w: 24, x: 0, y: 0 } }, diff --git a/vitess-mixin/dashboards/layouts/vttablet_host_view.libsonnet b/vitess-mixin/dashboards/layouts/vttablet_host_view.libsonnet index ce2e024626..59996137fe 100644 --- a/vitess-mixin/dashboards/layouts/vttablet_host_view.libsonnet +++ b/vitess-mixin/dashboards/layouts/vttablet_host_view.libsonnet @@ -14,7 +14,6 @@ local rows_helper = helpers.default; helpers.dashboard.getDashboard(config._config.grafanaDashboardMetadata.vttabletHostView) .addTemplates( [ - templates.region, templates.keyspace, templates.shard_multi, templates.hostByKeyspaceShard, diff --git a/vitess-mixin/dashboards/resources/config/mysql_config.libsonnet b/vitess-mixin/dashboards/resources/config/mysql_config.libsonnet index f88bfca7be..5b89d4f21b 100644 --- a/vitess-mixin/dashboards/resources/config/mysql_config.libsonnet +++ b/vitess-mixin/dashboards/resources/config/mysql_config.libsonnet @@ -24,7 +24,6 @@ local configuration_templates = import './configuration_templates.libsonnet'; count by (keyspace, shard) ( idelta ( mysql_global_status_uptime{ - %(customCommonSelector)s, %(mysqlSelector)s }[5m] ) < 0 @@ -51,7 +50,6 @@ local configuration_templates = import './configuration_templates.libsonnet'; sum by (keyspace, shard)( rate( mysql_global_status_slow_queries{ - %(customCommonSelector)s, %(mysqlSelector)s }[$interval] ) @@ -71,13 +69,12 @@ local configuration_templates = import './configuration_templates.libsonnet'; { expr: ||| sum by(keyspace)( - vitess_mixin:mysql_global_status_slow_queries_byregion_keyspace_shard:irate1m{ - %(customCommonSelector)s, + vitess_mixin:mysql_global_status_slow_queries_by_keyspace_shard:irate1m{ keyspace="$keyspace" } ) - ||| % config._config, - legendFormat: '{{region}}/{{keyspace}}', + |||, + legendFormat: '{{keyspace}}', intervalFactor: 1, }, ], @@ -93,14 +90,13 @@ local configuration_templates = import './configuration_templates.libsonnet'; sum by(instance)( rate( mysql_global_status_slow_queries{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" }[5m] ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', intervalFactor: 1, }, @@ -116,7 +112,6 @@ local configuration_templates = import './configuration_templates.libsonnet'; expr: ||| sum by (keyspace)( mysql_slave_status_seconds_behind_master{ - %(customCommonSelector)s, keyspace="$keyspace" } ) > 1 @@ -136,7 +131,6 @@ local configuration_templates = import './configuration_templates.libsonnet'; sum by (keyspace)( rate( mysql_global_status_innodb_row_ops_total{ - %(customCommonSelector)s, keyspace="$keyspace", operation="read" }[5m] @@ -159,7 +153,6 @@ local configuration_templates = import './configuration_templates.libsonnet'; sum by (keyspace)( rate( mysql_global_status_rpl_semi_sync_master_tx_avg_wait_time{ - %(customCommonSelector)s, keyspace="$keyspace" }[1m] ) @@ -181,7 +174,6 @@ local configuration_templates = import './configuration_templates.libsonnet'; sum by (keyspace)( rate( mysql_global_status_rpl_semi_sync_master_tx_avg_wait_time{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -202,7 +194,6 @@ local configuration_templates = import './configuration_templates.libsonnet'; expr: ||| sum by (keyspace, version)( mysql_version_info{ - %(customCommonSelector)s, keyspace="$keyspace" } ) diff --git a/vitess-mixin/dashboards/resources/config/os_config.libsonnet b/vitess-mixin/dashboards/resources/config/os_config.libsonnet index ec030b097c..2cdfc6d4f8 100644 --- a/vitess-mixin/dashboards/resources/config/os_config.libsonnet +++ b/vitess-mixin/dashboards/resources/config/os_config.libsonnet @@ -21,7 +21,6 @@ local configuration_templates = import './configuration_templates.libsonnet'; avg ( rate( node_cpu_seconds_total{ - %(customCommonSelector)s, %(vtgateNodeSelector)s, mode="idle" }[1m] @@ -45,13 +44,12 @@ local configuration_templates = import './configuration_templates.libsonnet'; avg by (instance)( rate( node_cpu_seconds_total{ - %(customCommonSelector)s, instance=~"$host", mode="idle" }[1m] ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -68,7 +66,6 @@ local configuration_templates = import './configuration_templates.libsonnet'; avg by (instance)( rate( node_cpu_seconds_total{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host", @@ -76,7 +73,7 @@ local configuration_templates = import './configuration_templates.libsonnet'; }[5m] ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -92,14 +89,12 @@ local configuration_templates = import './configuration_templates.libsonnet'; 1 - sum ( node_memory_MemAvailable{ - %(customCommonSelector)s, %(vtgateNodeSelector)s } ) / sum ( node_memory_MemTotal{ - %(customCommonSelector)s, %(vtgateNodeSelector)s } ) @@ -119,14 +114,12 @@ local configuration_templates = import './configuration_templates.libsonnet'; 1 - sum by (instance)( node_memory_MemAvailable{ - %(customCommonSelector)s, instance=~"$host" } ) / sum by (instance)( node_memory_MemTotal{ - %(customCommonSelector)s, instance=~"$host" } ) @@ -145,7 +138,6 @@ local configuration_templates = import './configuration_templates.libsonnet'; 1 - sum by (instance)( node_memory_MemAvailable{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -154,13 +146,12 @@ local configuration_templates = import './configuration_templates.libsonnet'; / sum by (instance)( node_memory_MemTotal{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" } ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -175,7 +166,6 @@ local configuration_templates = import './configuration_templates.libsonnet'; sum ( irate( node_netstat_Tcp_RetransSegs{ - %(customCommonSelector)s, %(vtgateNodeSelector)s }[1m] ) @@ -184,7 +174,6 @@ local configuration_templates = import './configuration_templates.libsonnet'; sum ( irate( node_netstat_Tcp_OutSegs{ - %(customCommonSelector)s, %(vtgateNodeSelector)s }[1m] ) @@ -204,7 +193,6 @@ local configuration_templates = import './configuration_templates.libsonnet'; sum by (instance) ( irate( node_netstat_Tcp_RetransSegs{ - %(customCommonSelector)s, instance=~"$host" }[1m] ) @@ -213,12 +201,11 @@ local configuration_templates = import './configuration_templates.libsonnet'; sum by (instance) ( irate( node_netstat_Tcp_OutSegs{ - %(customCommonSelector)s, instance=~"$host" }[1m] ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -241,7 +228,6 @@ local configuration_templates = import './configuration_templates.libsonnet'; sum ( rate( node_network_receive_bytes{ - %(customCommonSelector)s, %(vtgateNodeSelector)s }[5m] ) @@ -256,7 +242,6 @@ local configuration_templates = import './configuration_templates.libsonnet'; sum ( rate( node_network_transmit_bytes{ - %(customCommonSelector)s, %(vtgateNodeSelector)s }[5m] ) @@ -286,7 +271,6 @@ local configuration_templates = import './configuration_templates.libsonnet'; sum by (instance)( rate( node_network_receive_bytes{ - %(customCommonSelector)s, instance=~"$host" }[5m] ) @@ -300,7 +284,6 @@ local configuration_templates = import './configuration_templates.libsonnet'; sum by (instance)( rate( node_network_transmit_bytes{ - %(customCommonSelector)s, instance=~"$host" }[5m] ) @@ -329,7 +312,6 @@ local configuration_templates = import './configuration_templates.libsonnet'; sum by (instance)( rate( node_network_receive_bytes{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -337,7 +319,7 @@ local configuration_templates = import './configuration_templates.libsonnet'; ) ) * 8 - ||| % config._config, + |||, legendFormat: 'ingress - {{instance}}', }, { @@ -346,7 +328,6 @@ local configuration_templates = import './configuration_templates.libsonnet'; sum by (instance)( rate( node_network_transmit_bytes{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -354,7 +335,7 @@ local configuration_templates = import './configuration_templates.libsonnet'; ) ) * 8 - ||| % config._config, + |||, legendFormat: 'egress - {{instance}}', }, ], @@ -370,7 +351,6 @@ local configuration_templates = import './configuration_templates.libsonnet'; sum by (instance)( rate( node_network_receive_bytes{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -378,7 +358,7 @@ local configuration_templates = import './configuration_templates.libsonnet'; ) ) * 8 - ||| % config._config, + |||, legendFormat: 'ingress - {{instance}}', }, ], @@ -394,7 +374,6 @@ local configuration_templates = import './configuration_templates.libsonnet'; sum by (instance)( rate( node_network_transmit_bytes{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -402,7 +381,7 @@ local configuration_templates = import './configuration_templates.libsonnet'; ) ) * 8 - ||| % config._config, + |||, legendFormat: 'egress - {{instance}}', }, ], @@ -418,13 +397,12 @@ local configuration_templates = import './configuration_templates.libsonnet'; avg by (keyspace)( rate( node_cpu_seconds_total{ - %(customCommonSelector)s, keyspace="$keyspace", mode="idle" }[5m] ) ) - ||| % config._config, + |||, legendFormat: '{{keyspace}}', }, ], @@ -439,16 +417,14 @@ local configuration_templates = import './configuration_templates.libsonnet'; 1 - avg by (keyspace)( node_memory_MemAvailable{ - %(customCommonSelector)s, keyspace="$keyspace" } / node_memory_MemTotal{ - %(customCommonSelector)s, keyspace="$keyspace" } ) - ||| % config._config, + |||, legendFormat: '{{keyspace}}', }, ], @@ -473,12 +449,11 @@ local configuration_templates = import './configuration_templates.libsonnet'; sum by (keyspace)( rate( node_network_receive_bytes{ - %(customCommonSelector)s, keyspace="$keyspace" }[5m] ) ) * 8 - ||| % config._config, + |||, legendFormat: 'ingress {{keyspace}}', }, { @@ -487,12 +462,11 @@ local configuration_templates = import './configuration_templates.libsonnet'; sum by (keyspace)( rate( node_network_transmit_bytes{ - %(customCommonSelector)s, keyspace="$keyspace" }[5m] ) ) * 8 - ||| % config._config, + |||, legendFormat: 'egress {{keyspace}}', }, ], @@ -506,18 +480,16 @@ local configuration_templates = import './configuration_templates.libsonnet'; ||| avg by(keyspace)( node_filesystem_avail{ - %(customCommonSelector)s, keyspace="$keyspace", mountpoint="/mnt" } / node_filesystem_size{ - %(customCommonSelector)s, keyspace="$keyspace", mountpoint="/mnt" } ) - ||| % config._config, + |||, legendFormat: '{{keyspace}}', intervalFactor: 1, }, @@ -532,7 +504,6 @@ local configuration_templates = import './configuration_templates.libsonnet'; ||| avg by(instance)( node_filesystem_avail{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host", @@ -540,14 +511,13 @@ local configuration_templates = import './configuration_templates.libsonnet'; } / node_filesystem_size{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host", mountpoint="/mnt" } ) - ||| % config._config, + |||, legendFormat: '{{instance}}', intervalFactor: 1, }, diff --git a/vitess-mixin/dashboards/resources/config/vtgate_config.libsonnet b/vitess-mixin/dashboards/resources/config/vtgate_config.libsonnet index 631af4a9cb..04f494b849 100644 --- a/vitess-mixin/dashboards/resources/config/vtgate_config.libsonnet +++ b/vitess-mixin/dashboards/resources/config/vtgate_config.libsonnet @@ -45,9 +45,9 @@ local datalinks = import '../datalinks.libsonnet'; { expr: ||| sum ( - vitess_mixin:vtgate_api_count_byregion:irate1m{%(customCommonSelector)s} + vitess_mixin:vtgate_api_count:irate1m ) - ||| % config._config, + |||, legendFormat: 'Requests', }, ], @@ -64,9 +64,7 @@ local datalinks = import '../datalinks.libsonnet'; { expr: ||| sum by(keyspace)( - vitess_mixin:vtgate_queries_processed_by_region_and_keyspace:irate1m{ - %(customCommonSelector)s - } + vitess_mixin:vtgate_queries_processed_by_keyspace:irate1m ) ||| % config._config, legendFormat: '{{keyspace}}', @@ -87,11 +85,9 @@ local datalinks = import '../datalinks.libsonnet'; { expr: ||| sum by (db_type)( - vitess_mixin:vtgate_api_count_byregion_db_type:irate1m{ - %(customCommonSelector)s - } + vitess_mixin:vtgate_api_count_by_db_type:irate1m ) - ||| % config._config, + |||, legendFormat: '{{db_type}}', }, ], @@ -112,12 +108,11 @@ local datalinks = import '../datalinks.libsonnet'; sum by (instance, db_type)( rate( vtgate_api_count{ - %(customCommonSelector)s, instance=~"$host", }[1m] ) ) - ||| % config._config, + |||, legendFormat: '{{instance}} - {{db_type}}', intervalFactor: 1, }, @@ -141,12 +136,11 @@ local datalinks = import '../datalinks.libsonnet'; sum by (instance)( rate( vtgate_api_count{ - %(customCommonSelector)s, instance=~'$host' }[1m] ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', intervalFactor: 1, }, @@ -164,11 +158,11 @@ local datalinks = import '../datalinks.libsonnet'; { expr: ||| sum ( - vitess_mixin:vtgate_api_error_counts_byregion:irate1m{%(customCommonSelector)s}) + vitess_mixin:vtgate_api_error_counts:irate1m) / sum ( - vitess_mixin:vtgate_api_count_byregion:irate1m{%(customCommonSelector)s}) - ||| % config._config, + vitess_mixin:vtgate_api_count:irate1m) + |||, legendFormat: 'Error rate', }, ], @@ -186,11 +180,11 @@ local datalinks = import '../datalinks.libsonnet'; { expr: ||| sum by(keyspace)( - vitess_mixin:vtgate_api_error_counts_byregion_keyspace:irate1m{%(customCommonSelector)s}) + vitess_mixin:vtgate_api_error_counts_by_keyspace:irate1m) / sum by(keyspace)( - vitess_mixin:vtgate_api_count_byregion_keyspace:irate1m{%(customCommonSelector)s}) - ||| % config._config, + vitess_mixin:vtgate_api_count_by_keyspace:irate1m) + |||, legendFormat: '{{keyspace}}', }, ], @@ -210,15 +204,11 @@ local datalinks = import '../datalinks.libsonnet'; { expr: ||| sum by (db_type)( - vitess_mixin:vtgate_api_error_counts_byregion_db_type:irate1m{ - %(customCommonSelector)s, - } + vitess_mixin:vtgate_api_error_counts_by_db_type:irate1m ) / sum by (db_type)( - vitess_mixin:vtgate_api_count_byregion_db_type:irate1m{ - %(customCommonSelector)s, - } + vitess_mixin:vtgate_api_count_by_db_type:irate1m ) ||| % config._config, legendFormat: '{{db_type}}', @@ -242,19 +232,17 @@ local datalinks = import '../datalinks.libsonnet'; expr: ||| sum by(instance)( - rate(vtgate_api_error_counts{ - %(customCommonSelector)s - }[1m]) > 0 + rate( + vtgate_api_error_counts[1m] + ) > 0 ) / sum by(instance)( rate( - vtgate_api_count{ - %(customCommonSelector)s - }[1m] + vtgate_api_count[1m] ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', intervalFactor: 1, }, @@ -272,7 +260,6 @@ local datalinks = import '../datalinks.libsonnet'; ||| sum by(instance, db_type)( rate(vtgate_api_error_counts{ - %(customCommonSelector)s, instance=~"$host" }[1m] ) > 0 @@ -281,12 +268,11 @@ local datalinks = import '../datalinks.libsonnet'; sum by(instance, db_type)( rate( vtgate_api_count{ - %(customCommonSelector)s, instance=~"$host" }[1m] ) ) - ||| % config._config, + |||, legendFormat: '{{instance}} - {{db_type}}', intervalFactor: 1, }, @@ -306,10 +292,10 @@ local datalinks = import '../datalinks.libsonnet'; histogram_quantile( 0.99, sum by(le)( - vitess_mixin:vtgate_api_bucket_byregion:irate1m{%(customCommonSelector)s} + vitess_mixin:vtgate_api_bucket:irate1m ) ) - ||| % config._config, + |||, legendFormat: 'Duration', }, ], @@ -329,7 +315,7 @@ local datalinks = import '../datalinks.libsonnet'; histogram_quantile( 0.99, sum by(keyspace,le)( - vitess_mixin:vtgate_api_bucket_byregion_keyspace:irate1m{%(customCommonSelector)s} + vitess_mixin:vtgate_api_bucket_by_keyspace:irate1m ) ) ||| % config._config, @@ -369,13 +355,12 @@ local datalinks = import '../datalinks.libsonnet'; sum by(instance,le)( rate( vtgate_api_bucket{ - %(customCommonSelector)s, instance=~"$host" }[1m] ) ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', intervalFactor: 1, }, @@ -394,13 +379,12 @@ local datalinks = import '../datalinks.libsonnet'; sum by(instance,db_type,le)( rate( vtgate_api_bucket{ - %(customCommonSelector)s, instance=~"$host" }[1m] ) ) ) - ||| % config._config, + |||, legendFormat: '{{instance}} - {{db_type}}', intervalFactor: 1, }, @@ -416,12 +400,10 @@ local datalinks = import '../datalinks.libsonnet'; histogram_quantile( 0.50, sum by(le)( - vitess_mixin:vtgate_api_bucket_byregion:irate1m{ - %(customCommonSelector)s - } + vitess_mixin:vtgate_api_bucket:irate1m ) ) - ||| % config._config, + |||, legendFormat: 'Duration p50', }, ], @@ -439,13 +421,12 @@ local datalinks = import '../datalinks.libsonnet'; sum by(instance, le)( rate( vtgate_api_bucket{ - %(customCommonSelector)s, instance=~"$host" }[1m] ) ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -460,12 +441,10 @@ local datalinks = import '../datalinks.libsonnet'; histogram_quantile( 0.95, sum by(le)( - vitess_mixin:vtgate_api_bucket_byregion:irate1m{ - %(customCommonSelector)s - } + vitess_mixin:vtgate_api_bucket:irate1m ) ) - ||| % config._config, + |||, legendFormat: 'Duration p95', }, ], @@ -482,13 +461,12 @@ local datalinks = import '../datalinks.libsonnet'; sum by(instance, le)( rate( vtgate_api_bucket{ - %(customCommonSelector)s, instance=~"$host" }[1m] ) ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -504,20 +482,16 @@ local datalinks = import '../datalinks.libsonnet'; expr: ||| sum ( rate( - vtgate_api_sum{ - %(customCommonSelector)s - }[5m] + vtgate_api_sum[5m] ) ) / sum ( rate( - vtgate_api_count{ - %(customCommonSelector)s - }[5m] + vtgate_api_count[5m] ) ) - ||| % config._config, + |||, legendFormat: 'Avg Latency', }, ], @@ -533,7 +507,6 @@ local datalinks = import '../datalinks.libsonnet'; sum by (instance)( rate( vtgate_api_sum{ - %(customCommonSelector)s, instance=~"$host" }[5m] ) @@ -542,12 +515,11 @@ local datalinks = import '../datalinks.libsonnet'; sum by (instance)( rate( vtgate_api_count{ - %(customCommonSelector)s, instance=~"$host" }[5m] ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -562,12 +534,10 @@ local datalinks = import '../datalinks.libsonnet'; histogram_quantile( 0.99, sum by (db_type, le)( - vitess_mixin:vtgate_api_bucket_byregion_db_type:irate1m{ - %(customCommonSelector)s - } + vitess_mixin:vtgate_api_bucket_by_db_type:irate1m ) ) - ||| % config._config, + |||, legendFormat: '{{db_type}}', }, ], @@ -584,8 +554,7 @@ local datalinks = import '../datalinks.libsonnet'; { expr: ||| sum by (table)( - vitess_mixin:vtgate_queries_processed_byregion_keyspace_table:irate1m{ - %(customCommonSelector)s, + vitess_mixin:vtgate_queries_processed_by_keyspace_table:irate1m{ keyspace="$keyspace", table=~"$table" } @@ -605,15 +574,14 @@ local datalinks = import '../datalinks.libsonnet'; { expr: ||| sum by (plan)( - vitess_mixin:vtgate_queries_processed_byregion_keyspace_table_plan:irate1m{ - %(customCommonSelector)s, + vitess_mixin:vtgate_queries_processed_by_keyspace_table_plan:irate1m{ keyspace="$keyspace", table=~"$table" } ) OR vector(0) - ||| % config._config, + |||, legendFormat: '{{plan}}', }, ], @@ -633,20 +601,18 @@ local datalinks = import '../datalinks.libsonnet'; ( 100 * sum by (keyspace)( - vitess_mixin:vtgate_api_error_counts_byregion_keyspace:irate1m{ - %(customCommonSelector)s, + vitess_mixin:vtgate_api_error_counts_by_keyspace:irate1m{ keyspace="$keyspace" } ) / sum by (keyspace)( - vitess_mixin:vtgate_api_count_byregion_keyspace:irate1m{ - %(customCommonSelector)s, + vitess_mixin:vtgate_api_count_by_keyspace:irate1m{ keyspace="$keyspace" } ) ) - ||| % config._config, + |||, legendFormat: 'Success rate', }, ], @@ -659,11 +625,9 @@ local datalinks = import '../datalinks.libsonnet'; { expr: ||| sum by (code)( - vitess_mixin:vtgate_api_error_counts_byregion_code:irate1m{ - %(customCommonSelector)s - } + vitess_mixin:vtgate_api_error_counts_by_code:irate1m ) - ||| % config._config, + |||, legendFormat: '{{code}}', }, ], @@ -680,12 +644,11 @@ local datalinks = import '../datalinks.libsonnet'; sum by (instance,code)( rate( vtgate_api_error_counts{ - %(customCommonSelector)s, instance=~"$host" }[1m] ) ) - ||| % config._config, + |||, legendFormat: '{{instance}} - {{code}}', }, ], @@ -699,11 +662,9 @@ local datalinks = import '../datalinks.libsonnet'; { expr: ||| sum by (operation)( - vitess_mixin:vtgate_api_error_counts_byregion_operation:irate1m{ - %(customCommonSelector)s - } + vitess_mixin:vtgate_api_error_counts_by_operation:irate1m ) - ||| % config._config, + |||, legendFormat: '{{operation}}', }, ], @@ -717,11 +678,9 @@ local datalinks = import '../datalinks.libsonnet'; { expr: ||| sum by (db_type)( - vitess_mixin:vtgate_api_error_counts_byregion_db_type:irate1m{ - %(customCommonSelector)s - } + vitess_mixin:vtgate_api_error_counts_by_db_type:irate1m ) - ||| % config._config, + |||, legendFormat: '{{db_type}}', }, ], @@ -738,12 +697,11 @@ local datalinks = import '../datalinks.libsonnet'; sum by (instance,keyspace)( rate( vtgate_api_error_counts{ - %(customCommonSelector)s, instance=~"$host" }[1m] ) ) - ||| % config._config, + |||, legendFormat: '{{keyspace}}', intervalFactor: 1, }, @@ -771,8 +729,7 @@ local datalinks = import '../datalinks.libsonnet'; { expr: ||| sum ( - vitess_mixin:process_start_time_seconds_byregion_job:sum5m{ - %(customCommonSelector)s, + vitess_mixin:process_start_time_seconds_by_job:sum5m{ %(vtgateSelector)s } ) > 0 @@ -793,7 +750,6 @@ local datalinks = import '../datalinks.libsonnet'; sum by(instance)( irate( go_gc_duration_seconds_count{ - %(customCommonSelector)s, %(vtgateSelector)s }[1m] ) @@ -815,7 +771,6 @@ local datalinks = import '../datalinks.libsonnet'; sum by(instance)( irate( go_gc_duration_seconds_count{ - %(customCommonSelector)s, %(vtgateSelector)s }[1m] ) @@ -836,7 +791,6 @@ local datalinks = import '../datalinks.libsonnet'; sum by(quantile)( irate( go_gc_duration_seconds{ - %(customCommonSelector)s, %(vtgateSelector)s }[1m] ) @@ -871,11 +825,9 @@ local datalinks = import '../datalinks.libsonnet'; { expr: ||| sum ( - vitess_mixin:vtgate_api_count_byregion:irate1m{ - %(customCommonSelector)s - } + vitess_mixin:vtgate_api_count:irate1m ) - ||| % config._config, + |||, intervalFactor: 1, }, }, @@ -895,12 +847,10 @@ local datalinks = import '../datalinks.libsonnet'; 1000 * histogram_quantile( 0.99, sum by(le)( - vitess_mixin:vtgate_api_bucket_byregion:irate1m{ - %(customCommonSelector)s - } + vitess_mixin:vtgate_api_bucket:irate1m ) ) - ||| % config._config, + |||, instant: true, intervalFactor: 1, }, diff --git a/vitess-mixin/dashboards/resources/config/vttablet_config.libsonnet b/vitess-mixin/dashboards/resources/config/vttablet_config.libsonnet index e10f0cc758..97bf5d5683 100644 --- a/vitess-mixin/dashboards/resources/config/vttablet_config.libsonnet +++ b/vitess-mixin/dashboards/resources/config/vttablet_config.libsonnet @@ -44,7 +44,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; ||| count( vttablet_tablet_server_state{ - %(customCommonSelector)s, %(vttabletSelector)s, name="SERVING" } @@ -64,15 +63,14 @@ local vitess_ct = configuration_templates.prometheus_vitess; expr: ||| sum by (table)( - vitess_mixin:vttablet_query_counts_byregion_keyspace_table:irate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_query_counts_by_keyspace_table:irate1m{ keyspace="$keyspace", table=~"$table" } ) or vector(0) - ||| % config._config, + |||, legendFormat: '{{table}}', }, ], @@ -86,15 +84,14 @@ local vitess_ct = configuration_templates.prometheus_vitess; expr: ||| sum by (plan)( - vitess_mixin:vttablet_query_counts_byregion_keyspace_table_plan:irate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_query_counts_by_keyspace_table_plan:irate1m{ keyspace="$keyspace", table=~"$table" } ) or vector(0) - ||| % config._config, + |||, legendFormat: '{{plan}}', }, ], @@ -111,14 +108,13 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (plan_type)( rate( vttablet_queries_count{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" } [5m] ) ) - ||| % config._config, + |||, legendFormat: '{{plan_type}}', }, ], @@ -134,12 +130,11 @@ local vitess_ct = configuration_templates.prometheus_vitess; expr: ||| sum by (keyspace)( - vitess_mixin:vttablet_query_counts_byregion_keyspace:irate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_query_counts_by_keyspace:irate1m{ keyspace="$keyspace" } ) - ||| % config._config, + |||, legendFormat: '{{keyspace}}', }, ], @@ -159,14 +154,13 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (instance)( rate( vttablet_query_counts{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" }[5m] ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -183,14 +177,13 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (shard)( rate( vttablet_query_counts{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" }[5m] ) ) - ||| % config._config, + |||, legendFormat: '{{shard}}', intervalFactor: 1, }, @@ -208,14 +201,13 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (table)( rate( vttablet_query_counts{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" }[5m] ) ) - ||| % config._config, + |||, legendFormat: '{{table}}', intervalFactor: 1, }, @@ -238,20 +230,18 @@ local vitess_ct = configuration_templates.prometheus_vitess; 100 * sum( - vitess_mixin:vttablet_errors_byregion_keyspace:irate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_errors_by_keyspace:irate1m{ keyspace="$keyspace" } ) / sum( - vitess_mixin:vttablet_query_counts_byregion_keyspace:irate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_query_counts_by_keyspace:irate1m{ keyspace="$keyspace" } ) ) - ||| % config._config, + |||, legendFormat: 'Success rate', }, ], @@ -269,27 +259,24 @@ local vitess_ct = configuration_templates.prometheus_vitess; expr: ||| sum by (keyspace)( - vitess_mixin:vttablet_query_error_counts_byregion_keyspace_table:irate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_query_error_counts_by_keyspace_table:irate1m{ keyspace="$keyspace" }) / ( sum by (keyspace)( - vitess_mixin:vttablet_query_error_counts_byregion_keyspace_table:irate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_query_error_counts_by_keyspace_table:irate1m{ keyspace="$keyspace" } ) + sum by (keyspace)( - vitess_mixin:vttablet_query_counts_byregion_keyspace:irate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_query_counts_by_keyspace:irate1m{ keyspace="$keyspace" } ) ) - ||| % config._config, + |||, legendFormat: '{{keyspace}}', }, ], @@ -310,7 +297,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (instance)( rate( vttablet_query_error_counts{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -322,7 +308,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (instance)( rate( vttablet_query_error_counts{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -333,7 +318,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (instance)( rate( vttablet_query_counts{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -341,7 +325,7 @@ local vitess_ct = configuration_templates.prometheus_vitess; ) ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -361,7 +345,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (plan)( rate( vttablet_query_error_counts{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -373,7 +356,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (plan)( rate( vttablet_query_error_counts{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -384,7 +366,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (plan)( rate( vttablet_query_counts{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -392,7 +373,7 @@ local vitess_ct = configuration_templates.prometheus_vitess; ) ) ) - ||| % config._config, + |||, legendFormat: '{{plan}}', }, ], @@ -413,7 +394,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (shard)( rate( vttablet_query_error_counts{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -425,7 +405,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (shard)( rate( vttablet_query_error_counts{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -436,7 +415,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (shard)( rate( vttablet_query_counts{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -444,7 +422,7 @@ local vitess_ct = configuration_templates.prometheus_vitess; ) ) ) - ||| % config._config, + |||, legendFormat: '{{shard}}', }, ], @@ -465,7 +443,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (table)( rate( vttablet_query_error_counts{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -477,7 +454,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (table)( rate( vttablet_query_error_counts{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -488,7 +464,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (table)( rate( vttablet_query_counts{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -496,7 +471,7 @@ local vitess_ct = configuration_templates.prometheus_vitess; ) ) ) - ||| % config._config, + |||, legendFormat: '{{table}}', }, ], @@ -510,13 +485,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; expr: ||| sum by (table)( - vitess_mixin:vttablet_query_error_counts_byregion_keyspace_table:irate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_query_error_counts_by_keyspace_table:irate1m{ keyspace="$keyspace", table=~"$table" } ) - ||| % config._config, + |||, legendFormat: '{{table}}', }, ], @@ -530,13 +504,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; expr: ||| sum by (plan,table)( - vitess_mixin:vttablet_query_error_counts_byregion_keyspace_table_plan:irate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_query_error_counts_by_keyspace_table_plan:irate1m{ keyspace="$keyspace", table=~"$table" } ) - ||| % config._config, + |||, legendFormat: '{{plan}} / {{table}}', }, ], @@ -550,13 +523,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; expr: ||| sum by (shard,table)( - vitess_mixin:vttablet_query_error_counts_byregion_keyspace_table_shard:irate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_query_error_counts_by_keyspace_table_shard:irate1m{ keyspace="$keyspace", table=~"$table" } ) - ||| % config._config, + |||, legendFormat: '{{shard}} / {{table}}', }, ], @@ -570,13 +542,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; expr: ||| sum by (table)( - vitess_mixin:vttablet_query_row_counts_byregion_keyspace_table:rate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_query_row_counts_by_keyspace_table:rate1m{ keyspace="$keyspace", table=~"$table" } ) - ||| % config._config, + |||, legendFormat: '{{table}}', }, ], @@ -589,13 +560,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; expr: ||| sum by (plan)( - vitess_mixin:vttablet_query_row_counts_byregion_keyspace_table_plan:rate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_query_row_counts_by_keyspace_table_plan:rate1m{ keyspace="$keyspace", table=~"$table" } ) - ||| % config._config, + |||, legendFormat: '{{plan}}', }, ], @@ -608,13 +578,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; expr: ||| sum by (shard)( - vitess_mixin:vttablet_query_row_counts_byregion_keyspace_table_shard:rate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_query_row_counts_by_keyspace_table_shard:rate1m{ keyspace="$keyspace", table=~"$table" } ) - ||| % config._config, + |||, legendFormat: '{{shard}}', }, ], @@ -628,14 +597,13 @@ local vitess_ct = configuration_templates.prometheus_vitess; ||| sum by (table) ( rate(vttablet_query_row_counts{ - %(customCommonSelector)s, keyspace=~"$keyspace", shard=~"$shard", instance=~"$host" }[1m] ) ) - ||| % config._config, + |||, legendFormat: '{{table}}', }, ], @@ -649,14 +617,13 @@ local vitess_ct = configuration_templates.prometheus_vitess; ||| sum by (plan) ( rate(vttablet_query_row_counts{ - %(customCommonSelector)s, keyspace=~"$keyspace", shard=~"$shard", instance=~"$host" }[1m] ) ) - ||| % config._config, + |||, legendFormat: '{{plan}}', }, ], @@ -670,37 +637,34 @@ local vitess_ct = configuration_templates.prometheus_vitess; expr: ||| sum( - vitess_mixin:vttablet_queries_sum_byregion_keyspace:rate1m{ - %(customCommonSelector)s, - keyspace="$keyspace"} - ) - / - sum ( - vitess_mixin:vttablet_queries_count_byregion_keyspace:rate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_queries_sum_by_keyspace:rate1m{ keyspace="$keyspace" } ) - ||| % config._config, + / + sum ( + vitess_mixin:vttablet_queries_count_by_keyspace:rate1m{ + keyspace="$keyspace" + } + ) + |||, legendFormat: 'Total', }, { expr: ||| sum by (shard)( - vitess_mixin:vttablet_queries_sum_byregion_keyspace_shard:rate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_queries_sum_by_keyspace_shard:rate1m{ keyspace="$keyspace" } ) / sum by(shard)( - vitess_mixin:vttablet_queries_count_byregion_keyspace_shard:rate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_queries_count_by_keyspace_shard:rate1m{ keyspace="$keyspace" } ) - ||| % config._config, + |||, legendFormat: '{{shard}}', }, ], @@ -716,13 +680,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; histogram_quantile( 0.50, sum by (le)( - vitess_mixin:vttablet_queries_bucket_byregion_keyspace:rate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_queries_bucket_by_keyspace:rate1m{ keyspace="$keyspace" } ) ) - ||| % config._config, + |||, legendFormat: 'Total', }, { @@ -731,13 +694,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; histogram_quantile( 0.50, sum by (shard, le)( - vitess_mixin:vttablet_queries_bucket_byregion_keyspace_shard:rate1m{ - region="$region", + vitess_mixin:vttablet_queries_bucket_by_keyspace_shard:rate1m{ keyspace="$keyspace" } ) ) - ||| % config._config, + |||, legendFormat: '{{shard}}', }, ], @@ -753,13 +715,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; histogram_quantile( 0.95, sum by (le)( - vitess_mixin:vttablet_queries_bucket_byregion_keyspace:rate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_queries_bucket_by_keyspace:rate1m{ keyspace="$keyspace" } ) ) - ||| % config._config, + |||, legendFormat: 'Total', }, { @@ -768,13 +729,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; histogram_quantile( 0.95, sum by (shard, le)( - vitess_mixin:vttablet_queries_bucket_byregion_keyspace_shard:rate1m{ - region="$region", + vitess_mixin:vttablet_queries_bucket_by_keyspace_shard:rate1m{ keyspace="$keyspace" } ) ) - ||| % config._config, + |||, legendFormat: '{{shard}}', }, ], @@ -791,13 +751,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; histogram_quantile( 0.999, sum by (le)( - vitess_mixin:vttablet_queries_bucket_byregion_keyspace:rate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_queries_bucket_by_keyspace:rate1m{ keyspace="$keyspace" } ) ) - ||| % config._config, + |||, legendFormat: 'Total', }, { @@ -806,13 +765,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; histogram_quantile( 0.999, sum by (shard, le)( - vitess_mixin:vttablet_queries_bucket_byregion_keyspace_shard:rate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_queries_bucket_by_keyspace_shard:rate1m{ keyspace="$keyspace" } ) ) - ||| % config._config, + |||, legendFormat: '{{shard}}', }, ], @@ -830,13 +788,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; ||| histogram_quantile( 0.99,sum by(keyspace,le)( - vitess_mixin:vttablet_queries_bucket_byregion_keyspace:rate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_queries_bucket_by_keyspace:rate1m{ keyspace="$keyspace" } ) ) - ||| % config._config, + |||, legendFormat: '{{keyspace}}', }, ], @@ -857,7 +814,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by(instance)( rate( vttablet_queries_sum{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -868,14 +824,13 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by(instance)( rate( vttablet_queries_count{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" }[5m] ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -896,7 +851,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; 0.50,sum by(instance,le)( rate( vttablet_queries_bucket{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -904,7 +858,7 @@ local vitess_ct = configuration_templates.prometheus_vitess; ) ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -925,7 +879,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; 0.95,sum by(instance,le)( rate( vttablet_queries_bucket{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -933,7 +886,7 @@ local vitess_ct = configuration_templates.prometheus_vitess; ) ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -954,7 +907,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; 0.99,sum by(instance,le)( rate( vttablet_queries_bucket{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -962,7 +914,7 @@ local vitess_ct = configuration_templates.prometheus_vitess; ) ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -983,7 +935,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; 0.99,sum by(plan_type,le)( rate( vttablet_queries_bucket{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -991,7 +942,7 @@ local vitess_ct = configuration_templates.prometheus_vitess; ) ) ) - ||| % config._config, + |||, legendFormat: '{{plan_type}}', }, ], @@ -1012,7 +963,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; 0.99,sum by(shard,le)( rate( vttablet_queries_bucket{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -1020,7 +970,7 @@ local vitess_ct = configuration_templates.prometheus_vitess; ) ) ) - ||| % config._config, + |||, legendFormat: '{{shard}}', }, ], @@ -1034,37 +984,33 @@ local vitess_ct = configuration_templates.prometheus_vitess; expr: ||| sum( - vitess_mixin:vttablet_transactions_sum_byregion_keyspace:rate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_transactions_sum_by_keyspace:rate1m{ keyspace="$keyspace" } ) / sum ( - vitess_mixin:vttablet_transactions_count_byregion_keyspace:rate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_transactions_count_by_keyspace:rate1m{ keyspace="$keyspace" } ) - ||| % config._config, + |||, legendFormat: 'Total', }, { expr: ||| sum by (shard)( - vitess_mixin:vttablet_transactions_sum_byregion_keyspace_shard:rate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_transactions_sum_by_keyspace_shard:rate1m{ keyspace="$keyspace" } ) / sum by (shard)( - vitess_mixin:vttablet_transactions_count_byregion_keyspace_shard:rate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_transactions_count_by_keyspace_shard:rate1m{ keyspace="$keyspace"} ) - ||| % config._config, + |||, legendFormat: '{{shard}}', }, ], @@ -1080,13 +1026,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; histogram_quantile( 0.50, sum by (le)( - vitess_mixin:vttablet_transactions_bucket_byregion_keyspace:rate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_transactions_bucket_by_keyspace:rate1m{ keyspace="$keyspace" } ) ) - ||| % config._config, + |||, legendFormat: 'Total', }, { @@ -1095,13 +1040,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; histogram_quantile( 0.50, sum by (le,shard)( - vitess_mixin:vttablet_transactions_bucket_byregion_keyspace_shard:rate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_transactions_bucket_by_keyspace_shard:rate1m{ keyspace="$keyspace" } ) ) - ||| % config._config, + |||, legendFormat: '{{shard}}', }, ], @@ -1117,13 +1061,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; histogram_quantile( 0.95, sum by (le)( - vitess_mixin:vttablet_transactions_bucket_byregion_keyspace:rate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_transactions_bucket_by_keyspace:rate1m{ keyspace="$keyspace" } ) ) - ||| % config._config, + |||, legendFormat: 'Total', }, { @@ -1132,13 +1075,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; histogram_quantile( 0.95, sum by (le,shard)( - vitess_mixin:vttablet_transactions_bucket_byregion_keyspace_shard:rate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_transactions_bucket_by_keyspace_shard:rate1m{ keyspace="$keyspace" } ) ) - ||| % config._config, + |||, legendFormat: '{{shard}}', }, ], @@ -1154,13 +1096,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; histogram_quantile( 0.999, sum by (le)( - vitess_mixin:vttablet_transactions_bucket_byregion_keyspace:rate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_transactions_bucket_by_keyspace:rate1m{ keyspace="$keyspace" } ) ) - ||| % config._config, + |||, legendFormat: 'Total', }, { @@ -1169,13 +1110,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; histogram_quantile( 0.999, sum by (le,shard)( - vitess_mixin:vttablet_transactions_bucket_byregion_keyspace_shard:rate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_transactions_bucket_by_keyspace_shard:rate1m{ keyspace="$keyspace" } ) ) - ||| % config._config, + |||, legendFormat: '{{shard}}', }, ], @@ -1196,7 +1136,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by(instance)( rate( vttablet_transactions_sum{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -1207,14 +1146,13 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by(instance)( rate( vttablet_transactions_count{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" }[5m] ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -1235,7 +1173,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; 0.50,sum by(instance,le)( rate( vttablet_transactions_bucket{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -1243,7 +1180,7 @@ local vitess_ct = configuration_templates.prometheus_vitess; ) ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -1264,7 +1201,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; 0.95,sum by(instance,le)( rate( vttablet_transactions_bucket{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -1272,7 +1208,7 @@ local vitess_ct = configuration_templates.prometheus_vitess; ) ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -1289,11 +1225,9 @@ local vitess_ct = configuration_templates.prometheus_vitess; expr: ||| sum by (keyspace,shard)( - vitess_mixin:vttablet_kills_byregion_keyspace_shard:irate1m{ - %(customCommonSelector)s - } + vitess_mixin:vttablet_kills_by_keyspace_shard:irate1m ) > 0 - ||| % config._config, + |||, legendFormat: '{{keyspace}}/{{shard}}', }, ], @@ -1319,8 +1253,7 @@ local vitess_ct = configuration_templates.prometheus_vitess; expr: ||| sum by (keyspace,shard) ( - vitess_mixin:process_start_time_seconds_byregion_keyspace_shard_job:sum5m{ - %(customCommonSelector)s, + vitess_mixin:process_start_time_seconds_by_keyspace_shard_job:sum5m{ %(vttabletSelector)s } ) > 0 @@ -1341,13 +1274,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; ||| sum by (instance)( vttablet_conn_pool_available{ - %(customCommonSelector)s, - keyspace='$keyspace', + keyspace='$keyspace', shard=~'$shard', instance=~'$host' } ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -1364,13 +1296,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; ||| sum by(instance) ( vttablet_conn_pool_active{ - %(customCommonSelector)s, keyspace='$keyspace', shard=~'$shard', instance=~'$host' } ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -1388,14 +1319,13 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (instance)( rate( vttablet_conn_pool_idle_closed{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" }[5m] ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -1413,14 +1343,13 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (instance)( rate( vttablet_conn_pool_wait_count{ - %(customCommonSelector)s, keyspace='$keyspace', shard=~'$shard', instance=~'$host' }[5m] ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -1438,7 +1367,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (instance) ( rate( vttablet_conn_pool_wait_time{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -1449,14 +1377,13 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (instance) ( rate( vttablet_conn_pool_wait_count{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" }[5m] ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -1473,13 +1400,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; expr: ||| sum by (instance)( vitess_mixin:vttablet_kills:irate1m{ - %(customCommonSelector)s, keyspace=~"$keyspace", shard=~"$shard", instance=~"$host" } > 0 ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -1495,11 +1421,10 @@ local vitess_ct = configuration_templates.prometheus_vitess; vitess_mixin:vttablet_errors:irate1m{ keyspace=~"$keyspace", shard=~"$shard", - instance=~"$host", - region=~"$region" + instance=~"$host" } > 0 ) - ||| % config._config, + |||, legendFormat: 'ErrorCode: {{error_code}}', }, ], @@ -1516,13 +1441,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; ||| sum by (instance)( vttablet_transaction_pool_available{ - %(customCommonSelector)s, keyspace='$keyspace', shard=~'$shard', instance=~'$host' } ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -1539,13 +1463,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; ||| sum by(instance) ( vttablet_transaction_pool_active{ - %(customCommonSelector)s, keyspace='$keyspace', shard=~'$shard', instance=~'$host' } ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -1563,14 +1486,13 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (instance)( rate( vttablet_transaction_pool_idle_closed{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" }[5m] ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -1588,14 +1510,13 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (instance)( rate( vttablet_transaction_pool_wait_count{ - %(customCommonSelector)s, keyspace='$keyspace', shard=~'$shard', instance=~'$host' }[5m] ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -1613,7 +1534,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (instance) ( rate( vttablet_transaction_pool_wait_time{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" @@ -1624,14 +1544,13 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (instance) ( rate( vttablet_transaction_pool_wait_count{ - %(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard", instance=~"$host" }[5m] ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -1647,14 +1566,13 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by(instance)( rate( go_gc_duration_seconds_count{ - %(customCommonSelector)s, keyspace=~"$keyspace", shard=~"$shard", instance=~"$host" }[1m] ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', intervalFactor: 1, }, @@ -1672,14 +1590,13 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by(instance)( rate( go_gc_duration_seconds_count{ - %(customCommonSelector)s, keyspace=~"$keyspace", shard=~"$shard", instance=~"$host" }[1m] ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', intervalFactor: 1, }, @@ -1695,14 +1612,13 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by(quantile)( rate( go_gc_duration_seconds{ - %(customCommonSelector)s, keyspace=~"$keyspace", shard=~"$shard", instance=~"$host" }[1m] ) ) - ||| % config._config, + |||, legendFormat: 'p{{quantile}}', intervalFactor: 1, }, @@ -1719,7 +1635,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (instance) ( rate( vttablet_mysql_sum{ - %(customCommonSelector)s, keyspace=~"$keyspace", shard=~"$shard", instance=~"$host" @@ -1730,14 +1645,13 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (instance) ( rate( vttablet_mysql_count{ - %(customCommonSelector)s, keyspace=~"$keyspace", shard=~"$shard", instance=~"$host" }[1m] ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -1754,7 +1668,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (le, instance) ( rate( vttablet_mysql_bucket{ - %(customCommonSelector)s, operation="Exec", keyspace=~"$keyspace", shard=~"$shard", @@ -1763,7 +1676,7 @@ local vitess_ct = configuration_templates.prometheus_vitess; ) ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -1780,7 +1693,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (le, instance) ( rate( vttablet_mysql_bucket{ - %(customCommonSelector)s, operation="Exec", keyspace=~"$keyspace", shard=~"$shard", @@ -1789,7 +1701,7 @@ local vitess_ct = configuration_templates.prometheus_vitess; ) ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -1811,12 +1723,11 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (instance) ( rate( vttablet_waits_count{ - %(customCommonSelector)s, keyspace=~"$keyspace", shard=~"$shard", type="Consolidations", instance=~"$host"}[1m])) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -1838,7 +1749,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (instance) ( rate( vttablet_waits_sum{ - %(customCommonSelector)s, keyspace=~"$keyspace", shard=~"$shard", type="Consolidations", @@ -1850,7 +1760,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (instance) ( rate( vttablet_waits_count{ - %(customCommonSelector)s, keyspace=~"$keyspace", shard=~"$shard", type="Consolidations", @@ -1858,7 +1767,7 @@ local vitess_ct = configuration_templates.prometheus_vitess; }[1m] ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -1882,7 +1791,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (le, instance)( rate( vttablet_waits_bucket{ - %(customCommonSelector)s, keyspace=~"$keyspace", shard=~"$shard", type="Consolidations", @@ -1891,7 +1799,7 @@ local vitess_ct = configuration_templates.prometheus_vitess; ) ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -1907,7 +1815,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (instance)( rate( vtgate_vttablet_call_sum{ - %(customCommonSelector)s, keyspace=~"$keyspace", shard_name=~"$shard" }[1m] @@ -1917,13 +1824,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (instance)( rate( vtgate_vttablet_call_count{ - %(customCommonSelector)s, keyspace=~"$keyspace", shard_name=~"$shard" }[1m] ) ) - ||| % config._config, + |||, legendFormat: '{{instance}}', }, ], @@ -1938,7 +1844,6 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (shard_name, db_type)( rate( vtgate_vttablet_call_sum{ - %(customCommonSelector)s, keyspace=~"$keyspace", shard_name=~"$shard" }[1m] @@ -1947,13 +1852,12 @@ local vitess_ct = configuration_templates.prometheus_vitess; sum by (shard_name, db_type)( rate( vtgate_vttablet_call_count{ - %(customCommonSelector)s, keyspace=~"$keyspace", shard_name=~"$shard" }[1m] ) ) - ||| % config._config, + |||, legendFormat: '{{shard_name}}-{{db_type}}', }, ], @@ -1979,12 +1883,10 @@ local vitess_ct = configuration_templates.prometheus_vitess; target: { expr: ||| - sum by (region)( - vitess_mixin:vttablet_query_counts_byregion:irate1m{ - %(customCommonSelector)s - } + sum ( + vitess_mixin:vttablet_query_counts:irate1m ) - ||| % config._config, + |||, intervalFactor: 1, }, }, diff --git a/vitess-mixin/dashboards/resources/datalinks.libsonnet b/vitess-mixin/dashboards/resources/datalinks.libsonnet index 3a47e34798..9b189b223b 100644 --- a/vitess-mixin/dashboards/resources/datalinks.libsonnet +++ b/vitess-mixin/dashboards/resources/datalinks.libsonnet @@ -4,7 +4,7 @@ local config = import '../../config.libsonnet'; // TODO: use proper obj when grafonnet-lib will support it { //TODO move the template to mixin config. - local dashboard_url_template = '/d/%(dashboardID)s/?var-interval=${interval}&var-region=${region}&var-keyspace=${__series.labels.keyspace}&time=${__url_time_range}', + local dashboard_url_template = '/d/%(dashboardID)s/?var-interval=${interval}&var-keyspace=${__series.labels.keyspace}&time=${__url_time_range}', keyspaceOverview:: { diff --git a/vitess-mixin/dashboards/resources/grafonnet/heatmaps.libsonnet b/vitess-mixin/dashboards/resources/grafonnet/heatmaps.libsonnet index 1000ada4b7..b2f7a5ae7e 100644 --- a/vitess-mixin/dashboards/resources/grafonnet/heatmaps.libsonnet +++ b/vitess-mixin/dashboards/resources/grafonnet/heatmaps.libsonnet @@ -21,12 +21,11 @@ local prometheus = grafana.prometheus; prometheus.target( ||| sum by (le)( - vitess_mixin:vttablet_queries_bucket_byregion_keyspace:rate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_queries_bucket_by_keyspace:rate1m{ keyspace="$keyspace" } ) - ||| % config._config, + |||, format='heatmap', legendFormat='{{le}}' ) @@ -48,12 +47,11 @@ local prometheus = grafana.prometheus; prometheus.target( ||| sum by (le)( - vitess_mixin:vttablet_transactions_bucket_byregion_keyspace:rate1m{ - %(customCommonSelector)s, + vitess_mixin:vttablet_transactions_bucket_by_keyspace:rate1m{ keyspace="$keyspace" } ) - ||| % config._config, + |||, format='heatmap', legendFormat='{{le}}' ) @@ -78,14 +76,13 @@ local prometheus = grafana.prometheus; sum by (le) ( rate( vttablet_queries_bucket{ - %(customCommonSelector)s, keyspace=~"$keyspace", shard=~"$shard", instance=~"$host" }[1m] ) ) - ||| % config._config, + |||, format='heatmap', legendFormat='{{le}}' ) diff --git a/vitess-mixin/dashboards/resources/grafonnet/helpers/os_helper.libsonnet b/vitess-mixin/dashboards/resources/grafonnet/helpers/os_helper.libsonnet index 15e61f965f..2580d54e43 100644 --- a/vitess-mixin/dashboards/resources/grafonnet/helpers/os_helper.libsonnet +++ b/vitess-mixin/dashboards/resources/grafonnet/helpers/os_helper.libsonnet @@ -4,7 +4,6 @@ local grafonnet_helper = import './grafonnet_helper.libsonnet'; - { /** * Builds grapPanel using grafonnet and the configuration from `os_config.libsonnet` diff --git a/vitess-mixin/dashboards/resources/grafonnet/panels.libsonnet b/vitess-mixin/dashboards/resources/grafonnet/panels.libsonnet index 4e2ab16bc9..c8bd16b451 100644 --- a/vitess-mixin/dashboards/resources/grafonnet/panels.libsonnet +++ b/vitess-mixin/dashboards/resources/grafonnet/panels.libsonnet @@ -62,12 +62,11 @@ local prometheus = grafana.prometheus; .addTarget(prometheus.target( ||| sum by (instance) ( - vitess_mixin:process_start_time_seconds_byregion_instance_job:sum5m{ - %(customCommonSelector)s, + vitess_mixin:process_start_time_seconds_by_instance_job:sum5m{ %(vtctldSelector)s } ) > 0 - ||| % config._config, + |||, legendFormat='{{instance}}' )), } diff --git a/vitess-mixin/dashboards/resources/grafonnet/singlestats.libsonnet b/vitess-mixin/dashboards/resources/grafonnet/singlestats.libsonnet index fbdd27bf85..7ea4e8fdca 100644 --- a/vitess-mixin/dashboards/resources/grafonnet/singlestats.libsonnet +++ b/vitess-mixin/dashboards/resources/grafonnet/singlestats.libsonnet @@ -31,7 +31,6 @@ local prometheus = grafana.prometheus; sum( irate( vtgate_api_error_counts{ - %(customCommonSelector)s, %(vtgateSelector)s }[$interval] ) OR vector(0) @@ -40,7 +39,6 @@ local prometheus = grafana.prometheus; sum( irate( vtgate_api_count{ - %(customCommonSelector)s, %(vtgateSelector)s }[$interval] ) @@ -64,7 +62,6 @@ local prometheus = grafana.prometheus; ||| sum( up{ - %(customCommonSelector)s, %(vtgateSelector)s } ) @@ -97,12 +94,12 @@ local prometheus = grafana.prometheus; 100 - ( - sum by(region)( - vitess_mixin:vttablet_error_byregion:irate1m{%(customCommonSelector)s} + sum ( + vitess_mixin:vttablet_errors:irate1m ) / - sum by(region)( - vitess_mixin:vttablet_query_counts_byregion:irate1m{%(customCommonSelector)s} + sum ( + vitess_mixin:vttablet_query_counts:irate1m ) ) ||| % config._config, @@ -124,7 +121,6 @@ local prometheus = grafana.prometheus; ||| sum( up{ - %(customCommonSelector)s, %(vttabletSelector)s } ) @@ -149,7 +145,6 @@ local prometheus = grafana.prometheus; count( count by (keyspace)( vttablet_tablet_state{ - %(customCommonSelector)s, %(vttabletSelector)s } ) @@ -174,7 +169,6 @@ local prometheus = grafana.prometheus; count( count by(shard)( vttablet_tablet_state{ - %(customCommonSelector)s, %(vttabletSelector)s } ) @@ -197,7 +191,6 @@ local prometheus = grafana.prometheus; ||| sum( up{ - %(customCommonSelector)s, %(vtworkerSelector)s } ) @@ -221,9 +214,9 @@ local prometheus = grafana.prometheus; prometheus.target( ||| sum ( - vitess_mixin:mysql_global_status_queries_byregion:irate1m{%(customCommonSelector)s} + vitess_mixin:mysql_global_status_queries:irate1m ) - ||| % config._config, + |||, intervalFactor=1 ) ), @@ -240,7 +233,6 @@ local prometheus = grafana.prometheus; ||| sum( up{ - %(customCommonSelector)s, %(vtctldSelector)s}) ||| % config._config, instant=true, diff --git a/vitess-mixin/dashboards/resources/grafonnet/templates.libsonnet b/vitess-mixin/dashboards/resources/grafonnet/templates.libsonnet index 3e82e0244b..22cdd784f1 100644 --- a/vitess-mixin/dashboards/resources/grafonnet/templates.libsonnet +++ b/vitess-mixin/dashboards/resources/grafonnet/templates.libsonnet @@ -4,16 +4,6 @@ local grafana = import '../../../vendor/grafonnet/grafana.libsonnet'; local template = grafana.template; { - region:: template.new( - 'region', - '%(dataSource)s' % config._config, - 'label_values(vtctld_build_number{%(vtctldSelector)s}, region)' % config._config, - label='Region', - refresh='time', - includeAll=false, - sort=1, - ), - interval:: template.interval( name='interval', label='Interval', @@ -26,7 +16,7 @@ local template = grafana.template; template.new( 'keyspace', '%(dataSource)s' % config._config, - 'query_result(sum by(keyspace)(vttablet_build_number{%(customCommonSelector)s, %(vttabletSelector)s}))' % config._config, + 'query_result(sum by(keyspace)(vttablet_build_number{%(vttabletSelector)s}))', regex='.*keyspace="(.*)".*', label='Keyspace', refresh='load', @@ -38,7 +28,7 @@ local template = grafana.template; template.new( 'table', '%(dataSource)s' % config._config, - 'query_result(sum by(table)(vitess_mixin:vtgate_queries_processed_by_table:irate1m{%(customCommonSelector)s,keyspace="$keyspace"}))' % config._config, + 'query_result(sum by(table)(vitess_mixin:vtgate_queries_processed_by_table:irate1m{keyspace="$keyspace"}))', regex='.*table="(.*)".*', label='Table', refresh='time', @@ -51,7 +41,7 @@ local template = grafana.template; template.new( 'host', '%(dataSource)s' % config._config, - 'label_values(vtgate_build_number{%(customCommonSelector)s}, instance)' % config._config, + 'label_values(vtgate_build_number{ instance)', regex='', label='Host(s)', refresh='time', @@ -64,7 +54,7 @@ local template = grafana.template; template.new( 'host', '%(dataSource)s' % config._config, - 'label_values(vttablet_build_number{%(customCommonSelector)s, keyspace="$keyspace", shard=~"$shard"}, instance)' % config._config, + 'label_values(vttablet_build_number{keyspace="$keyspace", shard=~"$shard"}, instance)', regex='', label='Host(s)', refresh='time', @@ -74,38 +64,11 @@ local template = grafana.template; sort=1 ), - hostByCurrentOSRelease:: - template.new( - 'host%(currentOSLabel)s' % config._config, - '%(nodeDataSource)s' % config._config, - 'label_values(node_uname_info{instance=~".*tablet.*",release=~"%(currentOSRelease)s.*"}, instance)' % config._config, - regex='', - label='Host(s) %(currentOSLabel)s' % config._config, - refresh='load', - multi=true, - includeAll=false, - allValues='.*', - sort=1 - ), - hostByNextOSRelease:: - template.new( - 'host%(nextOSLabel)s' % config._config, - '%(nodeDataSource)s' % config._config, - 'label_values(node_uname_info{instance=~".*tablet.*",release=~"%(nextOSRelease)s.*"}, instance)' % config._config, - regex='', - refresh='load', - label='Host(s) %(nextOSLabel)s' % config._config, - multi=true, - includeAll=false, - allValues='.*', - sort=1 - ), - shard:: template.new( 'shard', '%(dataSource)s' % config._config, - 'label_values(vttablet_build_number{%(customCommonSelector)s, keyspace="$keyspace"}, shard)' % config._config, + 'label_values(vttablet_build_number{keyspace="$keyspace"}, shard)', regex='', label='Shard', refresh='time', @@ -118,7 +81,7 @@ local template = grafana.template; template.new( 'shard', '%(dataSource)s' % config._config, - 'label_values(vttablet_build_number{%(customCommonSelector)s, keyspace="$keyspace"}, shard)' % config._config, + 'label_values(vttablet_build_number{keyspace="$keyspace"}, shard)', regex='', label='Shard', refresh='time', diff --git a/vitess-mixin/dashboards/resources/grafonnet/texts.libsonnet b/vitess-mixin/dashboards/resources/grafonnet/texts.libsonnet index aa8ecc8480..5c869c61ce 100644 --- a/vitess-mixin/dashboards/resources/grafonnet/texts.libsonnet +++ b/vitess-mixin/dashboards/resources/grafonnet/texts.libsonnet @@ -28,7 +28,7 @@ local text = grafana.text; content=||| #### Cluster overview - This is a general overview of our Vitess clusters where only drilldown by region is allowed. %(drill_down_note)s + This is a general overview of our Vitess clusters. %(drill_down_note)s %(footnote)s ||| % notes @@ -42,7 +42,7 @@ local text = grafana.text; content=||| #### Keyspace overview - This is a general overview of our keyspaces where only drilldown by region, keyspace and table is allowed. %(drill_down_note)s + This is a general overview of our keyspaces where only drilldown by keyspace and table is allowed. %(drill_down_note)s %(footnote)s ||| % notes @@ -56,7 +56,7 @@ local text = grafana.text; content=||| #### vtgate overview - This is a general overview of our vtgate tier where only drilldown by region is allowed. %(drill_down_note)s + This is a general overview of our vtgate tier. %(drill_down_note)s %(footnote)s ||| % notes diff --git a/vitess-mixin/rules/rules.libsonnet b/vitess-mixin/rules/rules.libsonnet index e9e6c87e4d..8612514422 100644 --- a/vitess-mixin/rules/rules.libsonnet +++ b/vitess-mixin/rules/rules.libsonnet @@ -13,8 +13,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_1', rules: [ { - record: 'vitess_mixin:vttablet_error_byregion:irate1m', - expr: 'sum by(region)(irate(vttablet_errors[1m]))', + record: 'vitess_mixin:vttablet_errors:irate1m', + expr: 'sum (irate(vttablet_errors[1m]))', }, ], }, @@ -22,8 +22,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_2', rules: [ { - record: 'vitess_mixin:vttablet_query_counts_byregion:irate1m', - expr: 'sum by(region)(irate(vttablet_query_counts[1m]))', + record: 'vitess_mixin:vttablet_query_counts:irate1m', + expr: 'sum (irate(vttablet_query_counts[1m]))', }, ], }, @@ -31,8 +31,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_3', rules: [ { - record: 'vitess_mixin:mysql_global_status_queries_byregion:irate1m', - expr: 'sum by(region)(irate(mysql_global_status_queries[1m]))', + record: 'vitess_mixin:mysql_global_status_queries:irate1m', + expr: 'sum (irate(mysql_global_status_queries[1m]))', }, ], }, @@ -40,8 +40,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_4', rules: [ { - record: 'vitess_mixin:vtgate_api_bucket_byregion:irate1m', - expr: 'sum by(le,region)(irate(vtgate_api_bucket[1m]))', + record: 'vitess_mixin:vtgate_api_bucket:irate1m', + expr: 'sum by(le)(irate(vtgate_api_bucket[1m]))', }, ], }, @@ -49,8 +49,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_5', rules: [ { - record: 'vitess_mixin:vtgate_api_bucket_byregion_keyspace:irate1m', - expr: 'sum by(le,region,keyspace)(irate(vtgate_api_bucket[1m]))', + record: 'vitess_mixin:vtgate_api_bucket_by_keyspace:irate1m', + expr: 'sum by(le,keyspace)(irate(vtgate_api_bucket[1m]))', }, ], }, @@ -58,8 +58,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_6', rules: [ { - record: 'vitess_mixin:vtgate_queries_processed_by_region_and_keyspace:irate1m', - expr: 'sum by (region, keyspace) (irate(vtgate_queries_processed_by_table{plan!="Rollback"}[1m]))', + record: 'vitess_mixin:vtgate_queries_processed_by_keyspace:irate1m', + expr: 'sum by (keyspace) (irate(vtgate_queries_processed_by_table{plan!="Rollback"}[1m]))', }, ], }, @@ -67,8 +67,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_7', rules: [ { - record: 'vitess_mixin:vtgate_api_error_counts_byregion:irate1m', - expr: 'sum by(region)(irate(vtgate_api_error_counts[1m]))', + record: 'vitess_mixin:vtgate_api_error_counts:irate1m', + expr: 'sum (irate(vtgate_api_error_counts[1m]))', }, ], }, @@ -76,8 +76,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_8', rules: [ { - record: 'vitess_mixin:vtgate_api_count_byregion:irate1m', - expr: 'sum by(region)(irate(vtgate_api_count[1m]))', + record: 'vitess_mixin:vtgate_api_count:irate1m', + expr: 'sum (irate(vtgate_api_count[1m]))', }, ], }, @@ -85,8 +85,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_9', rules: [ { - record: 'vitess_mixin:vtgate_api_error_counts_byregion_keyspace:irate1m', - expr: 'sum by(region,keyspace)(irate(vtgate_api_error_counts[1m]))', + record: 'vitess_mixin:vtgate_api_error_counts_by_keyspace:irate1m', + expr: 'sum by(keyspace)(irate(vtgate_api_error_counts[1m]))', }, ], }, @@ -94,8 +94,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_10', rules: [ { - record: 'vitess_mixin:vtgate_api_count_byregion_keyspace:irate1m', - expr: 'sum by(region,keyspace)(irate(vtgate_api_count[1m]))', + record: 'vitess_mixin:vtgate_api_count_by_keyspace:irate1m', + expr: 'sum by(keyspace)(irate(vtgate_api_count[1m]))', }, ], }, @@ -103,8 +103,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_11', rules: [ { - record: 'vitess_mixin:mysql_global_status_slow_queries_byregion_keyspace_shard:irate1m', - expr: 'sum by(region,keyspace,shard)(irate(mysql_global_status_slow_queries[1m]))', + record: 'vitess_mixin:mysql_global_status_slow_queries_by_keyspace_shard:irate1m', + expr: 'sum by(keyspace,shard)(irate(mysql_global_status_slow_queries[1m]))', }, ], }, @@ -112,8 +112,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_12', rules: [ { - record: 'vitess_mixin:vttablet_kills_byregion_keyspace_shard:irate1m', - expr: 'sum by (region,keyspace,shard)(irate(vttablet_kills[1m]))', + record: 'vitess_mixin:vttablet_kills_by_keyspace_shard:irate1m', + expr: 'sum by (keyspace,shard)(irate(vttablet_kills[1m]))', }, ], }, @@ -130,8 +130,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_14', rules: [ { - record: 'vitess_mixin:vtgate_api_error_counts_byregion_db_type:irate1m', - expr: 'sum by(region,db_type)(irate(vtgate_api_error_counts[1m]))', + record: 'vitess_mixin:vtgate_api_error_counts_by_db_type:irate1m', + expr: 'sum by(db_type)(irate(vtgate_api_error_counts[1m]))', }, ], }, @@ -139,8 +139,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_15', rules: [ { - record: 'vitess_mixin:vtgate_api_count_byregion_db_type:irate1m', - expr: 'sum by(region,db_type)(irate(vtgate_api_count[1m]))', + record: 'vitess_mixin:vtgate_api_count_by_db_type:irate1m', + expr: 'sum by(db_type)(irate(vtgate_api_count[1m]))', }, ], }, @@ -148,8 +148,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_16', rules: [ { - record: 'vitess_mixin:vtgate_api_bucket_byregion_db_type:irate1m', - expr: 'sum by(le,region,db_type)(irate(vtgate_api_bucket[1m]))', + record: 'vitess_mixin:vtgate_api_bucket_by_db_type:irate1m', + expr: 'sum by(le,db_type)(irate(vtgate_api_bucket[1m]))', }, ], }, @@ -157,8 +157,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_17', rules: [ { - record: 'vitess_mixin:vtgate_queries_processed_byregion_keyspace_table:irate1m', - expr: 'sum(irate(vtgate_queries_processed_by_table[1m])) by (region,keyspace,table)', + record: 'vitess_mixin:vtgate_queries_processed_by_keyspace_table:irate1m', + expr: 'sum(irate(vtgate_queries_processed_by_table[1m])) by (keyspace,table)', }, ], }, @@ -166,8 +166,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_18', rules: [ { - record: 'vitess_mixin:vtgate_queries_processed_byregion_keyspace_table_plan:irate1m', - expr: 'sum(irate(vtgate_queries_processed_by_table[1m])) by (region,keyspace,table,plan)', + record: 'vitess_mixin:vtgate_queries_processed_by_keyspace_table_plan:irate1m', + expr: 'sum(irate(vtgate_queries_processed_by_table[1m])) by (keyspace,table,plan)', }, ], }, @@ -175,8 +175,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_19', rules: [ { - record: 'vitess_mixin:vtgate_api_error_counts_byregion_operation:irate1m', - expr: 'sum by(region,operation)(irate(vtgate_api_error_counts[1m]))', + record: 'vitess_mixin:vtgate_api_error_counts_by_operation:irate1m', + expr: 'sum by(operation)(irate(vtgate_api_error_counts[1m]))', }, ], }, @@ -184,8 +184,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_20', rules: [ { - record: 'vitess_mixin:vtgate_api_error_counts_byregion_code:irate1m', - expr: 'sum by(region,code)(irate(vtgate_api_error_counts[1m]))', + record: 'vitess_mixin:vtgate_api_error_counts_by_code:irate1m', + expr: 'sum by(code)(irate(vtgate_api_error_counts[1m]))', }, ], }, @@ -193,8 +193,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_21', rules: [ { - record: 'vitess_mixin:process_start_time_seconds_byregion_job:sum5m', - expr: 'sum by (region,job) (changes (process_start_time_seconds[5m]))', + record: 'vitess_mixin:process_start_time_seconds_by_job:sum5m', + expr: 'sum by (job) (changes (process_start_time_seconds[5m]))', }, ], }, @@ -202,8 +202,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_22', rules: [ { - record: 'vitess_mixin:vttablet_query_counts_byregion_keyspace_table:irate1m', - expr: 'sum by(region,keyspace,table)(irate(vttablet_query_counts[1m]))', + record: 'vitess_mixin:vttablet_query_counts_by_keyspace_table:irate1m', + expr: 'sum by(keyspace,table)(irate(vttablet_query_counts[1m]))', }, ], }, @@ -211,8 +211,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_23', rules: [ { - record: 'vitess_mixin:vttablet_query_counts_byregion_keyspace_table_plan:irate1m', - expr: 'sum by(region,keyspace,table,plan)(irate(vttablet_query_counts[1m]))', + record: 'vitess_mixin:vttablet_query_counts_by_keyspace_table_plan:irate1m', + expr: 'sum by(keyspace,table,plan)(irate(vttablet_query_counts[1m]))', }, ], }, @@ -220,8 +220,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_24', rules: [ { - record: 'vitess_mixin:vttablet_errors_byregion_keyspace:irate1m', - expr: 'sum by(region,keyspace)(irate(vttablet_errors[1m]))', + record: 'vitess_mixin:vttablet_errors_by_keyspace:irate1m', + expr: 'sum by(keyspace)(irate(vttablet_errors[1m]))', }, ], }, @@ -229,8 +229,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_25', rules: [ { - record: 'vitess_mixin:vttablet_query_counts_byregion_keyspace:irate1m', - expr: 'sum by(region,keyspace)(irate(vttablet_query_counts[1m]))', + record: 'vitess_mixin:vttablet_query_counts_by_keyspace:irate1m', + expr: 'sum by(keyspace)(irate(vttablet_query_counts[1m]))', }, ], }, @@ -238,8 +238,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_26', rules: [ { - record: 'vitess_mixin:vttablet_query_error_counts_byregion_keyspace_table:irate1m', - expr: 'sum by(region,keyspace,table)(irate(vttablet_query_error_counts[1m]))', + record: 'vitess_mixin:vttablet_query_error_counts_by_keyspace_table:irate1m', + expr: 'sum by(keyspace,table)(irate(vttablet_query_error_counts[1m]))', }, ], }, @@ -247,8 +247,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_27', rules: [ { - record: 'vitess_mixin:vttablet_query_error_counts_byregion_keyspace_table_plan:irate1m', - expr: 'sum by(region,keyspace,table,plan)(irate(vttablet_query_error_counts[1m]))', + record: 'vitess_mixin:vttablet_query_error_counts_by_keyspace_table_plan:irate1m', + expr: 'sum by(keyspace,table,plan)(irate(vttablet_query_error_counts[1m]))', }, ], }, @@ -256,8 +256,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_28', rules: [ { - record: 'vitess_mixin:vttablet_query_error_counts_byregion_keyspace_table_shard:irate1m', - expr: 'sum by(region,keyspace,table,shard)(irate(vttablet_query_error_counts[1m]))', + record: 'vitess_mixin:vttablet_query_error_counts_by_keyspace_table_shard:irate1m', + expr: 'sum by(keyspace,table,shard)(irate(vttablet_query_error_counts[1m]))', }, ], }, @@ -265,8 +265,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_29', rules: [ { - record: 'vitess_mixin:vttablet_query_row_counts_byregion_keyspace_table:rate1m', - expr: 'sum by(region,keyspace,table)(rate(vttablet_query_row_counts[1m]))', + record: 'vitess_mixin:vttablet_query_row_counts_by_keyspace_table:rate1m', + expr: 'sum by(keyspace,table)(rate(vttablet_query_row_counts[1m]))', }, ], }, @@ -274,8 +274,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_30', rules: [ { - record: 'vitess_mixin:vttablet_query_row_counts_byregion_keyspace_table_plan:rate1m', - expr: 'sum by(region,keyspace,table,plan)(rate(vttablet_query_row_counts[1m]))', + record: 'vitess_mixin:vttablet_query_row_counts_by_keyspace_table_plan:rate1m', + expr: 'sum by(keyspace,table,plan)(rate(vttablet_query_row_counts[1m]))', }, ], }, @@ -283,8 +283,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_31', rules: [ { - record: 'vitess_mixin:vttablet_query_row_counts_byregion_keyspace_table_shard:rate1m', - expr: 'sum by(region,keyspace,table,shard)(rate(vttablet_query_row_counts[1m]))', + record: 'vitess_mixin:vttablet_query_row_counts_by_keyspace_table_shard:rate1m', + expr: 'sum by(keyspace,table,shard)(rate(vttablet_query_row_counts[1m]))', }, ], }, @@ -292,8 +292,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_32', rules: [ { - record: 'vitess_mixin:vttablet_queries_sum_byregion_keyspace:rate1m', - expr: 'sum by(region,keyspace)(rate(vttablet_queries_sum[1m]))', + record: 'vitess_mixin:vttablet_queries_sum_by_keyspace:rate1m', + expr: 'sum by(keyspace)(rate(vttablet_queries_sum[1m]))', }, ], }, @@ -301,8 +301,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_33', rules: [ { - record: 'vitess_mixin:vttablet_queries_count_byregion_keyspace:rate1m', - expr: 'sum by(region,keyspace)(rate(vttablet_queries_count[1m]))', + record: 'vitess_mixin:vttablet_queries_count_by_keyspace:rate1m', + expr: 'sum by(keyspace)(rate(vttablet_queries_count[1m]))', }, ], }, @@ -310,8 +310,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_34', rules: [ { - record: 'vitess_mixin:vttablet_queries_sum_byregion_keyspace_shard:rate1m', - expr: 'sum by(region,keyspace,shard)(rate(vttablet_queries_sum[1m]))', + record: 'vitess_mixin:vttablet_queries_sum_by_keyspace_shard:rate1m', + expr: 'sum by(keyspace,shard)(rate(vttablet_queries_sum[1m]))', }, ], }, @@ -319,8 +319,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_35', rules: [ { - record: 'vitess_mixin:vttablet_queries_count_byregion_keyspace_shard:rate1m', - expr: 'sum by(region,keyspace,shard)(rate(vttablet_queries_count[1m]))', + record: 'vitess_mixin:vttablet_queries_count_by_keyspace_shard:rate1m', + expr: 'sum by(keyspace,shard)(rate(vttablet_queries_count[1m]))', }, ], }, @@ -328,8 +328,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_36', rules: [ { - record: 'vitess_mixin:vttablet_queries_bucket_byregion_keyspace:rate1m', - expr: 'sum by(region,keyspace,le)(rate(vttablet_queries_bucket[1m]))', + record: 'vitess_mixin:vttablet_queries_bucket_by_keyspace:rate1m', + expr: 'sum by(keyspace,le)(rate(vttablet_queries_bucket[1m]))', }, ], }, @@ -337,8 +337,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_37', rules: [ { - record: 'vitess_mixin:vttablet_queries_bucket_byregion_keyspace_shard:rate1m', - expr: 'sum by(region,keyspace,shard,le)(rate(vttablet_queries_bucket[1m]))', + record: 'vitess_mixin:vttablet_queries_bucket_by_keyspace_shard:rate1m', + expr: 'sum by(keyspace,shard,le)(rate(vttablet_queries_bucket[1m]))', }, ], }, @@ -346,8 +346,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_38', rules: [ { - record: 'vitess_mixin:vttablet_transactions_sum_byregion_keyspace:rate1m', - expr: 'sum by(region,keyspace)(rate(vttablet_transactions_sum[1m]))', + record: 'vitess_mixin:vttablet_transactions_sum_by_keyspace:rate1m', + expr: 'sum by(keyspace)(rate(vttablet_transactions_sum[1m]))', }, ], }, @@ -355,8 +355,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_39', rules: [ { - record: 'vitess_mixin:vttablet_transactions_count_byregion_keyspace:rate1m', - expr: 'sum by(region,keyspace)(rate(vttablet_transactions_count[1m]))', + record: 'vitess_mixin:vttablet_transactions_count_by_keyspace:rate1m', + expr: 'sum by(keyspace)(rate(vttablet_transactions_count[1m]))', }, ], }, @@ -364,8 +364,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_40', rules: [ { - record: 'vitess_mixin:vttablet_transactions_sum_byregion_keyspace_shard:rate1m', - expr: 'sum by(region,keyspace,shard)(rate(vttablet_transactions_sum[1m]))', + record: 'vitess_mixin:vttablet_transactions_sum_by_keyspace_shard:rate1m', + expr: 'sum by(keyspace,shard)(rate(vttablet_transactions_sum[1m]))', }, ], }, @@ -373,8 +373,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_41', rules: [ { - record: 'vitess_mixin:vttablet_transactions_count_byregion_keyspace_shard:rate1m', - expr: 'sum by(region,keyspace,shard)(rate(vttablet_transactions_count[1m]))', + record: 'vitess_mixin:vttablet_transactions_count_by_keyspace_shard:rate1m', + expr: 'sum by(keyspace,shard)(rate(vttablet_transactions_count[1m]))', }, ], }, @@ -382,8 +382,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_42', rules: [ { - record: 'vitess_mixin:vttablet_transactions_bucket_byregion_keyspace:rate1m', - expr: 'sum by(region,keyspace,le)(rate(vttablet_transactions_bucket[1m]))', + record: 'vitess_mixin:vttablet_transactions_bucket_by_keyspace:rate1m', + expr: 'sum by(keyspace,le)(rate(vttablet_transactions_bucket[1m]))', }, ], }, @@ -391,8 +391,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_43', rules: [ { - record: 'vitess_mixin:vttablet_transactions_bucket_byregion_keyspace_shard:rate1m', - expr: 'sum by(region,keyspace,shard,le)(rate(vttablet_transactions_bucket[1m]))', + record: 'vitess_mixin:vttablet_transactions_bucket_by_keyspace_shard:rate1m', + expr: 'sum by(keyspace,shard,le)(rate(vttablet_transactions_bucket[1m]))', }, ], }, @@ -400,8 +400,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_44', rules: [ { - record: 'vitess_mixin:process_start_time_seconds_byregion_keyspace_shard_job:sum5m', - expr: 'sum by (region,keyspace,shard,job) (changes (process_start_time_seconds[5m]))', + record: 'vitess_mixin:process_start_time_seconds_by_keyspace_shard_job:sum5m', + expr: 'sum by (keyspace,shard,job) (changes (process_start_time_seconds[5m]))', }, ], }, @@ -409,8 +409,8 @@ local config = import '../config.libsonnet'; name: 'vitess_mixin_45', rules: [ { - record: 'vitess_mixin:process_start_time_seconds_byregion_instance_job:sum5m', - expr: 'sum by (region,instance,job) (changes (process_start_time_seconds[5m]))', + record: 'vitess_mixin:process_start_time_seconds_by_instance_job:sum5m', + expr: 'sum by (instance,job) (changes (process_start_time_seconds[5m]))', }, ], }, @@ -419,7 +419,7 @@ local config = import '../config.libsonnet'; rules: [ { record: 'vitess_mixin:vttablet_kills:irate1m', - expr: 'sum by(keyspace,shard,instance,region)(irate(vttablet_kills[1m]))', + expr: 'sum by(keyspace,shard,instance)(irate(vttablet_kills[1m]))', }, ], }, @@ -428,7 +428,7 @@ local config = import '../config.libsonnet'; rules: [ { record: 'vitess_mixin:vttablet_errors:irate1m', - expr: 'sum by(keyspace,shard,instance,error_code,region)(irate(vttablet_errors[1m]))', + expr: 'sum by(keyspace,shard,instance,error_code)(irate(vttablet_errors[1m]))', }, ], }, @@ -437,7 +437,7 @@ local config = import '../config.libsonnet'; rules: [ { record: 'vitess_mixin:vtgate_queries_processed_by_table:irate1m', - expr: 'sum by(keyspace, plan, table, region) (irate(vtgate_queries_processed_by_table{plan!="Rollback"}[1m]))', + expr: 'sum by(keyspace,plan,table) (irate(vtgate_queries_processed_by_table{plan!="Rollback"}[1m]))', }, ], },