]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/php/resources/fpm.rb
Improve sandboxing of prometheus collectors
[chef.git] / cookbooks / php / resources / fpm.rb
index 657f3b51b285e9d6302219c28fff1c855d8b593c..f8cc208b51d0cf69c3580f7dd497b1575f195da6 100644 (file)
@@ -53,6 +53,7 @@ action :create do
   if new_resource.prometheus_port
     prometheus_exporter "phpfpm" do
       port new_resource.prometheus_port
+      restrict_address_families "AF_UNIX"
       service service_name
       command "server"
       options "--phpfpm.scrape-uri=#{scrape_uri}"
@@ -93,7 +94,7 @@ action_class do
     if new_resource.port
       "tcp://127.0.0.1:#{new_resource.port}/status"
     else
-      "unix:///run/php/#{new_resource.pool}.sock;/status"
+      "unix:///run/php/php-#{new_resource.pool}-fpm.sock;/status"
     end
   end
 end