]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/memcached/recipes/default.rb
Configure prometheus scraping for discourse servers
[chef.git] / cookbooks / memcached / recipes / default.rb
index 1df2a7eb70944b132f998e73b11a4171012c837b..56916ec9ea253723cb35a633908ba249367ee42f 100644 (file)
@@ -18,6 +18,7 @@
 #
 
 include_recipe "munin"
+include_recipe "prometheus"
 
 package "memcached"
 
@@ -30,7 +31,7 @@ template "/etc/memcached.conf" do
   source "memcached.conf.erb"
   owner "root"
   group "root"
-  mode 0o644
+  mode "644"
   notifies :restart, "service[memcached]"
 end
 
@@ -43,3 +44,8 @@ end
     target "memcached_multi_"
   end
 end
+
+prometheus_exporter "memcached" do
+  port 9150
+  options "--memcached.address=#{node[:memcached][:ip_address]}:#{node[:memcached][:tcp_port]} --memcached.pid-file=/run/memcached/memcached.pid"
+end