Metrics Consensus Protocol

On Monitoring Nomad | Nomad by HashiCorp we find some important metrics to monitor the Consensus Protocol (Raft).

However: Where can these metrics be found exactly? The metrics endpoint (called on the server node) does only return the following (but no nomad.raft.leader.lastContact)

"Labels": {},
"Name": "nomad.raft.appliedIndex",
"Value": 35945
},
{
"Labels": {},
"Name": "nomad.raft.boltdb.freePageBytes",
"Value": 61440
},
{
"Labels": {},
"Name": "nomad.raft.boltdb.freelistBytes",
"Value": 136
},
{
"Labels": {},
"Name": "nomad.raft.boltdb.numFreePages",
"Value": 9
},
{
"Labels": {},
"Name": "nomad.raft.boltdb.numPendingPages",
"Value": 6
},
{
"Labels": {},
"Name": "nomad.raft.boltdb.openReadTxn",
"Value": 0
},
{
"Labels": {},
"Name": "nomad.raft.boltdb.txstats.pageAlloc",
"Value": 313425920
},
{
"Labels": {},
"Name": "nomad.raft.boltdb.txstats.pageCount",
"Value": 76520
},
{
"Labels": {},
"Name": "nomad.raft.lastIndex",
"Value": 35945
},
{
"Labels": {},
"Name": "nomad.raft.leader.oldestLogAge",
"Value": 621143808
}

Hi @frank.wettstein, would you be able to explain a little more about your cluster topology; particularly the number of servers you’re running and which one responded to the API query?

The metric nomad.raft.leader.lastContact is only ever emitted by the leader and is a sample representing the last contact the leader had with all voting servers, apart from itself. In a cluster with only one server, this metric will not appear.

Thanks,
jrasell and the Nomad team

Sorry, makes totally sense, my mistake!
The cluster is a demo-cluster with just one server and three client nodes.