Skip to content

Commit

Permalink
fix(metrics): rename tendermint -> cometbft
Browse files Browse the repository at this point in the history
Updates the generated CometBFT config to use the "cometbft" namespace
for emitted metrics. Accordingly, updates the Grafana panels that
incorporate those metrics.

Also attempts to make the grafana panels more legible, by bundling up the pd &
cometbft scrape points into a single job, either "Fullnode" or
"Validator". We'll still have the ability to discriminate by "instance"
which includes the address scraped, e.g. "penumbra-testnet-fn-0:9000"
for pd.
  • Loading branch information
conorsch committed Feb 6, 2024
1 parent 06568d7 commit ecf10d5
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 36 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,8 @@ jobs:
export HELM_RELEASE='penumbra-preview'
./ci.sh
- name: bounce metrics
run: kubectl rollout restart deployment penumbra-preview-metrics

- name: bounce grpcui
run: kubectl rollout restart deployment grpcui-preview
32 changes: 12 additions & 20 deletions deployments/charts/penumbra-metrics/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,29 @@ data:
editable: false
prometheus_scrape_configs: |
scrape_configs:
{{ $count := (.Values.scrape_configs.numFullNodes | int) }}
{{ range $i,$e := until $count }}
{{ $fn_name := printf $.Values.scrape_configs.fmtFullNodeSvc $i }}
- job_name: 'Tendermint Fullnode {{ $i }}'
- job_name: 'Penumbra Fullnode'
scrape_interval: 10s
scheme: http
metrics_path: metrics
static_configs:
- targets: ['{{ $fn_name }}:26660']
{{ $count := (.Values.scrape_configs.numFullNodes | int) }}
{{ range $i,$e := until $count }}
- targets:
{{ $fn_name := printf $.Values.scrape_configs.fmtFullNodeSvc $i }}
- '{{ $fn_name }}:9000'
- '{{ $fn_name }}:26660'
{{ end }}

