autonomys / subspace

Subspace Network reference implementation
https://subspace.network
368 stars 241 forks source link

request to add data points to node/farmer metrics endpoint #2577

Open irbujam opened 6 months ago

irbujam commented 6 months ago

I was looking at the node metrics endpoint based on feb19 version and can't seem to find some information that may be helpful to report on the monitoring tool. Can this information be added please?

Data points requested: 1) node and farmer running version number 2) node current synced block number 3) node highest block number 4) farmer separation of replots count and sum instead of accumulation under "subspace_farmer_sector_plotting_time_seconds/counts"

nazar-pc commented 6 months ago

For 4 I'm not sure what you want exactly, but I think sectors_total is what you want.

For others - yes, they are not present, but look reasonable. Ideally synced block number and best seen block would be presented by Substrate itself, could you create an issue in https://github.com/paritytech/polkadot-sdk about this? For the rest PRs are welcome!

irbujam commented 6 months ago

4 - when the disk is plotted fully initially the data under subspace_farmer_sector_plotting_time_seconds_count and subspace_farmer_sector_plotting_time_seconds_sum together with subspace_farmer_sector_plotted_counter_sectors_total provides a way to effectively calculate the ETA, however for replots the same headers are being used to accumulate completed sectors and time and the differentiation does not seem available for replots to calculate eta for replots alone

nazar-pc commented 6 months ago

Metrics are not really designed to generate ETA directly. If you want that, you can probably track changes of values of different metrics in the app over time and use that to calculate ETA somehow.