WIP Initial kosmos_prometheus wrapper cookbook
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user