mirror of https://github.com/status-im/consul.git
Merge pull request #4220 from guidoiaquinti/master
Client: add metric for failed RPC calls to a consul server
This commit is contained in:
commit
ce67e6ed34
|
@ -276,6 +276,7 @@ TRY:
|
||||||
|
|
||||||
// Move off to another server, and see if we can retry.
|
// Move off to another server, and see if we can retry.
|
||||||
c.logger.Printf("[ERR] consul: %q RPC failed to server %s: %v", method, server.Addr, rpcErr)
|
c.logger.Printf("[ERR] consul: %q RPC failed to server %s: %v", method, server.Addr, rpcErr)
|
||||||
|
metrics.IncrCounterWithLabels([]string{"client", "rpc", "failed"}, 1, []metrics.Label{{Name: "server", Value: server.Name}})
|
||||||
c.routers.NotifyFailedServer(server)
|
c.routers.NotifyFailedServer(server)
|
||||||
if retry := canRetry(args, rpcErr); !retry {
|
if retry := canRetry(args, rpcErr); !retry {
|
||||||
return rpcErr
|
return rpcErr
|
||||||
|
|
|
@ -75,6 +75,12 @@ These metrics are used to monitor the health of specific Consul agents.
|
||||||
<td>rejected requests</td>
|
<td>rejected requests</td>
|
||||||
<td>counter</td>
|
<td>counter</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>`consul.client.rpc.failed`</td>
|
||||||
|
<td>This increments whenever a Consul agent in client mode makes an RPC request to a Consul server and fails.</td>
|
||||||
|
<td>requests</td>
|
||||||
|
<td>counter</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>`consul.client.api.catalog_register.<node>`</td>
|
<td>`consul.client.api.catalog_register.<node>`</td>
|
||||||
<td>This increments whenever a Consul agent receives a catalog register request.</td>
|
<td>This increments whenever a Consul agent receives a catalog register request.</td>
|
||||||
|
|
Loading…
Reference in New Issue