Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

add metrics for zone failover mgr #156

Merged
merged 2 commits into from
Apr 21, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions common/metrics/defs.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ const (
// MetadataUpdateStoreExtentReplicaStatsScope defines scope for an operation on metadata
MetadataUpdateStoreExtentReplicaStatsScope

// -- Operation scopes for ZoneFailoverManager (common) --
ZoneFailoverMgrScope

// -- Operation scopes for InputHost --

// OpenPublisherStreamScope represents OpenPublisherStream API
Expand Down Expand Up @@ -509,6 +512,8 @@ var scopeDefs = map[ServiceIdx]map[int]scopeDefinition{
MetadataUpdateExtentStatsScope: {operation: "MetadataUpdateExtentStats"},
MetadataUpdateHostInfoScope: {operation: "MetadataUpdateHostInfo"},
MetadataUpdateStoreExtentReplicaStatsScope: {operation: "MetadataUpdateStoreExtentReplicaStats"},

ZoneFailoverMgrScope: {operation: "ZoneFailoverMgr"},
},

// Frontend operation tag values as seen by the Metrics backend
Expand Down Expand Up @@ -668,6 +673,15 @@ const (
// MetadataLatency is the latency of requests to metadata
MetadataLatency

// ZoneFailoverMgrRunSuccess indicates a success run
ZoneFailoverMgrRunSuccess
// ZoneFailoverMgrRunFailToDetectActiveZone indicates failure to detect active zone
ZoneFailoverMgrRunFailToDetectActiveZone
// ZoneFailoverMgrRunFailToWriteMetadata indicates failure to write metadata
ZoneFailoverMgrRunFailToWriteMetadata
// ZoneFailoverMgrRunFailToWriteMetadata indicates a failed run
ZoneFailoverMgrRunFailure

// --Inputhost metrics -- //

// InputhostRequests indicates the request count for inputhost
Expand Down Expand Up @@ -1079,9 +1093,13 @@ var metricDefs = map[ServiceIdx]map[int]metricDefinition{

// definition for Common metrics (for all services)
Common: {
MetadataRequests: {Counter, "metadata.requests"},
MetadataFailures: {Counter, "metadata.failures"},
MetadataLatency: {Timer, "metadata.latency"},
MetadataRequests: {Counter, "metadata.requests"},
MetadataFailures: {Counter, "metadata.failures"},
MetadataLatency: {Timer, "metadata.latency"},
ZoneFailoverMgrRunSuccess: {Gauge, "ZoneFailoverMgr.run-success"},
ZoneFailoverMgrRunFailToDetectActiveZone: {Gauge, "ZoneFailoverMgr.run-fail-detect-active-zone"},
ZoneFailoverMgrRunFailToWriteMetadata: {Gauge, "ZoneFailoverMgr.run-fail-write-metadata"},
ZoneFailoverMgrRunFailure: {Gauge, "ZoneFailoverMgr.run-failure"},
},

// definitions for Inputhost metrics
Expand Down