From 184a48717ac0a4332b426980a0d48771ec7fed64 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 22 Jan 2014 10:46:55 +0000 Subject: [PATCH] Monitor ping times and reachability from tile caches to renderers --- cookbooks/tilecache/metadata.rb | 2 +- cookbooks/tilecache/recipes/default.rb | 7 +++++++ cookbooks/tilecache/templates/default/munin.ping.erb | 8 ++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 cookbooks/tilecache/templates/default/munin.ping.erb diff --git a/cookbooks/tilecache/metadata.rb b/cookbooks/tilecache/metadata.rb index cda38549a..ed816a97b 100644 --- a/cookbooks/tilecache/metadata.rb +++ b/cookbooks/tilecache/metadata.rb @@ -8,4 +8,4 @@ version "1.0.0" depends "ssl" depends "squid" depends "nginx" - +depends "munin" diff --git a/cookbooks/tilecache/recipes/default.rb b/cookbooks/tilecache/recipes/default.rb index b6db40164..13f752cd1 100644 --- a/cookbooks/tilecache/recipes/default.rb +++ b/cookbooks/tilecache/recipes/default.rb @@ -80,3 +80,10 @@ nginx_site "tile-ssl" do template "nginx_tile_ssl.conf.erb" end +tilerenders.each do |render| + munin_plugin "ping_#{render[:fqdn]}" do + target "ping_" + conf "munin.ping.erb" + conf_variables :host => render[:fqdn] + end +end diff --git a/cookbooks/tilecache/templates/default/munin.ping.erb b/cookbooks/tilecache/templates/default/munin.ping.erb new file mode 100644 index 000000000..b09f976db --- /dev/null +++ b/cookbooks/tilecache/templates/default/munin.ping.erb @@ -0,0 +1,8 @@ +# DO NOT EDIT - This file is being maintained by Chef + +[ping_<%= @host %>] +env.ping_args -c 1 -w 20 +env.ping_warn 0.5 +env.ping_crit 1.0 +env.packetloss_warn 10 +env.packetloss_crit 30 -- 2.43.2