solana/metrics
Ryo Onodera 865c42465a
Cap file size for snapshot data files (#7182)
* save limit deserialize

* save

* Save

* Clean up

* rustfmt

* rustfmt

* Just comment out to please CI

* Fix ci...

* Move code

* Rustfmt

* Crean up control flow

* Add another comment

* Introduce predetermined constant limit on snapshot data files (deserialize side)

* Introduce predetermined constant limit on snapshot data files (serialize side)

* rustfmt

* Tweak message

* Revert dynamic memory limit

* Limit size of snapshot data file (de)serialization

* Fix test breakage

* Clean up

* Fix uses formatting

* Rename: deserialize_{for,from}_snapshot

* Simplify comment

* Use Slot

* Provide slot for status cache

* Align variable name with snapshot_status_cache_file_path

* Define serialize_snapshot_data_file_with_metrics

* Fix build.......

* De-marco serialize_snapshot_data_file_with_metrics

* Revert u64 => Slot
2020-01-10 09:49:36 +09:00
..
scripts Cap file size for snapshot data files (#7182) 2020-01-10 09:49:36 +09:00
src Bump reqwest from 0.9.24 to 0.10.0 (#7642) 2020-01-08 13:31:43 -07:00
.gitignore tmp dirs target to farf (#5079) 2019-07-12 18:28:42 -07:00
Cargo.toml Bump reqwest from 0.10.0 to 0.10.1 (#7731) 2020-01-09 17:10:55 -07:00
README.md Inline metrics/scripts dependencies 2019-06-13 10:00:24 -07:00
create-metrics-tarball.sh Add infra to publish metrics tarball 2019-06-13 10:00:24 -07:00
grafcli.conf Move testnet metrics dashboard management out of the Grafana UI 2018-11-25 16:10:25 -08:00
publish-metrics-dashboard.sh Inline metrics/scripts dependencies 2019-06-13 10:00:24 -07:00

README.md

Metrics

Testnet Grafana Dashboard

There are three versions of the testnet dashboard, corresponding to the three release channels:

The dashboard for each channel is defined from the metrics/testnet-monitor.json source file in the git branch associated with that channel, and deployed by automation running ci/publish-metrics-dashboard.sh.

A deploy can be triggered at any time via the New Build button of https://buildkite.com/solana-labs/publish-metrics-dashboard.

Modifying a Dashboard

Dashboard updates are accomplished by modifying metrics/scripts/grafana-provisioning/dashboards/testnet-monitor.json, manual edits made directly in Grafana will be overwritten.

  • Check out metrics to add at https://metrics.solana.com:8888/ in the data explorer.
  • When editing a query for a dashboard graph, use the "Toggle Edit Mode" selection behind the hamburger button to use raw SQL and copy the query into the text field. You may have to fixup the query with the dashboard variables like $testnet or $timeFilter, check other functioning fields in the dashboard for examples.
  1. Open the desired dashboard in Grafana
  2. Create a development copy of the dashboard by selecting Save As.. in the Settings menu for the dashboard
  3. Edit dashboard as desired
  4. Extract the JSON Model by selecting JSON Model in the Settings menu. Copy the JSON to the clipboard and paste into metrics/scripts/grafana-provisioning/dashboards/testnet-monitor.json,
  5. Delete your development dashboard: Settings => Delete

Deploying a Dashboard Manually

If you need to immediately deploy a dashboard using the contents of testnet-monitor.json in your local workspace,

$ export GRAFANA_API_TOKEN="an API key from https://metrics.solana.com:3000/org/apikeys"
$ metrics/publish-metrics-dashboard.sh (edge|beta|stable)

Note that automation will eventually overwrite your manual deploy.