fix: wrap prometheus conf in array

This commit is contained in:
gmega 2025-06-23 19:12:02 -03:00
parent 6be2b6ff51
commit 19f87a2298
No known key found for this signature in database
GPG Key ID: 6290D34EAD824B18
2 changed files with 13 additions and 9 deletions

View File

@ -13,3 +13,5 @@ source "${LIB_SRC}/experiment.bash"
exp_set_outputs "${OUTPUTS}"
prom_set_outputs "${PROM_TARGETS_DIR}"
exp_start "default"

View File

@ -31,7 +31,8 @@ prom_add() {
_prom_init_output || return 1
cat > "${_prom_output}/${metrics_port}-${experiment_type}-${experiment_id}-${node}-${node_type}.json" <<EOF
{
[
{
"targets": ["host.docker.internal:${metrics_port}"],
"labels": {
"job": "${experiment_type}",
@ -39,7 +40,8 @@ prom_add() {
"node": "${node}",
"node_type": "${node_type}"
}
}
}
]
EOF
}