Set node name as prometheus instance name

And DRY up the recipe so it's easy and expressive to add more
metrics/targets
This commit is contained in:
2026-07-05 12:41:31 +02:00
parent 518acf5c39
commit 20e999f62b
3 changed files with 27 additions and 17 deletions
@@ -13,7 +13,7 @@ node.default["kosmos_prometheus"]["global"] = {
}
node.default["kosmos_prometheus"]["jobs"] = {
"prometheus" => { "targets" => ["localhost:9090"] },
"prometheus" => { "targets" => [{ "target" => "localhost:9090", "instance" => "localhost" }] },
}
node.default["kosmos_prometheus"]["rule_files"] = []