Skip to content

Commit

Permalink
fix metrics collector simulator. (stolostron#962)
Browse files Browse the repository at this point in the history
Signed-off-by: morvencao <[email protected]>
  • Loading branch information
morvencao authored Mar 24, 2022
1 parent 79cf61a commit f2505f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/simulator/metrics-collector/generate-metrics-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ function get_metrics_list() {
function get_recordingrules_list() {
echo "getting recordingrules list..."
if [[ -z "${IS_GENERATING_OCP311_METRICS}" ]]; then
recordingrules=$(curl -L ${METRICS_ALLOW_LIST_URL} | ${GOJSONTOYAML_BIN} --yamltojson | jq -r '.data."metrics_list.yaml"' | ${GOJSONTOYAML_BIN} --yamltojson | jq '.rules[]')
recordingrules=$(curl -L ${METRICS_ALLOW_LIST_URL} | ${GOJSONTOYAML_BIN} --yamltojson | jq -r '.data."metrics_list.yaml"' | ${GOJSONTOYAML_BIN} --yamltojson | jq '.recording_rules[]')
echo "$recordingrules" | jq -s . > ${RECORDINGRULES_JSON_OUT}
else
recordingrules=$(curl -L ${METRICS_ALLOW_LIST_URL} | ${GOJSONTOYAML_BIN} --yamltojson | jq -r '.data."ocp311_metrics_list.yaml"' | ${GOJSONTOYAML_BIN} --yamltojson | jq '.rules[]')
recordingrules=$(curl -L ${METRICS_ALLOW_LIST_URL} | ${GOJSONTOYAML_BIN} --yamltojson | jq -r '.data."ocp311_metrics_list.yaml"' | ${GOJSONTOYAML_BIN} --yamltojson | jq '.recording_rules[]')
echo "$recordingrules" | jq -s . > ${RECORDINGRULES_JSON_OUT}
fi
}
Expand Down

0 comments on commit f2505f6

Please sign in to comment.