From 747fd328e9a90ffb0f516ae785bdf5c79fe486dd Mon Sep 17 00:00:00 2001 From: Oliver Gould Date: Fri, 2 Nov 2018 10:20:11 -0700 Subject: [PATCH] grafana: Show TCP closes by errno (#1839) linkerd/linkerd2-proxy#116 removes the `classification` label for the `tcp_close_total` metric because TCP sockets that close with an error do not actually indicate any sort of failure -- many graceful shutdown situations can still cause a socket error. This change uses the `errno` label to enumerate tcp_close_total metrics. --- grafana/dashboards/deployment.json | 8 ++++---- grafana/dashboards/health.json | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/grafana/dashboards/deployment.json b/grafana/dashboards/deployment.json index 55cb05b78..53384b0aa 100644 --- a/grafana/dashboards/deployment.json +++ b/grafana/dashboards/deployment.json @@ -706,10 +706,10 @@ "steppedLine": false, "targets": [ { - "expr": "tcp_close_total{namespace=\"$namespace\", deployment=\"$deployment\", direction=\"inbound\",classification=\"failure\"}", + "expr": "tcp_close_total{namespace=\"$namespace\", deployment=\"$deployment\", direction=\"inbound\",errno!=\"\"}", "format": "time_series", "intervalFactor": 1, - "legendFormat": "{{peer}} {{classification}}", + "legendFormat": "{{peer}} {{errno}}", "refId": "A" } ], @@ -1571,10 +1571,10 @@ "steppedLine": false, "targets": [ { - "expr": "tcp_close_total{namespace=\"$namespace\", deployment=\"$deployment\", direction=\"outbound\",classification=\"failure\"}", + "expr": "tcp_close_total{namespace=\"$namespace\", deployment=\"$deployment\", direction=\"outbound\",errno!=\"\"}", "format": "time_series", "intervalFactor": 1, - "legendFormat": "{{peer}} {{classification}}", + "legendFormat": "{{peer}} {{errno}}", "refId": "A" } ], diff --git a/grafana/dashboards/health.json b/grafana/dashboards/health.json index d7bf2cf59..2cf904cb0 100644 --- a/grafana/dashboards/health.json +++ b/grafana/dashboards/health.json @@ -694,9 +694,10 @@ "steppedLine": false, "targets": [ { - "expr": "tcp_close_total{deployment=\"$deployment\", namespace=\"$namespace\", direction=\"inbound\",classification=\"failure\"}", + "expr": "tcp_close_total{deployment=\"$deployment\", namespace=\"$namespace\", direction=\"inbound\",errno!=\"\"}", "format": "time_series", "intervalFactor": 1, + "legendFormat": "{{peer}} {{errno}}", "refId": "A" } ],