From c8582e4d26237b26076ec9598e55b88d22bb2b58 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Thu, 21 Feb 2019 14:33:22 +1100 Subject: [PATCH] Add nodepool-dib dashboard This is a dashboard to track nodepool dib status. We generate it client side as it seems easier and leads to a suitable layout. Depends-On: https://review.openstack.org/638288 Change-Id: I5dee06347c0cd4faaad7f1800416b704eb10d117 --- grafana/create-nodepool-dib.sh | 29 ++ grafana/nodepool-dib.base.template | 21 ++ grafana/nodepool-dib.image.template | 44 +++ grafana/nodepool-dib.yaml | 505 ++++++++++++++++++++++++++++ 4 files changed, 599 insertions(+) create mode 100755 grafana/create-nodepool-dib.sh create mode 100644 grafana/nodepool-dib.base.template create mode 100644 grafana/nodepool-dib.image.template create mode 100644 grafana/nodepool-dib.yaml diff --git a/grafana/create-nodepool-dib.sh b/grafana/create-nodepool-dib.sh new file mode 100755 index 0000000000..016f3ae465 --- /dev/null +++ b/grafana/create-nodepool-dib.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# Create the nodepool-dib.yaml dashboard with nodepool dib build +# status. + +output_file=nodepool-dib.yaml + +function create { + local title="$1" + local key="$2" + + sed -e "s/%TITLE%/${title}/; " \ + -e "s/%KEY%/${key}/" \ + nodepool-dib.image.template >> ${output_file} +} + +cp nodepool-dib.base.template nodepool-dib.yaml +create "Ubuntu Bionic" "ubuntu-bionic" +create "Ubuntu Xenial" "ubuntu-xenial" +create "Ubuntu Trusty" "ubuntu-trusty" +create "Centos 7" "centos-7" +create "Fedora 29" "fedora-29" +create "Debian Stretch" "debian-stretch" +create "Gentoo" "gentoo-17-0-systemd" +create "openSUSE 15.0" "opensuse-150" +create "openSUSE 42.3" "opensuse-423" +create "Ubuntu Bionic arm64" "ubuntu-bionic-arm64" +create "Ubuntu Xenial arm64" "ubuntu-xenial-arm64" + diff --git a/grafana/nodepool-dib.base.template b/grafana/nodepool-dib.base.template new file mode 100644 index 0000000000..6093cac079 --- /dev/null +++ b/grafana/nodepool-dib.base.template @@ -0,0 +1,21 @@ +# +# NOTE: This file is autogenerated. Use ./create-dib.sh to +# recreate it +# + +dashboard: + title: 'Nodepool: DIB Status' + time: + from: "now/w" + to: "now/w" + rows: + - title: Description + height: 100px + panels: + - title: Description + content: | + **This dashboard is managed by [Grafyaml](http://docs.openstack.org/infra/system-config/grafyaml.html).** + + If you would like to make changes to this dashboard, please see the grafana directory in [project-config](https://git.openstack.org/cgit/openstack-infra/project-config/tree/grafana/afs.yaml). + type: text + diff --git a/grafana/nodepool-dib.image.template b/grafana/nodepool-dib.image.template new file mode 100644 index 0000000000..561f364899 --- /dev/null +++ b/grafana/nodepool-dib.image.template @@ -0,0 +1,44 @@ +# AUTOGENERATED : %TITLE% + + - title: %TITLE% + showTitle: true + height: 200px + panels: + - title: Build status + colorBackground: true + type: singlestat + valueName: current + valueMaps: + - value: 0 + text: "OK" + - value: 1 + text: "FAILED" + thresholds: 0.1,0.9 + span: 2 + targets: + - target: "stats.gauges.nodepool.dib_image_build.%KEY%.qcow2.rc" + valueFontSize: "50%" + + - title: Image size + type: graph + span: 3 + yaxes: + - format: decbytes + min: 0 + - format: decbytes + min: 0 + targets: + - target: alias(stats.gauges.nodepool.dib_image_build.%KEY%.*.size, "Size") + refId: A + + - title: Build duration + type: graph + span: 3 + yaxes: + - format: ms + min: 0 + - format: ms + min: 0 + targets: + - target: alias(keepLastValue(stats.timers.nodepool.dib_image_build.%KEY%.qcow2.duration.mean, 'None'), "Time") + refId: A diff --git a/grafana/nodepool-dib.yaml b/grafana/nodepool-dib.yaml new file mode 100644 index 0000000000..50ac69bdbf --- /dev/null +++ b/grafana/nodepool-dib.yaml @@ -0,0 +1,505 @@ +# +# NOTE: This file is autogenerated. Use ./create-dib.sh to +# recreate it +# + +dashboard: + title: 'Nodepool: DIB Status' + time: + from: "now/w" + to: "now/w" + rows: + - title: Description + height: 100px + panels: + - title: Description + content: | + **This dashboard is managed by [Grafyaml](http://docs.openstack.org/infra/system-config/grafyaml.html).** + + If you would like to make changes to this dashboard, please see the grafana directory in [project-config](https://git.openstack.org/cgit/openstack-infra/project-config/tree/grafana/afs.yaml). + type: text + +# AUTOGENERATED : Ubuntu Bionic + + - title: Ubuntu Bionic + showTitle: true + height: 200px + panels: + - title: Build status + colorBackground: true + type: singlestat + valueName: current + valueMaps: + - value: 0 + text: "OK" + - value: 1 + text: "FAILED" + thresholds: 0.1,0.9 + span: 2 + targets: + - target: "stats.gauges.nodepool.dib_image_build.ubuntu-bionic.qcow2.rc" + valueFontSize: "50%" + + - title: Image size + type: graph + span: 3 + yaxes: + - format: decbytes + min: 0 + - format: decbytes + min: 0 + targets: + - target: alias(stats.gauges.nodepool.dib_image_build.ubuntu-bionic.*.size, "Size") + refId: A + + - title: Build duration + type: graph + span: 3 + yaxes: + - format: ms + min: 0 + - format: ms + min: 0 + targets: + - target: alias(keepLastValue(stats.timers.nodepool.dib_image_build.ubuntu-bionic.qcow2.duration.mean, 'None'), "Time") + refId: A +# AUTOGENERATED : Ubuntu Xenial + + - title: Ubuntu Xenial + showTitle: true + height: 200px + panels: + - title: Build status + colorBackground: true + type: singlestat + valueName: current + valueMaps: + - value: 0 + text: "OK" + - value: 1 + text: "FAILED" + thresholds: 0.1,0.9 + span: 2 + targets: + - target: "stats.gauges.nodepool.dib_image_build.ubuntu-xenial.qcow2.rc" + valueFontSize: "50%" + + - title: Image size + type: graph + span: 3 + yaxes: + - format: decbytes + min: 0 + - format: decbytes + min: 0 + targets: + - target: alias(stats.gauges.nodepool.dib_image_build.ubuntu-xenial.*.size, "Size") + refId: A + + - title: Build duration + type: graph + span: 3 + yaxes: + - format: ms + min: 0 + - format: ms + min: 0 + targets: + - target: alias(keepLastValue(stats.timers.nodepool.dib_image_build.ubuntu-xenial.qcow2.duration.mean, 'None'), "Time") + refId: A +# AUTOGENERATED : Ubuntu Trusty + + - title: Ubuntu Trusty + showTitle: true + height: 200px + panels: + - title: Build status + colorBackground: true + type: singlestat + valueName: current + valueMaps: + - value: 0 + text: "OK" + - value: 1 + text: "FAILED" + thresholds: 0.1,0.9 + span: 2 + targets: + - target: "stats.gauges.nodepool.dib_image_build.ubuntu-trusty.qcow2.rc" + valueFontSize: "50%" + + - title: Image size + type: graph + span: 3 + yaxes: + - format: decbytes + min: 0 + - format: decbytes + min: 0 + targets: + - target: alias(stats.gauges.nodepool.dib_image_build.ubuntu-trusty.*.size, "Size") + refId: A + + - title: Build duration + type: graph + span: 3 + yaxes: + - format: ms + min: 0 + - format: ms + min: 0 + targets: + - target: alias(keepLastValue(stats.timers.nodepool.dib_image_build.ubuntu-trusty.qcow2.duration.mean, 'None'), "Time") + refId: A +# AUTOGENERATED : Centos 7 + + - title: Centos 7 + showTitle: true + height: 200px + panels: + - title: Build status + colorBackground: true + type: singlestat + valueName: current + valueMaps: + - value: 0 + text: "OK" + - value: 1 + text: "FAILED" + thresholds: 0.1,0.9 + span: 2 + targets: + - target: "stats.gauges.nodepool.dib_image_build.centos-7.qcow2.rc" + valueFontSize: "50%" + + - title: Image size + type: graph + span: 3 + yaxes: + - format: decbytes + min: 0 + - format: decbytes + min: 0 + targets: + - target: alias(stats.gauges.nodepool.dib_image_build.centos-7.*.size, "Size") + refId: A + + - title: Build duration + type: graph + span: 3 + yaxes: + - format: ms + min: 0 + - format: ms + min: 0 + targets: + - target: alias(keepLastValue(stats.timers.nodepool.dib_image_build.centos-7.qcow2.duration.mean, 'None'), "Time") + refId: A +# AUTOGENERATED : Fedora 29 + + - title: Fedora 29 + showTitle: true + height: 200px + panels: + - title: Build status + colorBackground: true + type: singlestat + valueName: current + valueMaps: + - value: 0 + text: "OK" + - value: 1 + text: "FAILED" + thresholds: 0.1,0.9 + span: 2 + targets: + - target: "stats.gauges.nodepool.dib_image_build.fedora-29.qcow2.rc" + valueFontSize: "50%" + + - title: Image size + type: graph + span: 3 + yaxes: + - format: decbytes + min: 0 + - format: decbytes + min: 0 + targets: + - target: alias(stats.gauges.nodepool.dib_image_build.fedora-29.*.size, "Size") + refId: A + + - title: Build duration + type: graph + span: 3 + yaxes: + - format: ms + min: 0 + - format: ms + min: 0 + targets: + - target: alias(keepLastValue(stats.timers.nodepool.dib_image_build.fedora-29.qcow2.duration.mean, 'None'), "Time") + refId: A +# AUTOGENERATED : Debian Stretch + + - title: Debian Stretch + showTitle: true + height: 200px + panels: + - title: Build status + colorBackground: true + type: singlestat + valueName: current + valueMaps: + - value: 0 + text: "OK" + - value: 1 + text: "FAILED" + thresholds: 0.1,0.9 + span: 2 + targets: + - target: "stats.gauges.nodepool.dib_image_build.debian-stretch.qcow2.rc" + valueFontSize: "50%" + + - title: Image size + type: graph + span: 3 + yaxes: + - format: decbytes + min: 0 + - format: decbytes + min: 0 + targets: + - target: alias(stats.gauges.nodepool.dib_image_build.debian-stretch.*.size, "Size") + refId: A + + - title: Build duration + type: graph + span: 3 + yaxes: + - format: ms + min: 0 + - format: ms + min: 0 + targets: + - target: alias(keepLastValue(stats.timers.nodepool.dib_image_build.debian-stretch.qcow2.duration.mean, 'None'), "Time") + refId: A +# AUTOGENERATED : Gentoo + + - title: Gentoo + showTitle: true + height: 200px + panels: + - title: Build status + colorBackground: true + type: singlestat + valueName: current + valueMaps: + - value: 0 + text: "OK" + - value: 1 + text: "FAILED" + thresholds: 0.1,0.9 + span: 2 + targets: + - target: "stats.gauges.nodepool.dib_image_build.gentoo-17-0-systemd.qcow2.rc" + valueFontSize: "50%" + + - title: Image size + type: graph + span: 3 + yaxes: + - format: decbytes + min: 0 + - format: decbytes + min: 0 + targets: + - target: alias(stats.gauges.nodepool.dib_image_build.gentoo-17-0-systemd.*.size, "Size") + refId: A + + - title: Build duration + type: graph + span: 3 + yaxes: + - format: ms + min: 0 + - format: ms + min: 0 + targets: + - target: alias(keepLastValue(stats.timers.nodepool.dib_image_build.gentoo-17-0-systemd.qcow2.duration.mean, 'None'), "Time") + refId: A +# AUTOGENERATED : openSUSE 15.0 + + - title: openSUSE 15.0 + showTitle: true + height: 200px + panels: + - title: Build status + colorBackground: true + type: singlestat + valueName: current + valueMaps: + - value: 0 + text: "OK" + - value: 1 + text: "FAILED" + thresholds: 0.1,0.9 + span: 2 + targets: + - target: "stats.gauges.nodepool.dib_image_build.opensuse-150.qcow2.rc" + valueFontSize: "50%" + + - title: Image size + type: graph + span: 3 + yaxes: + - format: decbytes + min: 0 + - format: decbytes + min: 0 + targets: + - target: alias(stats.gauges.nodepool.dib_image_build.opensuse-150.*.size, "Size") + refId: A + + - title: Build duration + type: graph + span: 3 + yaxes: + - format: ms + min: 0 + - format: ms + min: 0 + targets: + - target: alias(keepLastValue(stats.timers.nodepool.dib_image_build.opensuse-150.qcow2.duration.mean, 'None'), "Time") + refId: A +# AUTOGENERATED : openSUSE 42.3 + + - title: openSUSE 42.3 + showTitle: true + height: 200px + panels: + - title: Build status + colorBackground: true + type: singlestat + valueName: current + valueMaps: + - value: 0 + text: "OK" + - value: 1 + text: "FAILED" + thresholds: 0.1,0.9 + span: 2 + targets: + - target: "stats.gauges.nodepool.dib_image_build.opensuse-423.qcow2.rc" + valueFontSize: "50%" + + - title: Image size + type: graph + span: 3 + yaxes: + - format: decbytes + min: 0 + - format: decbytes + min: 0 + targets: + - target: alias(stats.gauges.nodepool.dib_image_build.opensuse-423.*.size, "Size") + refId: A + + - title: Build duration + type: graph + span: 3 + yaxes: + - format: ms + min: 0 + - format: ms + min: 0 + targets: + - target: alias(keepLastValue(stats.timers.nodepool.dib_image_build.opensuse-423.qcow2.duration.mean, 'None'), "Time") + refId: A +# AUTOGENERATED : Ubuntu Bionic arm64 + + - title: Ubuntu Bionic arm64 + showTitle: true + height: 200px + panels: + - title: Build status + colorBackground: true + type: singlestat + valueName: current + valueMaps: + - value: 0 + text: "OK" + - value: 1 + text: "FAILED" + thresholds: 0.1,0.9 + span: 2 + targets: + - target: "stats.gauges.nodepool.dib_image_build.ubuntu-bionic-arm64.qcow2.rc" + valueFontSize: "50%" + + - title: Image size + type: graph + span: 3 + yaxes: + - format: decbytes + min: 0 + - format: decbytes + min: 0 + targets: + - target: alias(stats.gauges.nodepool.dib_image_build.ubuntu-bionic-arm64.*.size, "Size") + refId: A + + - title: Build duration + type: graph + span: 3 + yaxes: + - format: ms + min: 0 + - format: ms + min: 0 + targets: + - target: alias(keepLastValue(stats.timers.nodepool.dib_image_build.ubuntu-bionic-arm64.qcow2.duration.mean, 'None'), "Time") + refId: A +# AUTOGENERATED : Ubuntu Xenial arm64 + + - title: Ubuntu Xenial arm64 + showTitle: true + height: 200px + panels: + - title: Build status + colorBackground: true + type: singlestat + valueName: current + valueMaps: + - value: 0 + text: "OK" + - value: 1 + text: "FAILED" + thresholds: 0.1,0.9 + span: 2 + targets: + - target: "stats.gauges.nodepool.dib_image_build.ubuntu-xenial-arm64.qcow2.rc" + valueFontSize: "50%" + + - title: Image size + type: graph + span: 3 + yaxes: + - format: decbytes + min: 0 + - format: decbytes + min: 0 + targets: + - target: alias(stats.gauges.nodepool.dib_image_build.ubuntu-xenial-arm64.*.size, "Size") + refId: A + + - title: Build duration + type: graph + span: 3 + yaxes: + - format: ms + min: 0 + - format: ms + min: 0 + targets: + - target: alias(keepLastValue(stats.timers.nodepool.dib_image_build.ubuntu-xenial-arm64.qcow2.duration.mean, 'None'), "Time") + refId: A