Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Grafana Dashboard definitions #983

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

robiiinos
Copy link
Contributor

Wanted to have better overview of my Ponder instances and discovered that there was a Prometheus and Grafana setup available (there seems not to be mentioned anywhere in the README or the documentation, TO-DO?) and successfully managed to setup instances and data ingestion on Railway (after a quite long fail-and-retry process).

Noticed a bunch of graph's were out-of-date and using deprecated and/or renamed fields exposed on the /metrics endpoint. Documentation make it well-aware that this is not the final API, but I found it quite helpful to have a bunch of definitions to quickstart everything, so I went ahead and updated all graph's as required.

There is still a bunch of things to address before this can be merged, I've added comment's where input is appreciated.

@@ -38,14 +38,15 @@
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
"uid": "Prometheus"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to align the UID set in the prometheus.yml file in the configuration, instead of the custom UID set on Dashboard creation

},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are new fields set as default per Grafana

Comment on lines -125 to +127
"expr": "histogram_quantile(0.9, max by(le, method) (increase(ponder_database_method_duration_bucket{service=\"admin\"}[$__rate_interval])))",
"expr": "histogram_quantile(0.9, max by(le, method) (increase(ponder_database_method_duration_bucket{service=\"internal\"}[$__rate_interval])))",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Service admin is now internal for setup, migrateSyncStore, publish, updateFinalizedCheckpoint, and createIndexes

"editorMode": "code",
"exemplar": false,
"expr": "histogram_quantile(0.95, ponder_realtime_rpc_request_duration_bucket)",
"expr": "histogram_quantile(0.95, max by(le, method) (increase(ponder_rpc_request_duration_bucket[$__rate_interval])))",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed field in the /metrics endpoint

"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "Prometheus"
},
"editorMode": "builder",
"expr": "ponder_realtime_latest_block_number",
"expr": "ponder_realtime_latest_block_number{network=\"$networks\"}",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added filter parameter (re-used the one already set on ponder_realtime_latest_block_timestamp)

@@ -1040,7 +1085,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "histogram_quantile(0.5, ponder_historical_rpc_request_duration_bucket)",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

historical is no longer available on the /metrics endpoint, what to do? delete?
These are under a Historical section on the Dashboard, and they're already available for the Live section

@@ -1114,7 +1164,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "histogram_quantile(0.95, ponder_historical_rpc_request_duration_bucket)",
"expr": "histogram_quantile(0.95, ponder_rpc_request_duration_bucket)",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All other fields are renamed fields still available and exposed by Ponder, and default Grafana updates

@robiiinos robiiinos marked this pull request as ready for review July 20, 2024 14:13
@robiiinos
Copy link
Contributor Author

Here's an overview of the dashboard with fixed graph's

Screenshot 2024-07-21 at 12 33 38 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant