WIP Initial kosmos_prometheus wrapper cookbook

This commit is contained in:
Greg Karekinian
2026-07-03 17:47:13 +02:00
parent 4cd6c41254
commit 765d0b080e
11 changed files with 280 additions and 4 deletions
@@ -0,0 +1,41 @@
#
# Cookbook:: kosmos_prometheus
# Recipe:: server
#
include_recipe "firewall"
prometheus_install "prometheus" do
version node["prometheus"]["version"]
checksum node["prometheus"]["checksum"]
end
prometheus_config "prometheus" do
# scrape_interval "60s"
# evaluation_interval "60s"
end
prometheus_job "prometheus" do
target "localhost:9090"
end
prometheus_service "prometheus" do
cli_options({
"config.file" => "/opt/prometheus/prometheus.yml",
"log.level" => "info",
"query.max-concurrency" => 20,
"query.lookback-delta" => "5m",
"query.timeout" => "2m",
"storage.tsdb.path" => "/var/lib/prometheus",
"storage.tsdb.retention.time" => "15d",
"web.listen-address" => ":9090",
"web.telemetry-path" => ""
})
end
firewall_rule "prometheus web" do
port 9090
source "10.1.1.0/24"
protocol :tcp
command :allow
end