From 25932eca7c19ae62fd12e7851971318b95a5cc9c Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Thu, 17 Sep 2015 13:19:17 -0400 Subject: [PATCH] Add grafana dashboard for status.o.o/zuul This is our first grafyaml dashboard which reproduces the current graphs on status.o.o/zuul rendered by graphite. While we aren't actually running grafyaml upstream yet, we can get started on building our dashboards. We also added a tox job to properly gate on the configuration. Change-Id: Ia738bcb510e146ab38566f0c13ff483ec618a6ed Depends-On: I16b9affd4402fe5d1637238a2e27f22fdd3986ff Signed-off-by: Paul Belanger --- grafana/zuul-status.yaml | 70 ++++++++++++++++++++++++++++++++++++++++ test-requirements.txt | 1 + tox.ini | 6 +++- 3 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 grafana/zuul-status.yaml diff --git a/grafana/zuul-status.yaml b/grafana/zuul-status.yaml new file mode 100644 index 0000000000..aa268694b8 --- /dev/null +++ b/grafana/zuul-status.yaml @@ -0,0 +1,70 @@ +dashboard: + title: Zuul Status + rows: + - title: Row1 + height: 150px + panels: + - title: Check Pipeline + span: 4 + sparkline: + full: true + show: true + targets: + - target: stats.gauges.zuul.pipeline.check.current_changes + type: singlestat + - title: Gate Pipeline + span: 4 + sparkline: + full: true + show: true + targets: + - target: stats.gauges.zuul.pipeline.gate.current_changes + type: singlestat + - title: Post Pipeline + span: 4 + sparkline: + full: true + show: true + targets: + - target: stats.gauges.zuul.pipeline.post.current_changes + type: singlestat + - title: Row2 + height: 250px + panels: + - title: Test Nodes + span: 4 + stack: true + targets: + - target: alias(stats.gauges.nodepool.target.building, 'Building') + - target: alias(stats.gauges.nodepool.target.ready, 'Available') + - target: alias(stats.gauges.nodepool.target.used, 'In Use') + - target: alias(stats.gauges.nodepool.target.delete, 'Deleting') + type: graph + - title: Zuul Jobs Launched (per Hour) + span: 4 + targets: + - target: alias(summarize(sumSeries(stats_counts.zuul.pipeline.*.all_jobs), '1h'), 'All Jobs') + type: graph + - title: Gerrit Events (per Hour) + span: 4 + targets: + - target: alias(summarize(stats_counts.gerrit.event.comment-added, '1h'), 'Comment added') + - target: alias(summarize(stats_counts.gerrit.event.patchset-created, '1h'), 'Patchset created') + - target: alias(summarize(stats_counts.gerrit.event.change-merged, '1h'), 'Change merged') + type: graph + - title: Zuul Job Queue + span: 4 + targets: + - target: alias(stats.gauges.zuul.geard.queue.running, 'Running') + - target: alias(stats.gauges.zuul.geard.queue.waiting, 'Waiting') + - target: alias(stats.gauges.zuul.geard.queue.total, 'Total Jobs') + - target: alias(stats.gauges.zuul.geard.workers, 'Workers') + type: graph + - title: Logstash Job Queue + span: 4 + targets: + - target: alias(stats.gauges.logstash.geard.queue.running, 'Running') + - target: alias(stats.gauges.logstash.geard.queue.waiting, 'Waiting') + - target: alias(stats.gauges.logstash.geard.queue.total, 'Total Jobs') + - target: alias(stats.gauges.logstash.geard.workers, 'Workers') + type: graph diff --git a/test-requirements.txt b/test-requirements.txt index 7214687c34..64d33397d7 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,2 +1,3 @@ hacking>=0.10,<0.11 bashate>=0.2 +grafyaml diff --git a/tox.ini b/tox.ini index c65972bf61..0e111a4cc7 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 1.6 -envlist = pep8,gerrit,projects,jjb,jenkins-project,zuul +envlist = pep8,gerrit,grafyaml,projects,jjb,jenkins-project,zuul skipsdist = True [testenv] @@ -41,6 +41,10 @@ exclude = .tox,.test ignore = E125,H select = H231 +[testenv:grafyaml] +basepython = python2.7 +commands = grafana-dashboard validate grafana + [testenv:jjb] basepython = python2.7 deps = jenkins-job-builder