docs/tutorials/visualizing-node-metrics: Update to Prometheus endpoint#461
Conversation
The Grafana JSON endpoint exposed by Substrate is being removed in favor of a new Prometheus endpoint. This patch updates the docs accordingly.
| As long as you're running a version of Substrate at or after commit | ||
| <!-- TODO: Update commit hash--> | ||
| [`d9ca975`](https://github.com/paritytech/substrate/commit/d9ca9750dba018463d59459a3ee1c03b71ea2d46), |
There was a problem hiding this comment.
This PR is made against the next version of the docs. When we cut a new release, it will be included in that release. Thus there is no need to specify the commit here.
| +-----------+ +-------------+ +---------+ | ||
| | Substrate | | Prometheus | | Grafana | | ||
| +-----------+ +-------------+ +---------+ | ||
| | -----------------\ | | | ||
| | | Every 1 minute |-| | | ||
| | |----------------| | | | ||
| | | | | ||
| | GET current metric values | | | ||
| |<---------------------------------| | | ||
| | | | | ||
| | `substrate_peers_count 5` | | | ||
| |--------------------------------->| | | ||
| | | --------------------------------------------------------------------\ | | ||
| | |-| Save metric value with corresponding time stamp in local database | | | ||
| | | |-------------------------------------------------------------------| | | ||
| | | -------------------------------\ | | ||
| | | | Every time user opens graphs |-| | ||
| | | |------------------------------| | | ||
| | | | | ||
| | | GET values of metric `substrate_peers_count` from time-X to time-Y | | ||
| | |<-------------------------------------------------------------------------| | ||
| | | | | ||
| | | `substrate_peers_count (1582023828, 5), (1582023847, 4) [...]` | | ||
| | |------------------------------------------------------------------------->| | ||
| | | | |
There was a problem hiding this comment.
Maybe some of the designers can help us out with this? @goldsteinsveta
There was a problem hiding this comment.
This is ultimately beautiful, but sure, I'll draw a scheme by the end of Friday
There was a problem hiding this comment.
While I do agree that my diagram has a lot of room for improvement, I also want to emphasize the fact that one has to view it in markdown mode, otherwise tabs will not align properly.
This is ultimately beautiful
❤️
I'll draw a scheme by the end of Friday
🎉 @goldsteinsveta let me know if you need more details. I would expect the content to change a bit in the future, thus in case it is hard to do this in a way that is not easy to adapt, it might make sense to hold off a bit longer?
This patch removes the reference to the commit that introduces the Prometheus metric endpoint.
|
@JoshOrndorff I removed the commit reference.
I am not familiar with the release flow of this repository, so please let me know if I need to target another branch. The corresponding Substrate pull request (paritytech/substrate#4511) merged. Should we go ahead with this one as well? |
|
I think that it should be ok to keep it in |
|
The trade-off here is that node-template will not work with this tutorial unless it is a new version. It will be compatible with the latest substrate node and Polkadot. |
|
It is by design that this update lives only on |
|
@JoshOrndorff yes, that is exactly what we want. The only confusing thing is that there was no versioned doc file for this: https://github.com/substrate-developer-hub/substrate-developer-hub.github.io/tree/source/website/versioned_docs/version-pre-v2.0-3e65111/tutorials EDIT: |
|
I see what you mean now. That's a feature of docusaurus https://docusaurus.io/docs/en/versioning#fallback-functionality I guess that particular tutorial didn't change at all between 1.0 and pre-2.0 |
The Grafana JSON endpoint exposed by Substrate is being removed in favor
of a new Prometheus endpoint. This patch updates the docs accordingly.
Do not merge before corresponding Substrate pull request is merged: paritytech/substrate#4511