aboutsummaryrefslogtreecommitdiffstats
path: root/extras/misc
diff options
context:
space:
mode:
authorKristian Lyngstol <kly@kly.no>2016-11-15 21:09:26 +0100
committerKristian Lyngstol <kly@kly.no>2016-11-15 21:09:26 +0100
commit4a6d5548c50137f1f1e8c8b67bea2d851eae7f69 (patch)
tree88542714c06bd4ffd3efc3e0f61af08d5daed228 /extras/misc
parent0ed665e8ae4cb579e070ee7d294cfc833c8293ba (diff)
Expose grafana too
Diffstat (limited to 'extras/misc')
-rw-r--r--extras/misc/varnish.vcl14
1 files changed, 12 insertions, 2 deletions
diff --git a/extras/misc/varnish.vcl b/extras/misc/varnish.vcl
index dd71a31..4920963 100644
--- a/extras/misc/varnish.vcl
+++ b/extras/misc/varnish.vcl
@@ -17,6 +17,11 @@ backend templating {
.port = "8080";
}
+backend grafana {
+ .host = "gondul-grafana";
+ .port = "3000";
+}
+
sub vcl_recv {
if (req.url ~ "^/where" || req.url ~ "^/location") {
set req.url = "/api/public/location";
@@ -32,10 +37,15 @@ sub vcl_recv {
return (synth(418,"LOLOLOL"));
}
- if (req.url ~ "/render") {
+ if (req.url ~ "^/render") {
set req.backend_hint = graphite;
}
- if (req.url ~ "/api/templates") {
+ if (req.url ~ "^/grafana") {
+ set req.url = regsub(req.url, "^/grafana","");
+ set req.backend_hint = grafana;
+ return (pass);
+ }
+ if (req.url ~ "^/api/templates") {
set req.url = regsub(req.url, "/api/templates", "");
set req.backend_hint = templating;
}