From 09438d8fb094de4c2adca51a7ef9116c614b5cee Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Sun, 5 Apr 2020 13:40:10 +0100 Subject: [PATCH] tilecache: add localhost to monitor --- .../templates/default/tilecache-curl-time.erb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cookbooks/tilecache/templates/default/tilecache-curl-time.erb b/cookbooks/tilecache/templates/default/tilecache-curl-time.erb index a5d3fb8d7..a0d584c61 100644 --- a/cookbooks/tilecache/templates/default/tilecache-curl-time.erb +++ b/cookbooks/tilecache/templates/default/tilecache-curl-time.erb @@ -1,5 +1,19 @@ #!/bin/bash mkdir -p /srv/tilecache/data/$(date --utc "+%Y/%m") +# localhost +curl -w "@/srv/tilecache/tilecache-curl-time.txt" -o /dev/null -s -k -4 \ +--max-time 60 \ +'http://localhost:8080/19/262106/174485.png' \ +-H 'authority: c.tile.openstreetmap.org' \ +-H 'sec-fetch-dest: image' \ +-H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36' \ +-H 'dnt: 1' \ +-H 'accept: image/webp,image/apng,image/*,*/*;q=0.8' \ +-H 'sec-fetch-site: same-site' \ +-H 'sec-fetch-mode: no-cors' \ +-H 'referer: https://www.openstreetmap.org/' \ +-H 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' \ +--compressed >> /srv/tilecache/data/$(date --utc "+%Y/%m")/localhost-<%= node[:hostname] %>-$(date --utc "+%Y-%m-%dT%H").txt # render <% @renders.each do |render| -%> <% if render[:hostname] != node[:hostname] -%> -- 2.39.5