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

Commit

Permalink
add metrics for zone failover mgr (#156)
Browse files Browse the repository at this point in the history
* add metrics for zone failover mgr

* append new metrics to the end
  • Loading branch information
datoug authored Apr 21, 2017
1 parent 4a5153b commit 8f2b425
Showing 1 changed file with 21 additions and 3 deletions.
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

0 comments on commit 8f2b425

Please sign in to comment.