From d87ce0e35fbd255e911378c43f41eb61b5f763cc Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Thu, 10 Mar 2022 16:18:50 +1100 Subject: [PATCH] prod-playbook: use job name for stats Because "." is a field separator for graphite, we're incorrectly nesting the results. A better idea seems to be to store these stats under the job name. That's going to be more helpful when looking up in Zuul build results anyway. Follow-on to I90dfb7a25cb5ab08403c89ef59ea21972cf2aae2 Change-Id: Icbb57fd23d8b90f52bc7a0ea5fa80f389ab3892e --- playbooks/zuul/run-production-playbook.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/zuul/run-production-playbook.yaml b/playbooks/zuul/run-production-playbook.yaml index 5715293cbb..f87d30f8a7 100644 --- a/playbooks/zuul/run-production-playbook.yaml +++ b/playbooks/zuul/run-production-playbook.yaml @@ -32,8 +32,8 @@ # delta is in string format h:m:s.sss; convert to ms for statsd {% set delta = _run.delta.split(':') %} {% set delta_ms = ((delta[0]|int * 60 * 60 * 1000) + (delta[1]|int * 60 * 1000) + (delta[2]|float * 1000)) | int %} - echo 'bridge.ansible.{{ playbook_name }}.runtime:{{ delta_ms }}|ms' | nc -w 1 -u graphite.opendev.org 8125 - echo 'bridge.ansible.{{ playbook_name }}.rc:{{ _run.rc }}|g' | nc -w 1 -u graphite.opendev.org 8125 + echo 'bridge.ansible.{{ zuul.job }}.runtime:{{ delta_ms }}|ms' | nc -w 1 -u graphite.opendev.org 8125 + echo 'bridge.ansible.{{ zuul.job }}.rc:{{ _run.rc }}|g' | nc -w 1 -u graphite.opendev.org 8125 args: executable: '/bin/bash'