From 879715dd45e14c70e4fdd16885f0655113f377d9 Mon Sep 17 00:00:00 2001 From: Dean Coakley Date: Mon, 15 Jul 2019 17:00:27 +0100 Subject: [PATCH] Fix session metrics for stream upstreams * 4xx and 5xx session metrics are not correctly unmarshalled. Instead they are ignored. Bug introduced in: https://github.com/nginxinc/nginx-plus-go-client/commit/c9fb4acf9c4aeb238b2e9121aecf9c4dbe525676 --- client/nginx.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/nginx.go b/client/nginx.go index 4c609053..563624b1 100644 --- a/client/nginx.go +++ b/client/nginx.go @@ -184,8 +184,8 @@ type Responses struct { // Sessions represents stream session related stats. type Sessions struct { Sessions2xx uint64 `json:"2xx"` - Sessions4xx uint64 `josn:"4xx"` - Sessions5xx uint64 `josn:"5xx"` + Sessions4xx uint64 `json:"4xx"` + Sessions5xx uint64 `json:"5xx"` Total uint64 }