Skip to content

Commit

Permalink
Update dashboard.json (#73)
Browse files Browse the repository at this point in the history
Calculating varnish hitrate using varnish_main_client_req will never be accurate, and the way varnish calculates this is cache_hits / cache_hits + cache_miss, so this change commit will use the varnish way of calculating hitrate
  • Loading branch information
dhpowrhost authored Dec 8, 2021
1 parent 86fc1b0 commit cf9a93f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dashboards/jonnenauha/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"tableColumn": "Value",
"targets": [
{
"expr": "avg(( rate(varnish_main_cache_hit{instance=~\"^($varnish_instance).*\"}[5m]) / rate(varnish_main_client_req{instance=~\"^($varnish_instance).*\"}[5m]) ))",
"expr": "avg((rate(varnish_main_cache_hit{instance=~\"^($varnish_instance).*\"}[5m]) / (rate(varnish_main_cache_hit{instance=~\"^($varnish_instance).*\"}[5m]) + rate(varnish_main_cache_miss{instance=~\"^($varnish_instance).*\"}[5m]))))",
"format": "time_series",
"hide": false,
"interval": "",
Expand Down Expand Up @@ -1046,7 +1046,7 @@
"steppedLine": true,
"targets": [
{
"expr": "avg(rate(varnish_main_cache_hit{instance=~\"^($varnish_instance).*\"}[5m]) / rate(varnish_main_client_req{instance=~\"^($varnish_instance).*\"}[5m]))",
"expr": "rate(varnish_main_cache_hit{instance=~\"^($varnish_instance).*\"}[5m]) / (rate(varnish_main_cache_hit{instance=~\"^($varnish_instance).*\"}[5m]) + rate(varnish_main_cache_miss{instance=~\"^($varnish_instance).*\"}[5m]))",
"format": "time_series",
"hide": false,
"interval": "",
Expand All @@ -1056,7 +1056,7 @@
"step": 240
},
{
"expr": "avg(1 - (rate(varnish_main_cache_hit{instance=~\"^($varnish_instance).*\"}[5m]) / rate(varnish_main_client_req{instance=~\"^($varnish_instance).*\"}[5m])))",
"expr": "rate(varnish_main_cache_miss{instance=~\"^($varnish_instance).*\"}[5m]) / (rate(varnish_main_cache_hit{instance=~\"^($varnish_instance).*\"}[5m]) + rate(varnish_main_cache_miss{instance=~\"^($varnish_instance).*\"}[5m]))",
"format": "time_series",
"hide": false,
"interval": "",
Expand Down

0 comments on commit cf9a93f

Please sign in to comment.