SiaFoundation / hostd

The next-generation of Sia storage providing software. More performant. More stable. Support for larger nodes.
https://sia.tech/software/hostd
MIT License
39 stars 11 forks source link

Prometheus: remove id label on hostd_consensus_state_index #312

Closed bustedware closed 8 months ago

bustedware commented 8 months ago

The id label on hostd_consensus_state_index is breaking continuity with block height panels and was introduced during the refactor. Removing the label will restore continuity.

Screenshot 2024-02-21 173716

n8maninger commented 8 months ago

id is an important piece of consensus information. You can adjust the query to fix it rather than removing the label.

Either

min (hostd_consensus_state_index{})

Screenshot 2024-02-21 at 2 54 57 PM

If you want to separate multiple instances:

min by (name) (hostd_consensus_state_index{})

Screenshot 2024-02-21 at 2 54 34 PM

bustedware commented 8 months ago

@n8maninger if you're just going to remove it, why have it collected? personally, i don't think, I would ever look at that value. not dismissing its important though.

n8maninger commented 8 months ago

@n8maninger if you're just going to remove it, why have it collected? personally, i don't think, I would ever look at that value. not dismissing its important though.

We use it on our dashboard

bustedware commented 8 months ago

@n8maninger can I ask how do you use it in your dashboard? it will help if I understand so I can add to siagrafana. thank you

bustedware commented 8 months ago

@n8maninger something else to consider:

https://last9.io/blog/how-to-manage-high-cardinality-metrics-in-prometheus/

High-label cardinality means that a metric has many unique label combinations. This can have implications for the performance and scalability of Prometheus, as each distinct label combination creates a separate time series in the system. A high cardinality can increase memory usage, CPU usage, longer query times, and higher storage requirements