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

@ -12,4 +12,6 @@ OUTPUTS=$(realpath "${OUTPUTS}")
source "${LIB_SRC}/experiment.bash"
exp_set_outputs "${OUTPUTS}"
prom_set_outputs "${PROM_TARGETS_DIR}"
prom_set_outputs "${PROM_TARGETS_DIR}"
exp_start "default"

View File

@ -31,15 +31,17 @@ 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}",
"experiment_id": "${experiment_id}",
"node": "${node}",
"node_type": "${node_type}"
[
{
"targets": ["host.docker.internal:${metrics_port}"],
"labels": {
"job": "${experiment_type}",
"experiment_id": "${experiment_id}",
"node": "${node}",
"node_type": "${node_type}"
}
}
}
]
EOF
}