Hi, I´m trying to monitor the HTTP Status Codes from my traefik load balancer with the REST Custom Sensor.
This is the json i get from traefiks api ->
{ "pid": 32510, "uptime": "3h48m4.565825751s", "uptime_sec": 13684.565825751, "time": "2018-07-04 14:37:31.941361889 +0200 CEST m=+13684.830775391", "unixtime": 1530707851, "status_code_count": { "200": 37, "301": 2, "404": 1 }, "total_status_code_count": { "200": 190914, "206": 106, "301": 40928, "302": 61348, "304": 2381, "307": 4, "400": 38, "401": 3, "403": 4, "404": 24526, "406": 284, "410": 1175, "500": 3630 }, "count": 40, "total_count": 325341, "total_response_time": "7h56m26.869387871s", "total_response_time_sec": 28586.869387871, "average_response_time": "87.867404ms", "average_response_time_sec": 0.087867404 }
I have already created a Rest configuration and i can get the values into prtg. But there is one big problem. If i restart traefik, the status codes are reset and won´t appear again in the json until a client triggers it again. Therefor the sensor gets down with reason "could not resolve channel HTTP 404: path does not exist 'total_status_code_count.404' "
{ "pid": 1243, "uptime": "4.159367305s", "uptime_sec": 4.159367305, "time": "2018-07-04 16:39:09.434314257 +0200 CEST m=+10.209230759", "unixtime": 1530715149, "status_code_count": { }, "total_status_code_count": { }, "count": 0, "total_count": 0, "total_response_time": "0s", "total_response_time_sec": 0, "average_response_time": "0s", "average_response_time_sec": 0, "recent_errors": [ ] }
So I have tried to create an generic channel, but i don´t understand the example/syntax which is listed in the manual. Maybe you can help me.
Thanks in advance. Regards, Stefan
Add comment