]> git.openstreetmap.org Git - chef.git/commitdiff
Install prometheus apache exporter on machines running apache
authorTom Hughes <tom@compton.nu>
Thu, 17 Sep 2020 17:52:10 +0000 (17:52 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 17 Sep 2020 17:52:59 +0000 (18:52 +0100)
cookbooks/apache/metadata.rb
cookbooks/apache/recipes/default.rb
cookbooks/prometheus/resources/exporter.rb

index 06b231a1c3c2e01c896ac84a032c198b46cf9c31..f6176ee8b8183d8a34767b6fa9d99bd38e6e56c0 100644 (file)
@@ -7,4 +7,5 @@ description       "Installs and configures apache"
 version           "1.0.0"
 supports          "ubuntu"
 depends           "munin"
+depends           "prometheus"
 depends           "ssl"
index 5ab1b21eebe6da9f547310408ec00492cd32f077..f25806fcf4a870e0d9a6d2c97f0dee39bae5b325 100644 (file)
@@ -18,6 +18,7 @@
 #
 
 include_recipe "munin"
+include_recipe "prometheus"
 include_recipe "ssl"
 
 package %w[
@@ -94,3 +95,8 @@ end
 munin_plugin "apache_accesses"
 munin_plugin "apache_processes"
 munin_plugin "apache_volume"
+
+prometheus_exporter "apache" do
+  port 9117
+  listen_switch "telemetry.address"
+end
index 08c0e03b749a4f83e44f8c503be246652352dfa9..e740ac79ec2ecf281bedc36e733d31bfeefab475 100644 (file)
@@ -33,6 +33,7 @@ action :create do
   end
 
   template defaults_name do
+    cookbook "prometheus"
     source "defaults.erb"
     owner "root"
     group "root"