diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d1de1e4..6cfb967 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,14 +51,20 @@ And add the corresponding command to `./scripts/update-charm-libs.sh`. ## Checking for dashboard updates -The openstack exporter dashboard is a shared file managed by the upstream repository which is -hosted in the [Sunbeam](https://opendev.org/openstack/sunbeam-charms). To check if a new version of -the dashboard is available you can run the make target: +The openstack exporter dashboards are shared files managed +in the [upstream repository (sunbeam-charms)](https://opendev.org/openstack/sunbeam-charms). +To check if a new version of the dashboards are available you can run the make target: ```shell make check-dashboard-updates ``` +If it reports updates, you can update them by running: + +```shell +make sync-dashboards +``` + ## Build the charm Build the charm in this git repository using: diff --git a/Makefile b/Makefile index a2426dd..50ea479 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ help: @echo " make - show help text" @echo " make update-charm-libs - update charm's libraries" @echo " make check-dashboard-updates - check if there's a new dashboard from the upstream" + @echo " make sync-dashboards - update the dashboards from upstream" @echo " make clean - remove unneeded files" @echo " make download-snap - download snap release from github release assets" @echo " make build - build the charm" @@ -23,7 +24,10 @@ update-charm-libs: ./scripts/update-charm-libs.sh check-dashboard-updates: - ./scripts/check-dashboard-updates.sh + ./scripts/sync-dashboards --check + +sync-dashboards: + ./scripts/sync-dashboards clean: @echo "Cleaning existing build" @@ -42,4 +46,4 @@ download-snap: integration: build download-snap CHARM_LOCATION=${CHARM_LOCATION} CHARM_SNAP_LOCATION=${CHARM_SNAP_LOCATION} tox -e integration -.PHONY: help update-charm-libs check-dashboard-updates clean build download-snap integration +.PHONY: help update-charm-libs check-dashboard-updates clean build download-snap integration sync-dashboards diff --git a/scripts/check-dashboard-updates.sh b/scripts/check-dashboard-updates.sh deleted file mode 100755 index d125bb4..0000000 --- a/scripts/check-dashboard-updates.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -# Checkout the dashboard from the upstream repository and see if there is a new -# version available or not. - -ROOT_DIR="$(dirname $0)/.." -LOCAL_PATH="$ROOT_DIR/src" -UPSTREAM_PATH="https://opendev.org/openstack/sunbeam-charms/raw/branch/main/charms/openstack-exporter-k8s/src" - -# Get the remote and local file -LOCAL_FILE="$LOCAL_PATH/grafana_dashboards/openstack-exporter.json" -REMOTE_FILE="$(mktemp)" -wget -O $REMOTE_FILE $UPSTREAM_PATH/grafana_dashboards/openstack-exporter.json - -# Compare them and get the exit status -diff $LOCAL_FILE $REMOTE_FILE -DIFF_STATUS=$? - -# Remove the temporary remote file -rm -f $REMOTE_FILE - -# Exit 1 if there's any difference -if [ $DIFF_STATUS -ne 0 ]; then - echo "Differences detected in the file ./src/grafana_dashboards/openstack-exporter.json" - exit 1 -fi diff --git a/scripts/sync-dashboards b/scripts/sync-dashboards new file mode 100755 index 0000000..30f781d --- /dev/null +++ b/scripts/sync-dashboards @@ -0,0 +1,72 @@ +#!/usr/bin/env python3 + +import os +import sys +import argparse +from urllib.request import urlretrieve + +# sync the dashboards from https://opendev.org/openstack/sunbeam-charms/src/branch/main/charms/openstack-exporter-k8s/src/grafana_dashboards +BASE_URL = "https://opendev.org/openstack/sunbeam-charms/raw/branch/main/charms/openstack-exporter-k8s/src/grafana_dashboards/" +BASE_LOCAL_PATH = "./src/grafana_dashboards/" +DASHBOARDS = [ + "hypervisor-openstack-exporter-dashboard.json", + "openstack-exporter.json", + "overview-openstack-exporter-dashboard.json", +] + + +def sync_dashboard(url: str, local_path: str, check_mode: bool) -> bool: + """Sync dashboard from url. + + If check_mode is True, don't actually update the file. + Return True if the dashboard changed (or would be changed). + """ + new_dashboard_path, _ = urlretrieve(url) + + changed = False + if os.path.exists(local_path): + with open(new_dashboard_path) as f1, open(local_path) as f2: + changed = f1.read() != f2.read() + else: + changed = True + + if changed and not check_mode: + os.replace(new_dashboard_path, local_path) + + return changed + + +def main(args: argparse.Namespace) -> bool: + """Main entry point. + + Return False to indicate dashboards not up to date in check mode. + """ + result = True + for dashboard in DASHBOARDS: + changed = sync_dashboard( + BASE_URL + dashboard, BASE_LOCAL_PATH + dashboard, args.check + ) + if changed: + if args.check: + result = False + print(f"ERROR: {dashboard} not up to date") + else: + print(f"UPDATED: {dashboard} synced from remote source") + else: + print(f"OK: {dashboard} up to date") + + return result + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument( + "-c", + "--check", + action="store_true", + help="If any dashboards are outdated, don't update them, but exit with value 1.", + ) + args = parser.parse_args() + + if not main(args): + sys.exit(1) diff --git a/src/grafana_dashboards/hypervisor-openstack-exporter-dashboard.json b/src/grafana_dashboards/hypervisor-openstack-exporter-dashboard.json new file mode 100644 index 0000000..05a3d69 --- /dev/null +++ b/src/grafana_dashboards/hypervisor-openstack-exporter-dashboard.json @@ -0,0 +1,2401 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": null, + "iteration": 1633078228458, + "links": [], + "panels": [ + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 158, + "panels": [], + "title": "General information", + "type": "row" + }, + { + "datasource": "${prometheusds}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 4, + "x": 8, + "y": 1 + }, + "id": 182, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "/^Value$/", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "expr": "sum by(project_name) (libvirt_domain_info_meta{project_name=~\"$project\"})", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "__auto", + "refId": "A" + } + ], + "title": "Scheduled VMs", + "type": "stat" + }, + { + "datasource": "${prometheusds}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 80 + }, + { + "color": "red", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 12, + "y": 1 + }, + "id": 165, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "expr": "sum(openstack_nova_vcpus_used{hostname=~\"$hypervisor.*\"}) / sum(openstack_nova_vcpus_available{hostname=~\"$hypervisor.*\"}) * 100", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Hypervisor CPU Subscription", + "transformations": [], + "type": "gauge" + }, + { + "datasource": "${prometheusds}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 80 + }, + { + "color": "red", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 16, + "y": 1 + }, + "id": 168, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "expr": "sum(openstack_nova_memory_used_bytes{hostname=~\"$hypervisor.*\"}) / sum(openstack_nova_memory_available_bytes{hostname=~\"$hypervisor.*\"}) * 100", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Hypervisor Mem Subscription", + "transformations": [], + "type": "gauge" + }, + { + "datasource": "${prometheusds}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 80 + }, + { + "color": "red", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 20, + "y": 1 + }, + "id": 179, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "expr": "sum(openstack_nova_local_storage_used_bytes{hostname=~\"$hypervisor.*\"}) / sum(openstack_nova_local_storage_available_bytes{hostname=~\"$hypervisor.*\"}) * 100", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Hypervisor Disk Subscription", + "transformations": [], + "type": "gauge" + }, + { + "datasource": "${prometheusds}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "rgb(229, 231, 235)", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 12, + "y": 6 + }, + "id": 166, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "expr": "sum(openstack_nova_vcpus_used{hostname=~\"$hypervisor.*\"})", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Allocated", + "transformations": [], + "type": "stat" + }, + { + "datasource": "${prometheusds}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "rgb(251, 252, 250)", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 14, + "y": 6 + }, + "id": 167, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "expr": "sum(openstack_nova_vcpus_available{hostname=~\"$hypervisor.*\"})", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Total", + "transformations": [], + "type": "stat" + }, + { + "datasource": "${prometheusds}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "rgb(229, 231, 235)", + "value": null + } + ] + }, + "unit": "mbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 16, + "y": 6 + }, + "id": 169, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "expr": "sum(openstack_nova_memory_used_bytes{hostname=~\"$hypervisor.*\"}) / 1000000", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Allocated", + "transformations": [], + "type": "stat" + }, + { + "datasource": "${prometheusds}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "rgb(251, 252, 250)", + "value": null + } + ] + }, + "unit": "mbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 18, + "y": 6 + }, + "id": 170, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "expr": "sum(openstack_nova_memory_available_bytes{hostname=~\"$hypervisor.*\"}) / 1000000", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Total", + "transformations": [], + "type": "stat" + }, + { + "datasource": "${prometheusds}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "rgb(229, 231, 235)", + "value": null + } + ] + }, + "unit": "decgbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 20, + "y": 6 + }, + "id": 180, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "expr": "sum(openstack_nova_local_storage_used_bytes{hostname=~\"$hypervisor.*\"}) / 1000000000", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Allocated", + "transformations": [], + "type": "stat" + }, + { + "datasource": "${prometheusds}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "rgb(251, 252, 250)", + "value": null + } + ] + }, + "unit": "decgbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 22, + "y": 6 + }, + "id": 181, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "expr": "sum(openstack_nova_local_storage_available_bytes{hostname=~\"$hypervisor.*\"}) / 1000000000", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Total", + "transformations": [], + "type": "stat" + }, + { + "datasource": "${prometheusds}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "displayMode": "auto", + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Value #cpu_time" + }, + "properties": [ + { + "id": "unit", + "value": "s" + }, + { + "id": "displayName", + "value": "CPU time" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #mem_usage" + }, + "properties": [ + { + "id": "unit", + "value": "decbytes" + }, + { + "id": "displayName", + "value": "Mem Usage" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #net_throughput" + }, + "properties": [ + { + "id": "displayName", + "value": " Net Throughput" + }, + { + "id": "unit", + "value": "Bps" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #packets_rate" + }, + "properties": [ + { + "id": "displayName", + "value": "Packets Rate" + }, + { + "id": "unit", + "value": "pps" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #net_errors" + }, + "properties": [ + { + "id": "displayName", + "value": "Net Errors" + }, + { + "id": "unit", + "value": "cps" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #packets_drops" + }, + "properties": [ + { + "id": "displayName", + "value": "Packets Drops" + }, + { + "id": "unit", + "value": "pps" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #disks_iops" + }, + "properties": [ + { + "id": "displayName", + "value": "Disks IOPS" + }, + { + "id": "unit", + "value": "iops" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #disks_throughput" + }, + "properties": [ + { + "id": "displayName", + "value": "Disks Throughput" + }, + { + "id": "unit", + "value": "Bps" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "instance_name" + }, + "properties": [ + { + "id": "displayName", + "value": "Instance" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "project_name" + }, + "properties": [ + { + "id": "displayName", + "value": "Project" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "uuid" + }, + "properties": [ + { + "id": "displayName", + "value": "UUID" + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 19 + }, + "id": 177, + "options": { + "footer": { + "enablePagination": true, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "frameIndex": 0, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "expr": "rate(libvirt_domain_info_cpu_time_seconds_total[2m]) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "__auto", + "refId": "cpu_time" + }, + { + "expr": "libvirt_domain_info_memory_usage_bytes * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "__auto", + "refId": "mem_usage" + }, + { + "expr": "(sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_receive_bytes_total[2m])) + sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_transmit_bytes_total[2m]))) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "__auto", + "refId": "net_throughput" + }, + { + "expr": "(sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_receive_packets_total[2m])) + sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_transmit_packets_total[2m]))) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "__auto", + "refId": "packets_rate" + }, + { + "expr": "(sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_receive_errors_total[2m])) + sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_transmit_errors_total[2m]))) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "__auto", + "refId": "net_errors" + }, + { + "expr": "(sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_receive_drops_total[2m])) + sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_transmit_drops_total[2m]))) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "__auto", + "refId": "packets_drops" + }, + { + "expr": "(sum by(juju_unit, domain) (rate(libvirt_domain_block_stats_read_requests_total[2m])) + sum by(juju_unit, domain) (rate(libvirt_domain_block_stats_write_requests_total[2m]))) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "__auto", + "refId": "disks_iops" + }, + { + "expr": "(sum by(juju_unit, domain) (rate(libvirt_domain_block_stats_read_bytes_total[2m])) + sum by(juju_unit, domain) (rate(libvirt_domain_block_stats_write_bytes_total[2m]))) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "__auto", + "refId": "disks_throughput" + } + ], + "title": "Instances stats", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "instance_name", + "project_name", + "uuid", + "juju_unit", + "Value #cpu_time", + "Value #mem_usage", + "Value #net_throughput", + "Value #packets_rate", + "Value #net_errors", + "Value #disks_iops", + "Value #disks_throughput", + "Value #packets_drops" + ] + } + } + }, + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": { + "Value #cpu_time": 2, + "Value #disks_iops": 8, + "Value #disks_throughput": 9, + "Value #mem_usage": 3, + "Value #net_errors": 6, + "Value #net_throughput": 4, + "Value #packets_drops": 7, + "Value #packets_rate": 5, + "juju_unit": 11, + "instance_name": 0, + "project_name": 1, + "uuid": 10 + }, + "renameByName": {} + } + } + ], + "type": "table" + }, + { + "datasource": "${prometheusds}", + "description": "CPU time used by the domain, in seconds - rate over 1min", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 29 + }, + "id": 8, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "expr": "rate(libvirt_domain_info_cpu_time_seconds_total[2m]) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}", + "interval": "", + "legendFormat": "{{project_name}} | {{instance_name}} | {{uuid}}", + "refId": "A" + } + ], + "title": "CPU Time", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 38 + }, + "id": 10, + "panels": [], + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "Memory", + "type": "row" + }, + { + "datasource": "${prometheusds}", + "description": "Total memory used per hypervisor", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 9, + "x": 0, + "y": 39 + }, + "id": 16, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "expr": "sum by(juju_unit) (libvirt_domain_info_memory_usage_bytes)", + "interval": "", + "legendFormat": "{{juju_unit}}", + "refId": "A" + } + ], + "title": "Cumulative Memory Usage", + "type": "timeseries" + }, + { + "datasource": "${prometheusds}", + "description": "Instance memory usage, stacked", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 9, + "y": 39 + }, + "id": 12, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "expr": "libvirt_domain_info_memory_usage_bytes * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}", + "interval": "", + "legendFormat": "{{project_name}} | {{instance_name}} | {{uuid}}", + "refId": "A" + } + ], + "title": "Instance Memory Usage", + "type": "timeseries" + }, + { + "datasource": "${prometheusds}", + "description": "Maximum allowed memory per instance", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "#ffffff", + "mode": "fixed" + }, + "custom": { + "align": "auto", + "displayMode": "auto", + "filterable": false, + "inspect": false, + "minWidth": 50 + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "decbytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "instance_name" + }, + "properties": [ + { + "id": "displayName", + "value": "Instance" + }, + { + "id": "custom.filterable", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "project_name" + }, + "properties": [ + { + "id": "displayName", + "value": "Project" + }, + { + "id": "custom.filterable", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "uuid" + }, + "properties": [ + { + "id": "displayName", + "value": "UUID" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ + { + "id": "displayName", + "value": "Memory" + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 7, + "x": 17, + "y": 39 + }, + "id": 14, + "options": { + "footer": { + "enablePagination": true, + "fields": [ + "Value" + ], + "reducer": [ + "sum" + ], + "show": true + }, + "showHeader": true, + "sortBy": [ + { + "desc": false, + "displayName": "Memory" + } + ] + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "expr": "libvirt_domain_info_maximum_memory_bytes * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "__auto", + "refId": "A" + } + ], + "title": "Max Instance Memory", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "instance_name", + "project_name", + "uuid", + "Value" + ] + } + } + } + ], + "type": "table" + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 47 + }, + "id": 20, + "panels": [], + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "Network", + "type": "row" + }, + { + "datasource": "${prometheusds}", + "description": "Network traffic in bytes, rate over 1min, receive/transmit per instance, cumulative over all interfaces", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "Bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 48 + }, + "id": 18, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "expr": "sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_receive_bytes_total[2m])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}", + "interval": "", + "legendFormat": "rx: {{project_name}} | {{instance_name}} | {{uuid}}", + "refId": "A" + }, + { + "expr": "sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_transmit_bytes_total[2m])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}", + "interval": "", + "legendFormat": "tx: {{project_name}} | {{instance_name}} | {{uuid}}", + "refId": "B" + } + ], + "title": "Instance Network Throughput", + "type": "timeseries" + }, + { + "datasource": "${prometheusds}", + "description": "Network traffic in packets, rate over 1min, receive/transmit per instance, cumulative over all interfaces", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "pps" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 48 + }, + "id": 22, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "expr": "sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_receive_packets_total[2m])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}", + "interval": "", + "legendFormat": "rx: {{project_name}} | {{instance_name}} | {{uuid}}", + "refId": "A" + }, + { + "expr": "sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_transmit_packets_total[2m])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}", + "interval": "", + "legendFormat": "tx: {{project_name}} | {{instance_name}} | {{uuid}}", + "refId": "B" + } + ], + "title": "Instance Packet Rate", + "type": "timeseries" + }, + { + "datasource": "${prometheusds}", + "description": "Total network throughput rates per hypervisor, rate over 1min", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 57 + }, + "id": 24, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "expr": "sum by(juju_unit) (rate(libvirt_domain_interface_stats_receive_bytes_total[2m]))", + "interval": "", + "legendFormat": "rx: {{juju_unit}}", + "refId": "A" + }, + { + "expr": "sum by(juju_unit) (rate(libvirt_domain_interface_stats_transmit_bytes_total[2m]))", + "interval": "", + "legendFormat": "tx: {{juju_unit}}", + "refId": "B" + } + ], + "title": "Cumulative Network Throughput", + "type": "timeseries" + }, + { + "datasource": "${prometheusds}", + "description": "Total network throughput rates per hypervisor, rate over 1min", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "pps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 57 + }, + "id": 25, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "expr": "sum by(juju_unit) (rate(libvirt_domain_interface_stats_receive_packets_total[2m]))", + "interval": "", + "legendFormat": "rx: {{juju_unit}}", + "refId": "A" + }, + { + "expr": "sum by(juju_unit) (rate(libvirt_domain_interface_stats_transmit_packets_total[2m]))", + "interval": "", + "legendFormat": "tx: {{juju_unit}}", + "refId": "B" + } + ], + "title": "Cumulative Packet Rate", + "type": "timeseries" + }, + { + "datasource": "${prometheusds}", + "description": "Instance errors and drops, transmit and receive. Rate over 1min", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 11, + "w": 24, + "x": 0, + "y": 65 + }, + "id": 33, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "expr": "sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_receive_errors_total[2m])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}", + "interval": "", + "legendFormat": "rx err: {{project_name}} | {{instance_name}} | {{uuid}}", + "refId": "A" + }, + { + "expr": "sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_transmit_errors_total[2m])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}", + "interval": "", + "legendFormat": "tx err: {{project_name}} | {{instance_name}} | {{uuid}}", + "refId": "B" + }, + { + "expr": "sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_receive_drops_total[2m])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}", + "interval": "", + "legendFormat": "rx drop: {{project_name}} | {{instance_name}} | {{uuid}}", + "refId": "C" + }, + { + "expr": "sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_transmit_drops_total[2m])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}", + "interval": "", + "legendFormat": "tx drop: {{project_name}} | {{instance_name}} | {{uuid}}", + "refId": "D" + } + ], + "title": "Instance Errors and Drops", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 76 + }, + "id": 35, + "panels": [], + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "Disk", + "type": "row" + }, + { + "datasource": "${prometheusds}", + "description": "Instance block dev read request rate over 1min", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 77 + }, + "id": 37, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "expr": "sum by(juju_unit, domain, target_device) (rate(libvirt_domain_block_stats_read_requests_total[2m])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}", + "interval": "", + "legendFormat": "{{project_name}} | {{instance_name}} | {{uuid}} | {{target_device}}", + "refId": "A" + } + ], + "title": "IOPS Read", + "type": "timeseries" + }, + { + "datasource": "${prometheusds}", + "description": "Instance block dev write request rate over 1min", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 77 + }, + "id": 39, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "expr": "sum by(juju_unit, domain, target_device) (rate(libvirt_domain_block_stats_write_requests_total[2m])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}", + "interval": "", + "legendFormat": "{{project_name}} | {{instance_name}} | {{uuid}} | {{target_device}}", + "refId": "A" + } + ], + "title": "IOPS Write", + "type": "timeseries" + }, + { + "datasource": "${prometheusds}", + "description": "Instance block device read bytes rate over 1min", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 85 + }, + "id": 40, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "expr": "sum by(juju_unit, domain, target_device) (rate(libvirt_domain_block_stats_read_bytes_total[2m])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}", + "interval": "", + "legendFormat": "{{project_name}} | {{instance_name}} | {{uuid}} | {{target_device}}", + "refId": "A" + } + ], + "title": "Throughput Read", + "type": "timeseries" + }, + { + "datasource": "${prometheusds}", + "description": "Instance block device write bytes rate over 1min", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 85 + }, + "id": 38, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "expr": "sum by(juju_unit, domain, target_device) (rate(libvirt_domain_block_stats_write_bytes_total[2m])) * on(domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}", + "interval": "", + "legendFormat": "{{project_name}} | {{instance_name}} | {{uuid}} | {{target_device}}", + "refId": "A" + } + ], + "title": "Throughput Write", + "type": "timeseries" + } + ], + "refresh": "", + "schemaVersion": 27, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": "${prometheusds}", + "definition": "", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": null, + "multi": true, + "name": "hypervisor", + "options": [], + "query": { + "query": "openstack_nova_vcpus_available", + "refId": "${prometheusds}-hypervisor-Variable-Query" + }, + "refresh": 1, + "regex": ".*hostname=\"([^\"]+).*", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": null, + "tags": [], + "tagsQuery": null, + "type": "query", + "useTags": false + }, + { + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": "${prometheusds}", + "definition": "", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "project", + "options": [], + "query": { + "query": "libvirt_domain_info_meta", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": ".*project_name=\"([^\"]+).*", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-24h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "utc", + "title": "OpenStack Hypervisor Overview", + "version": 1 +} diff --git a/src/grafana_dashboards/overview-openstack-exporter-dashboard.json b/src/grafana_dashboards/overview-openstack-exporter-dashboard.json new file mode 100644 index 0000000..77b2059 --- /dev/null +++ b/src/grafana_dashboards/overview-openstack-exporter-dashboard.json @@ -0,0 +1,1791 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 107, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 158, + "panels": [], + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "General information", + "type": "row" + }, + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "editable": true, + "error": false, + "gridPos": { + "h": 5, + "w": 24, + "x": 0, + "y": 1 + }, + "height": "200px", + "id": 26, + "links": [], + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "# Openstack dashboard\n\n* filter by juju_model (for openstack models) if connected to multiple clouds\n* openstack data is cached, currently refreshed every 5 minutes\n* The VM creation / teardown graph doesn't show the values for the builders in scalingstacks because they happen a lot faster than our scrape interval\n* \"Free IPs\" are not owned by any tenant and available for allocation\n* \"Unused IPs\" are owned by a tenant but not currently associated with an instance", + "mode": "markdown" + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "type": "text" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 4, + "x": 0, + "y": 6 + }, + "id": 160, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "expr": "sum(openstack_nova_running_vms{aggregates=~\"$aggregate\"})", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Scheduled VMs", + "type": "stat" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 4, + "x": 4, + "y": 6 + }, + "id": 161, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "expr": "count(group by(tenant) (openstack_nova_limits_instances_max))", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Number of projects", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 80 + }, + { + "color": "red", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 8, + "y": 6 + }, + "id": 162, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "expr": "(ceph_cluster_total_used_bytes / ceph_cluster_total_bytes) * 100", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Ceph Storage", + "transformations": [], + "type": "gauge" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 80 + }, + { + "color": "red", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 12, + "y": 6 + }, + "id": 165, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "expr": "sum(openstack_nova_vcpus_used{aggregates=~\"$aggregate\"}) / sum(openstack_nova_vcpus_available{aggregates=~\"$aggregate\"}) * 100", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "CPU Subscription", + "transformations": [], + "type": "gauge" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 80 + }, + { + "color": "red", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 16, + "y": 6 + }, + "id": 168, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "expr": "sum(openstack_nova_memory_used_bytes{aggregates=~\"$aggregate\"}) / sum(openstack_nova_memory_available_bytes{aggregates=~\"$aggregate\"}) * 100", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Mem Subscription", + "transformations": [], + "type": "gauge" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 80 + }, + { + "color": "red", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 20, + "y": 6 + }, + "id": 171, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "expr": "sum(openstack_neutron_network_ip_availabilities_used{subnet_name=\"$neutron_net\"}) / sum(openstack_neutron_network_ip_availabilities_total{subnet_name=\"$neutron_net\"}) * 100", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "IPs available in $neutron_net", + "transformations": [], + "type": "gauge" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "rgb(229, 231, 235)", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 8, + "y": 11 + }, + "id": 163, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "expr": "ceph_cluster_total_used_bytes", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Used", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "rgb(253, 255, 253)", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 10, + "y": 11 + }, + "id": 164, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "expr": "ceph_cluster_total_bytes", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Total", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "rgb(229, 231, 235)", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 12, + "y": 11 + }, + "id": 166, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "expr": "sum(openstack_nova_vcpus_used{aggregates=~\"$aggregate\"})", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Allocated", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "rgb(251, 252, 250)", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 14, + "y": 11 + }, + "id": 167, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "expr": "sum(openstack_nova_vcpus_available{aggregates=~\"$aggregate\"})", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Total", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "rgb(229, 231, 235)", + "value": null + } + ] + }, + "unit": "decmbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 16, + "y": 11 + }, + "id": 169, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "expr": "sum(openstack_nova_memory_used_bytes{aggregates=~\"$aggregate\"}) / 1e+06", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Allocated", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "rgb(251, 252, 250)", + "value": null + } + ] + }, + "unit": "decmbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 18, + "y": 11 + }, + "id": 170, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "expr": "sum(openstack_nova_memory_available_bytes{aggregates=~\"$aggregate\"}) / 1e+06", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Total", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "rgb(229, 231, 235)", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 20, + "y": 11 + }, + "id": 172, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "expr": "sum(openstack_neutron_network_ip_availabilities_used{subnet_name=\"$neutron_net\"})", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Allocated", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "rgb(229, 231, 235)", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 22, + "y": 11 + }, + "id": 173, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "expr": "sum(openstack_neutron_network_ip_availabilities_total{subnet_name=\"$neutron_net\"})", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Total", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decgbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 14 + }, + "id": 14, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "expr": "(sum by(aggregates) (openstack_nova_local_storage_available_bytes * on(hostname) group_left() openstack_placement_resource_allocation_ratio{resourcetype=\"DISK_GB\"} / 1e+09)) - (sum by(aggregates) (openstack_nova_local_storage_used_bytes) / 1e+09)", + "intervalFactor": 2, + "legendFormat": "{{aggregate}}", + "refId": "A", + "step": 240 + } + ], + "title": "Free Disk by aggregate", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 14 + }, + "id": 16, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "expr": "sum by(aggregate) (openstack_nova_running_vms{aggregates=~\".+\"})", + "intervalFactor": 2, + "legendFormat": "{{aggregate}}", + "refId": "A", + "step": 240 + } + ], + "title": "Running VMs by aggregate", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 20 + }, + "id": 21, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "expr": "topk(10, count by(tenant_id) (openstack_nova_server_status))", + "intervalFactor": 2, + "legendFormat": "{{tenant}}", + "refId": "A", + "step": 240 + } + ], + "title": "Top instance projects", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 20 + }, + "id": 30, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "expr": "count by(status) (openstack_nova_server_status)", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{status}}", + "refId": "A", + "step": 120 + } + ], + "title": "Instances by state", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "displayMode": "color-background", + "inspect": false + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(245, 54, 54, 0.9)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 16 + }, + { + "color": "rgba(50, 172, 45, 0.97)", + "value": 32 + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "unit", + "value": "time: YYYY-MM-DD HH:mm:ss" + }, + { + "id": "custom.align" + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 8, + "x": 0, + "y": 27 + }, + "hideTimeOverride": true, + "id": 28, + "links": [], + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "expr": "sum by(hostname) (openstack_nova_memory_available_bytes) / 1e+09 - sum by(hostname) (openstack_nova_memory_used_bytes) / 1e+09", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{hostname}}", + "refId": "A", + "step": 4 + } + ], + "timeFrom": "20m", + "title": "Free RAM GBs per host", + "transformations": [ + { + "id": "reduce", + "options": { + "includeTimeField": false, + "reducers": [ + "lastNotNull" + ] + } + } + ], + "type": "table" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "displayMode": "color-background", + "inspect": false + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(245, 54, 54, 0.9)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 100 + }, + { + "color": "rgba(50, 172, 45, 0.97)", + "value": 200 + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "unit", + "value": "time: YYYY-MM-DD HH:mm:ss" + }, + { + "id": "custom.align" + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 8, + "x": 8, + "y": 27 + }, + "hideTimeOverride": true, + "id": 29, + "links": [], + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "expr": "sum by(hostname) (openstack_nova_local_storage_available_bytes) / 1e+09 - sum by(hostname) (openstack_nova_local_storage_used_bytes) / 1e+09", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{hostname}}", + "refId": "A", + "step": 4 + } + ], + "timeFrom": "20m", + "title": "Free disk GBs per host", + "transformations": [ + { + "id": "reduce", + "options": { + "includeTimeField": false, + "reducers": [ + "lastNotNull" + ] + } + } + ], + "type": "table" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "displayMode": "color-background", + "inspect": false + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(245, 54, 54, 0.9)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 100 + }, + { + "color": "rgba(50, 172, 45, 0.97)", + "value": 200 + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "unit", + "value": "time: YYYY-MM-DD HH:mm:ss" + }, + { + "id": "custom.align" + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 8, + "x": 16, + "y": 27 + }, + "hideTimeOverride": true, + "id": 179, + "links": [], + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "expr": "sum by(hostname) (openstack_nova_vcpus_available) - sum by(hostname) (openstack_nova_vcpus_used)", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{hypervisor_hostname}}", + "refId": "A", + "step": 4 + } + ], + "timeFrom": "20m", + "title": "Free vCPUs per host", + "transformations": [ + { + "id": "reduce", + "options": { + "includeTimeField": false, + "reducers": [ + "lastNotNull" + ] + } + } + ], + "type": "table" + } + ], + "refresh": "", + "schemaVersion": 37, + "style": "dark", + "tags": [ + "is-infra" + ], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "external-subnet", + "value": "external-subnet" + }, + "datasource": { + "uid": "${prometheusds}" + }, + "definition": "", + "hide": 2, + "includeAll": false, + "label": "Subnets", + "multi": true, + "name": "neutron_net", + "options": [], + "query": { + "query": "openstack_neutron_network_ip_availabilities_total", + "refId": "${prometheusds}-neutron_net-Variable-Query" + }, + "refresh": 1, + "regex": ".*subnet_name=\"([^\"]+).*", + "skipUrlSync": false, + "sort": 0, + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "uid": "${prometheusds}" + }, + "definition": "", + "hide": 2, + "includeAll": true, + "multi": false, + "name": "hypervisor", + "options": [], + "query": { + "query": "hypervisor_vcpus_total{}", + "refId": "${prometheusds}-hypervisor-Variable-Query" + }, + "refresh": 1, + "regex": ".*hypervisor_hostname=\"([^\"]+).*", + "skipUrlSync": false, + "sort": 0, + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "uid": "${prometheusds}" + }, + "definition": "", + "hide": 0, + "includeAll": true, + "label": "Availability zone", + "multi": false, + "name": "aggregate", + "options": [], + "query": { + "query": "openstack_nova_vcpus_available", + "refId": "${prometheusds}-aggregate-Variable-Query" + }, + "refresh": 1, + "regex": ".*aggregates=\"([^\"]+).*", + "skipUrlSync": false, + "sort": 0, + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-24h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "utc", + "title": "OpenStack Overview", + "uid": "7d177394-f0b4-11ee-9495-9b832692810a", + "version": 1, + "weekStart": "" +}