- job_name: 'Penumbra Daemon Fullnode {{ $i }}'
- job_name: 'Penumbra Validator'
scrape_interval: 10s
scheme: http
metrics_path: metrics
static_configs:
- targets: ['{{ $fn_name }}:9000']
{{ end }}
- targets:
{{ $count := (.Values.scrape_configs.numValidators | int) }}
{{ range $i,$e := until $count }}
{{ $val_name := printf $.Values.scrape_configs.fmtValidatorSvc $i }}
- job_name: 'Tendermint Validator {{ $i }}'
scrape_interval: 10s
scheme: http
metrics_path: metrics
static_configs:
- targets: ['{{ $val_name }}:26660']
- job_name: 'Penumbra Daemon Validator {{ $i }}'
scrape_interval: 10s
scheme: http
metrics_path: metrics
static_configs:
- targets: ['{{ $val_name }}:9000']
- '{{ $val_name }}:9000'
- '{{ $val_name }}:26660'
{{ end }}
12 changes: 6 additions & 6 deletions deployments/config/grafana/dashboards/ABCI.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "sum(rate(tendermint_abci_connection_method_timing_seconds_count[5m])) by (method)",
"expr": "sum(rate(cometbft_abci_connection_method_timing_seconds_count[5m])) by (method)",
"refId": "A"
}
],
Expand Down Expand Up @@ -255,7 +255,7 @@
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "histogram_quantile(0.95, sum by(le) (rate(tendermint_abci_connection_method_timing_seconds_bucket{method=\"begin_block\"}[5m])))",
"expr": "histogram_quantile(0.95, sum by(le) (rate(cometbft_abci_connection_method_timing_seconds_bucket{method=\"begin_block\"}[5m])))",
"range": true,
"refId": "A"
},
Expand All @@ -264,7 +264,7 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "histogram_quantile(0.5, sum by(le) (rate(tendermint_abci_connection_method_timing_seconds_bucket{method=\"begin_block\"}[5m])))",
"expr": "histogram_quantile(0.5, sum by(le) (rate(cometbft_abci_connection_method_timing_seconds_bucket{method=\"begin_block\"}[5m])))",
"hide": false,
"refId": "B"
}
Expand Down Expand Up @@ -353,7 +353,7 @@
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "histogram_quantile(0.95, sum by(le) (rate(tendermint_abci_connection_method_timing_seconds_bucket{method=\"deliver_tx\"}[5m])))",
"expr": "histogram_quantile(0.95, sum by(le) (rate(cometbft_abci_connection_method_timing_seconds_bucket{method=\"deliver_tx\"}[5m])))",
"range": true,
"refId": "A"
}
Expand Down Expand Up @@ -442,7 +442,7 @@
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "histogram_quantile(0.95, sum by(le) (rate(tendermint_abci_connection_method_timing_seconds_bucket{method=\"end_block\"}[5m])))",
"expr": "histogram_quantile(0.95, sum by(le) (rate(cometbft_abci_connection_method_timing_seconds_bucket{method=\"end_block\"}[5m])))",
"range": true,
"refId": "A"
}
Expand Down Expand Up @@ -531,7 +531,7 @@
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "histogram_quantile(0.95, sum by(le) (rate(tendermint_abci_connection_method_timing_seconds_bucket{method=\"commit\"}[5m])))",
"expr": "histogram_quantile(0.95, sum by(le) (rate(cometbft_abci_connection_method_timing_seconds_bucket{method=\"commit\"}[5m])))",
"range": true,
"refId": "A"
}
Expand Down
8 changes: 4 additions & 4 deletions deployments/config/grafana/dashboards/Consensus.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "tendermint_consensus_missing_validators",
"expr": "cometbft_consensus_missing_validators",
"legendFormat": "Missing Validators",
"range": true,
"refId": "A"
Expand All @@ -150,7 +150,7 @@
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "tendermint_consensus_validators",
"expr": "cometbft_consensus_validators",
"hide": false,
"legendFormat": "Validators",
"range": true,
Expand Down Expand Up @@ -240,7 +240,7 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "rate(tendermint_consensus_latest_block_height[5m])",
"expr": "rate(cometbft_consensus_latest_block_height[5m])",
"refId": "A"
}
],
Expand Down Expand Up @@ -326,7 +326,7 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "tendermint_consensus_rounds",
"expr": "cometbft_consensus_rounds",
"refId": "A"
}
],
Expand Down
6 changes: 3 additions & 3 deletions deployments/config/grafana/dashboards/P2P.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "tendermint_p2p_peers",
"expr": "cometbft_p2p_peers",
"refId": "A"
}
],
Expand Down Expand Up @@ -225,15 +225,15 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "sum(rate(tendermint_p2p_peer_send_bytes_total[1m])) by (peer_id)",
"expr": "sum(rate(cometbft_p2p_peer_send_bytes_total[1m])) by (peer_id)",
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "sum(rate(tendermint_p2p_peer_receive_bytes_total[1m])) by(peer_id)",
"expr": "sum(rate(cometbft_p2p_peer_receive_bytes_total[1m])) by(peer_id)",
"hide": false,
"refId": "B"
}
Expand Down
4 changes: 2 additions & 2 deletions deployments/config/grafana/dashboards/sync.json
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "builder",
"expr": "rate(tendermint_consensus_latest_block_height[5m])",
"expr": "rate(cometbft_consensus_latest_block_height[5m])",
"instant": false,
"range": true,
"refId": "A"
Expand Down Expand Up @@ -595,7 +595,7 @@
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "builder",
"expr": "tendermint_consensus_height",
"expr": "cometbft_consensus_height",
"instant": false,
"range": true,
"refId": "A"
Expand Down
2 changes: 1 addition & 1 deletion testnets/cometbft_config_template.toml
Original file line number Diff line number Diff line change
Expand Up @@ -482,4 +482,4 @@ prometheus_listen_addr = ":26660"
max_open_connections = 3

# Instrumentation namespace
namespace = "tendermint"
namespace = "cometbft"

0 comments on commit ecf10d5

Please sign in to comment.