[6.0] 32c5de647 add the long missing per-backend busy and unhealthy counters
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Thu Aug 16 08:53:11 UTC 2018
commit 32c5de6475e47f66f2e9e02fd71463b47ca50f2c
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Tue Jun 5 10:51:45 2018 +0200
add the long missing per-backend busy and unhealthy counters
Conflicts:
bin/varnishd/cache/cache_backend.c
diff --git a/bin/varnishd/VSC_vbe.vsc b/bin/varnishd/VSC_vbe.vsc
index 5212119cd..cc0559831 100644
--- a/bin/varnishd/VSC_vbe.vsc
+++ b/bin/varnishd/VSC_vbe.vsc
@@ -78,6 +78,18 @@
:level: info
:oneliner: Backend requests sent
+.. varnish_vsc:: unhealthy
+ :type: counter
+ :level: info
+ :oneliner: Fetches not attempted due to backend being unhealthy
+
+.. varnish_vsc:: busy
+ :type: counter
+ :level: info
+ :oneliner: Fetches not attempted due to backend being busy
+
+ Number of times the max_connections limit was reached
+
..
=== Anything below is actually per VCP entry, but collected per
=== backend for simplicity
diff --git a/bin/varnishd/cache/cache_backend.c b/bin/varnishd/cache/cache_backend.c
index 11856b8ca..a727f5ec8 100644
--- a/bin/varnishd/cache/cache_backend.c
+++ b/bin/varnishd/cache/cache_backend.c
@@ -91,7 +91,7 @@ vbe_dir_getfd(struct worker *wrk, struct backend *bp, struct busyobj *bo,
if (!VDI_Healthy(bp->director, NULL)) {
VSLb(bo->vsl, SLT_FetchError,
"backend %s: unhealthy", bp->director->display_name);
- // XXX: per backend stats ?
+ bp->vsc->unhealthy++;
VSC_C_main->backend_unhealthy++;
return (NULL);
}
@@ -99,7 +99,7 @@ vbe_dir_getfd(struct worker *wrk, struct backend *bp, struct busyobj *bo,
if (bp->max_connections > 0 && bp->n_conn >= bp->max_connections) {
VSLb(bo->vsl, SLT_FetchError,
"backend %s: busy", bp->director->display_name);
- // XXX: per backend stats ?
+ bp->vsc->busy++;
VSC_C_main->backend_busy++;
return (NULL);
}
More information about the varnish-commit
mailing list