From 870fbc4473ec46c9e58bd3ec8f2cc5347faeed99 Mon Sep 17 00:00:00 2001 From: Bohdan Shulha Date: Sun, 6 Oct 2024 00:14:36 +0200 Subject: [PATCH] fix: #206 sum requests count by status code --- app/Http/Controllers/NodeController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/NodeController.php b/app/Http/Controllers/NodeController.php index 27f1220..504761c 100644 --- a/app/Http/Controllers/NodeController.php +++ b/app/Http/Controllers/NodeController.php @@ -83,7 +83,7 @@ public function show(Node $node) alias(round(ptah_node_disk_used_bytes{path="/"} / ptah_node_disk_total_bytes{path="/"} * 100), "disk_usage"), alias(round(rate(ptah_node_network_rx_bytes / 1024)), "network_rx_bytes"), alias(round(rate(ptah_node_network_tx_bytes / 1024)), "network_tx_bytes"), - alias(round(increase(ptah_caddy_http_requests_count)), "http_requests_count"), + alias(round(sum(increase(ptah_caddy_http_requests_count)) by (status_code)), "http_requests_count"), alias(sum(increase(ptah_caddy_http_requests_duration_bucket)) by (le), "http_requests_duration"), ) QUERY;