Add vm_host label to prometheus targets
This commit is contained in:
@@ -79,6 +79,7 @@ jobs = node["kosmos_prometheus"]["jobs"].merge(
|
||||
"targets" => search(:node, config["query"]).map do |n|
|
||||
target = { "target" => "#{n['knife_zero']['host']}:#{config['port']}", "instance" => n.name }
|
||||
target["env"] = n.chef_environment if n.chef_environment
|
||||
target["vm_host"] = n["vm_host"] if n["vm_host"]
|
||||
target
|
||||
end.compact.sort_by { |t| t["instance"] },
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user