]> git.openstreetmap.org Git - chef.git/commitdiff
Configure prometheus exporter for elasticsearch
authorTom Hughes <tom@compton.nu>
Thu, 26 Jan 2023 13:24:10 +0000 (13:24 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 26 Jan 2023 13:24:29 +0000 (13:24 +0000)
cookbooks/elasticsearch/metadata.rb
cookbooks/elasticsearch/recipes/default.rb

index 37f38ee1a5052f10020f1bcc64d00df82b355814..e1301a39b5d9f23a107cb9a8729f9472314335c5 100644 (file)
@@ -7,3 +7,4 @@ description       "Installs and configures a elasticsearch server"
 version           "1.0.0"
 supports          "ubuntu"
 depends           "apt"
+depends           "prometheus"
index ce4083f79593183fa27197ec2f226dee71ed1656..a48ee99879c4dd049afa5eab2eebcdb3e57ce265 100644 (file)
@@ -17,6 +17,8 @@
 # limitations under the License.
 #
 
+include_recipe "prometheus"
+
 case node[:elasticsearch][:version]
 when "6.x" then include_recipe "apt::elasticsearch6"
 when "7.x" then include_recipe "apt::elasticsearch7"
@@ -38,3 +40,7 @@ service "elasticsearch" do
   action [:enable, :start]
   supports :status => true, :restart => true
 end
+
+prometheus_exporter "elasticsearch" do
+  port 9114
+end