Skip to content

Commit

Permalink
scylla-cql: Split the batch statements
Browse files Browse the repository at this point in the history
This patch split the batch statement into two panels, one for the logged
and one for the unlogged.

Fixes scylladb#2081
  • Loading branch information
amnonh committed Nov 6, 2023
1 parent dd71659 commit a3b4906
Showing 1 changed file with 35 additions and 18 deletions.
53 changes: 35 additions & 18 deletions grafana/scylla-cql.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,72 +145,89 @@
"title": "Client CQL new connections by [[by]]",
"description": "Rate of CQL connections created"
},
{
"class": "ops_panel",
"description": "Counts the number of SELECT statements with BYPASS CACHE option",
"span": 3,
"targets": [
{
"expr": "sum(rate(scylla_cql_select_bypass_caches{instance=~\"[[node]]\",cluster=~\"$cluster|$^\", dc=~\"$dc\", shard=~\"[[shard]]\"}[1m])) by ([[by]])",
"format": "time_series",
"hide": false,
"intervalFactor": 2,
"refId": "A"
}
],
"title": "BYPASS CACHE"
},
{
"class": "graph_panel",
"span": 3,
"pointradius": 1,
"targets": [
{
"expr": "sum(rate(scylla_cql_batches{instance=~\"[[node]]\",cluster=~\"$cluster|$^\", dc=~\"$dc\", shard=~\"[[shard]]\"}[1m])) by ([[by]])",
"expr": "sum(rate(scylla_transport_cql_errors_total{instance=~\"[[node]]\",cluster=~\"$cluster|$^\", dc=~\"$dc\", shard=~\"[[shard]]\"}[1m])) by ([[by]],type) >0",
"intervalFactor": 1,
"legendFormat": "",
"metric": "",
"refId": "A",
"step": 30
}
],
"title": "CQL Batches by [[by]]",
"description": "Number of CQL batches command, each batched command is counted once"
"title": "CQL Errors [[by]]",
"description": "CQL errors by type, only active errors are shown",
"dashversion":[">4.4", ">2021.1"]
},
{
"class": "graph_panel",
"span": 3,
"pointradius": 1,
"targets": [
{
"expr": "sum(rate(scylla_cql_statements_in_batches{instance=~\"[[node]]\",cluster=~\"$cluster|$^\", dc=~\"$dc\", shard=~\"[[shard]]\"}[1m])) by ([[by]])",
"expr": "sum(rate(scylla_cql_batches_pure_logged{instance=~\"[[node]]\",cluster=~\"$cluster|$^\", dc=~\"$dc\", shard=~\"[[shard]]\"}[1m])) by ([[by]])",
"intervalFactor": 1,
"legendFormat": "",
"metric": "",
"refId": "A",
"step": 30
}
],
"title": "CQL Command In Batches by [[by]]",
"description": "Number of CQL command batched. Each batch would add the number of commands inside the batch"
"title": "CQL Logged Batches by [[by]]",
"description": "Number of Logged CQL batches command, each batched command is counted once.\n\nIs used to make sure that multiple mutations across multiple partitions happen atomically, that is, all the included mutations will eventually succeed. However, there is a performance penalty imposed by atomicity guarantee."
},
{
"class": "ops_panel",
"description": "Counts the number of SELECT statements with BYPASS CACHE option",
"class": "graph_panel",
"span": 3,
"pointradius": 1,
"targets": [
{
"expr": "sum(rate(scylla_cql_select_bypass_caches{instance=~\"[[node]]\",cluster=~\"$cluster|$^\", dc=~\"$dc\", shard=~\"[[shard]]\"}[1m])) by ([[by]])",
"format": "time_series",
"hide": false,
"intervalFactor": 2,
"refId": "A"
"expr": "sum(rate(scylla_cql_batches_pure_unlogged{instance=~\"[[node]]\",cluster=~\"$cluster|$^\", dc=~\"$dc\", shard=~\"[[shard]]\"}[1m])) by ([[by]])",
"intervalFactor": 1,
"legendFormat": "",
"metric": "",
"refId": "A",
"step": 30
}
],
"title": "BYPASS CACHE"
"title": "CQL Unlogged Batches by [[by]]",
"description": "Number of CQL batches command, each batched command is counted once.\n\nIs generally used to group mutations for a single partition and do not suffer from the performance penalty imposed by logged batches, but there is no atomicity guarantee for multi-partition updates."
},
{
"class": "graph_panel",
"span": 3,
"pointradius": 1,
"targets": [
{
"expr": "sum(rate(scylla_transport_cql_errors_total{instance=~\"[[node]]\",cluster=~\"$cluster|$^\", dc=~\"$dc\", shard=~\"[[shard]]\"}[1m])) by ([[by]],type) >0",
"expr": "sum(rate(scylla_cql_statements_in_batches{instance=~\"[[node]]\",cluster=~\"$cluster|$^\", dc=~\"$dc\", shard=~\"[[shard]]\"}[1m])) by ([[by]])",
"intervalFactor": 1,
"legendFormat": "",
"metric": "",
"refId": "A",
"step": 30
}
],
"title": "CQL Errors [[by]]",
"description": "CQL errors by type, only active errors are shown",
"dashversion":[">4.4", ">2021.1"]
"title": "CQL Command In Batches by [[by]]",
"description": "Number of CQL command batched. Each batch would add the number of commands inside the batch"
},
{
"class": "graph_panel",
Expand Down

0 comments on commit a3b4906

Please sign in to comment.