forked from TrueCloudLab/frostfs-node
[#424] morph: Fix cache metrics
Use separate morph cache metrics for node and IR Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
4449006862
commit
26b305f82b
5 changed files with 17 additions and 8 deletions
|
@ -12,6 +12,7 @@ const (
|
|||
innerRingSubsystem = "ir"
|
||||
innerRingLabelSuccess = "success"
|
||||
innerRingLabelType = "type"
|
||||
innerRingNamespace = "frostfs_ir"
|
||||
)
|
||||
|
||||
// InnerRingServiceMetrics contains metrics collected by inner ring.
|
||||
|
@ -26,19 +27,19 @@ type InnerRingServiceMetrics struct {
|
|||
func NewInnerRingMetrics() *InnerRingServiceMetrics {
|
||||
var (
|
||||
epoch = metrics.NewGauge(prometheus.GaugeOpts{
|
||||
Namespace: namespace,
|
||||
Namespace: innerRingNamespace,
|
||||
Subsystem: innerRingSubsystem,
|
||||
Name: "epoch",
|
||||
Help: "Current epoch as seen by inner-ring node.",
|
||||
})
|
||||
health = metrics.NewGauge(prometheus.GaugeOpts{
|
||||
Namespace: namespace,
|
||||
Namespace: innerRingNamespace,
|
||||
Subsystem: innerRingSubsystem,
|
||||
Name: "health",
|
||||
Help: "Current inner-ring node state.",
|
||||
})
|
||||
eventDuration = metrics.NewHistogramVec(prometheus.HistogramOpts{
|
||||
Namespace: namespace,
|
||||
Namespace: innerRingNamespace,
|
||||
Subsystem: innerRingSubsystem,
|
||||
Name: "event_duration_seconds",
|
||||
Help: "Duration of processing of inner-ring events",
|
||||
|
@ -49,7 +50,7 @@ func NewInnerRingMetrics() *InnerRingServiceMetrics {
|
|||
epoch: epoch,
|
||||
health: health,
|
||||
eventDuration: eventDuration,
|
||||
morphCacheMetrics: newMorphCacheMetrics(),
|
||||
morphCacheMetrics: newMorphCacheMetrics(innerRingNamespace),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue