]> git.openstreetmap.org Git - chef.git/commitdiff
Monitor ping times and reachability from tile caches to renderers
authorTom Hughes <tom@compton.nu>
Wed, 22 Jan 2014 10:46:55 +0000 (10:46 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 22 Jan 2014 10:51:04 +0000 (10:51 +0000)
cookbooks/tilecache/metadata.rb
cookbooks/tilecache/recipes/default.rb
cookbooks/tilecache/templates/default/munin.ping.erb [new file with mode: 0644]

index cda38549af41fb1d4f27e4a6a73bc74a3ca4f124..ed816a97b9e95a1e9d2194d1dbd149a1b2f61c54 100644 (file)
@@ -8,4 +8,4 @@ version           "1.0.0"
 depends           "ssl"
 depends           "squid"
 depends           "nginx"
 depends           "ssl"
 depends           "squid"
 depends           "nginx"
-
+depends           "munin"
index b6db40164f1513748f442096abc60030fa13b8e0..13f752cd1382c6527ea299cc906c254474bfd037 100644 (file)
@@ -80,3 +80,10 @@ nginx_site "tile-ssl" do
   template "nginx_tile_ssl.conf.erb"
 end
 
   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 (file)
index 0000000..b09f976
--- /dev/null
@@ -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