Skip to content

Commit

Permalink
Rename server health metric to alpha health. (hypermodeinc#2670)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmai authored and manishrjain committed Oct 17, 2018
1 parent 9f0ff47 commit 7150815
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions x/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ var (
MemoryIdle *expvar.Int
MemoryProc *expvar.Int
ActiveMutations *expvar.Int
ServerHealth *expvar.Int
AlphaHealth *expvar.Int
MaxPlSize *expvar.Int
MaxPlLength *expvar.Int

Expand All @@ -69,7 +69,7 @@ func init() {
EvictedPls = expvar.NewInt("dgraph_evicted_lists_total")
PendingQueries = expvar.NewInt("dgraph_pending_queries_total")
NumQueries = expvar.NewInt("dgraph_num_queries_total")
ServerHealth = expvar.NewInt("dgraph_server_health_status")
AlphaHealth = expvar.NewInt("dgraph_alpha_health_status")
DirtyMapSize = expvar.NewInt("dgraph_dirtymap_keys_total")
LcacheSize = expvar.NewInt("dgraph_lcache_size_bytes")
LcacheLen = expvar.NewInt("dgraph_lcache_keys_total")
Expand All @@ -94,9 +94,9 @@ func init() {
select {
case <-ticker.C:
if err := HealthCheck(); err == nil {
ServerHealth.Set(1)
AlphaHealth.Set(1)
} else {
ServerHealth.Set(0)
AlphaHealth.Set(0)
}
}
}
Expand Down

0 comments on commit 7150815

Please sign in to comment.