From e9b09b72d2520d6f126ec2b10b26919af3d4281f Mon Sep 17 00:00:00 2001 From: Yaarit Hatuka Date: Mon, 7 Mar 2022 21:05:43 -0500 Subject: [PATCH] INSTALL: Add telemetry server installation documentation Add also the dashboard's JSON files for an easy Grafana installation. Signed-off-by: Yaarit Hatuka --- INSTALL.md | 126 + compress_raw_reports_telemetry.sh | 16 + .../cluster_all_reports_by_cluster_id.json | 202 ++ .../cluster/cluster_autoscaler_mode.json | 301 +++ .../cluster/cluster_capacity_density.json | 1453 +++++++++++ .../cluster_clusters_by_reports_count.json | 174 ++ .../cluster/cluster_ec_clay_plugin.json | 148 ++ .../private/cluster/cluster_leaderboard.json | 813 +++++++ dashboard/private/cluster/cluster_main.json | 2150 ++++++++++++++++ .../private/cluster/cluster_objectstore.json | 1065 ++++++++ .../cluster/cluster_raw_cluster_report.json | 266 ++ dashboard/private/cluster/cluster_rbd.json | 549 +++++ .../cluster_replicated_pool_with_ec.json | 241 ++ .../private/cluster/cluster_report_table.json | 280 +++ .../crash_all_versions_minors_crashiness.json | 283 +++ .../private/crash/crash_crash_spec_x-ray.json | 2081 ++++++++++++++++ .../private/crash/crash_crash_x-ray.json | 1689 +++++++++++++ dashboard/private/crash/crash_main.json | 1228 ++++++++++ .../private/crash/crash_spec_search.json | 720 ++++++ .../private/device/device_all_reports.json | 269 ++ .../device/device_by_vendor_and_model.json | 397 +++ .../device/device_distinct_model_count.json | 286 +++ .../device/device_failure_prediction.json | 748 ++++++ dashboard/private/device/device_main.json | 2167 +++++++++++++++++ .../device/device_models_per_vendor.json | 317 +++ .../device/device_prediction_by_id.json | 449 ++++ .../private/device/device_raw_report.json | 257 ++ .../device/device_raw_report_open.json | 257 ++ db_create_device.sql | 3 - db_create_roles.sql | 4 + install/crontab_telemetry | 4 + install/docker-compose.yml | 23 + install/grafana_dashboards_ini.yml | 9 + install/telemetry-ssl.conf | 30 + 34 files changed, 19002 insertions(+), 3 deletions(-) create mode 100644 INSTALL.md create mode 100755 compress_raw_reports_telemetry.sh create mode 100644 dashboard/private/cluster/cluster_all_reports_by_cluster_id.json create mode 100644 dashboard/private/cluster/cluster_autoscaler_mode.json create mode 100644 dashboard/private/cluster/cluster_capacity_density.json create mode 100644 dashboard/private/cluster/cluster_clusters_by_reports_count.json create mode 100644 dashboard/private/cluster/cluster_ec_clay_plugin.json create mode 100644 dashboard/private/cluster/cluster_leaderboard.json create mode 100644 dashboard/private/cluster/cluster_main.json create mode 100644 dashboard/private/cluster/cluster_objectstore.json create mode 100644 dashboard/private/cluster/cluster_raw_cluster_report.json create mode 100644 dashboard/private/cluster/cluster_rbd.json create mode 100644 dashboard/private/cluster/cluster_replicated_pool_with_ec.json create mode 100644 dashboard/private/cluster/cluster_report_table.json create mode 100644 dashboard/private/crash/crash_all_versions_minors_crashiness.json create mode 100644 dashboard/private/crash/crash_crash_spec_x-ray.json create mode 100644 dashboard/private/crash/crash_crash_x-ray.json create mode 100644 dashboard/private/crash/crash_main.json create mode 100644 dashboard/private/crash/crash_spec_search.json create mode 100644 dashboard/private/device/device_all_reports.json create mode 100644 dashboard/private/device/device_by_vendor_and_model.json create mode 100644 dashboard/private/device/device_distinct_model_count.json create mode 100644 dashboard/private/device/device_failure_prediction.json create mode 100644 dashboard/private/device/device_main.json create mode 100644 dashboard/private/device/device_models_per_vendor.json create mode 100644 dashboard/private/device/device_prediction_by_id.json create mode 100644 dashboard/private/device/device_raw_report.json create mode 100644 dashboard/private/device/device_raw_report_open.json create mode 100644 install/crontab_telemetry create mode 100644 install/docker-compose.yml create mode 100644 install/grafana_dashboards_ini.yml create mode 100644 install/telemetry-ssl.conf diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..83bcfe8 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,126 @@ +# Ceph Telemetry Installation + +## Minimum requirements +- RHEL 8 based OS +- PostgreSQL version 10.0 and up. Tested up to 14.2 +- Grafana open source 8.1 and up +- Apache HTTP Server 2.4 and up +- 16 GB RAM +- 4 cores processor for 2500 reporting clusters +- Disk space - On average 430 KB per cluster per day. + +## Clone the Telemetry git repository +We will clone the repository into the user's home directory and will reference this path later in the installation +```bash +cd ~ +git clone https://github.com/ceph/ceph-telemetry.git +``` + +## Install PostgreSQL and Grafana +You can install Postgres and Grafana from RPM or as containers. Below is how to install as containers + +1. Create a directories for the grafana container persistent storage, and populate them. In this example we'll use the base dir /opt/telemetry_grafana. +```bash +sudo mkdir /opt/telemetry_grafana +sudo mkdir -p /opt/telemetry_grafana/var/lib/grafana +sudo chmod a+rwx /opt/telemetry_grafana/var/lib/grafana +sudo mkdir -p /opt/telemetry_grafana/etc/grafana/provisioning/dashboards +sudo mkdir -p /opt/telemetry_grafana/etc/grafana_dashboards + +sudo cp ~/ceph-telemetry/install/grafana_dashboards_ini.yml /opt/telemetry_grafana/etc/grafana/provisioning/dashboards +sudo cp -a ~/ceph-telemetry/dashboard/private/* /opt/telemetry_grafana/etc/grafana_dashboards +sudo find /opt/telemetry_grafana/etc/grafana_dashboards/ -name "*.json" -exec sed -i "s/\${DS_POSTGRESQL}/PostgreSQL/g" {} \; +``` + +2. Edit the docker-compose template `install/docker-compose.yml`. Change the following: + - : Choose a password for the database "postgres" user, which is the PostgreSQL super user + - : persistent storage for the database files + - : FQDN of the server on which Grafana is running + - /opt/telemetry_grafana : persistent storage basedir for the Grafana database files +3. Run `cd install; docker-compose up -d` + +### Provision database +#### Create roles, passwords, and data source names (DSN) +```bash +sudo mkdir -p /opt/telemetry # Stores database passwords and DSNs (connection strings) + +# Create passwords for the various database users +uuidgen -r | sudo tee /opt/telemetry/pg_pass_telemetry +uuidgen -r | sudo tee /opt/telemetry/pg_pass_grafana +uuidgen -r | sudo tee /opt/telemetry/pg_pass_grafana_ro +uuidgen -r | sudo tee /opt/telemetry/pg_pass_dashboard +echo host=127.0.0.1 dbname=telemetry user=grafana password=$(cat /opt/telemetry/pg_pass_grafana) |sudo tee /opt/telemetry/grafana.dsn + +``` +Run in `psql`, replacing the $PG_PASS* with the corresponding passwords generated above +```SQL +CREATE USER telemetry WITH PASSWORD '$PG_PASS_TELEMETRY'; +CREATE USER grafana WITH PASSWORD '$PG_PASS_GRAFANA'; +CREATE USER grafana_ro WITH PASSWORD '$PG_PASS_GRAFANA_RO'; +CREATE USER dashboard WITH PASSWORD '$PG_PASS_DASHBOARD' NOINHERIT; +CREATE DATABASE telemetry OWNER telemetry; +``` + +#### Import DDLs +```bash +cd ~/ceph-telemetry +psql -v ON_ERROR_STOP=1 -b -h 127.0.0.1 -U telemetry telemetry < tables.txt +psql -v ON_ERROR_STOP=1 -b -h 127.0.0.1 -U postgres telemetry < db_create_cluster.sql +psql -v ON_ERROR_STOP=1 -b -h 127.0.0.1 -U telemetry telemetry < db_create_device.sql +psql -v ON_ERROR_STOP=1 -b -h 127.0.0.1 -U postgres telemetry < db_create_roles.sql +psql -v ON_ERROR_STOP=1 -b -h 127.0.0.1 -U grafana telemetry < db_create_dashboard.sql +psql -v ON_ERROR_STOP=1 -b -h 127.0.0.1 -U grafana telemetry < db_create_dashboard_device.sql +``` +### Configure Grafana +1. Login to Grafana via a browser (port 3000) with the default username 'admin' and password 'admin'. +2. Configure a data source of the postgres server + 1. Use `grafana_ro` as the database user, with the password that is saved in `/opt/telemetry/pg_pass_grafana_ro` + 2. You may need to use the host's IP address (not localhost) + +## Install Apache HTTP server +1. run: +```bash +sudo dnf install -y httpd python3-mod_wsgi mod_ssl mod_evasive openssl python3-requests python3-flask python3-flask-restful python3-psycopg2 lz4 +sudo cp ~/ceph-telemetry/install/telemetry-ssl.conf /etc/httpd/conf.d/ +``` +2. Generate web server certificates for the telemetry server's public FQDN. Below instructions are of how to generate self-signed certificates that should not be used in production +```bash +sudo mkdir -p /etc/telemetry/ssl +sudo openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/telemetry/ssl/telemetry.key -out /etc/telemetry/ssl/telemetry.crt +``` +3. Edit `/etc/httpd/conf.d/telemetry-ssl.conf` and change the following to match your environment: + - ServerName + - SSLCertificateFile, SSLCertificateKeyFile +4. You may need to configure SELinux to allow httpd access to the telemetry wsgi using `semanage permissive -a httpd_t` +5. run: +```bash +sudo systemctl enable --now httpd +``` + +## Install the Telemetry server +run: +```bash +cd ~/ceph-telemetry +sudo cp -a server /opt/telemetry/ +sudo cp import_crashes.py import_clusters.py import_devices.py compress_raw_reports_telemetry.sh dbhelper.py compress_raw_reports_telemetry.sh /opt/telemetry/ +cd /opt/telemetry +sudo ln -s pg_pass_telemetry pg_pass.txt +sudo mkdir log +sudo chown apache log +sudo mkdir raw +sudo chmod a+rwx raw +``` +#### Add Telemetry importers to cron +Create a "telemetry" user unix account and then run: +```bash +sudo crontab -u telemetry install/crontab_telemetry +``` + +# Backing up the Telemetry server +Backing up the server involves backing up the PostgreSQL database by running +```bash +PGPASSWORD= pg_dumpall postgres | lz4 -c > telemetry_server.sql.lz4 +``` +and then copying the resultant file out of the telemetry server host. +Please note that is the same as in the docker-compose.yml +file. diff --git a/compress_raw_reports_telemetry.sh b/compress_raw_reports_telemetry.sh new file mode 100755 index 0000000..a3b0b9b --- /dev/null +++ b/compress_raw_reports_telemetry.sh @@ -0,0 +1,16 @@ +#! /bin/bash + +# Deal with spaces in filenames: +# https://www.reeltoreel.nl/wiki/index.php/Dealing_with_spaces_in_filenames +# The default value of IFS is " \t\n" (e.g. ) +SAVEIFS=$IFS +IFS=$(echo -en "\n\b") + +path="/opt/telemetry/raw/" + +for f in `ls -1 $path | grep -v ".gz"`; do + echo $f + gzip $path/$f +done + +IFS=$SAVEIFS diff --git a/dashboard/private/cluster/cluster_all_reports_by_cluster_id.json b/dashboard/private/cluster/cluster_all_reports_by_cluster_id.json new file mode 100644 index 0000000..302767e --- /dev/null +++ b/dashboard/private/cluster/cluster_all_reports_by_cluster_id.json @@ -0,0 +1,202 @@ +{ + "__inputs": [ + { + "name": "DS_POSTGRESQL", + "label": "PostgreSQL", + "description": "", + "type": "datasource", + "pluginId": "postgres", + "pluginName": "PostgreSQL" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "datasource", + "id": "postgres", + "name": "PostgreSQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + } + ], + "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": 1646868391941, + "links": [], + "panels": [ + { + "datasource": "${DS_POSTGRESQL}", + "fieldConfig": { + "defaults": { + "custom": { + "align": "left", + "displayMode": "auto" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "id" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "See report", + "url": "/d/hyqCQ97Mk/raw-cluster-report?orgId=1&var-id=${__data.fields[id]}" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 11, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "id" + } + ] + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select\nreport_stamp::TEXT, id\nfrom public.report\nwhere \ncluster_id = '$id';", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "All reports of cluster_id: $id", + "type": "table" + } + ], + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "value": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "description": null, + "error": null, + "hide": 0, + "label": "id", + "name": "id", + "options": [ + { + "selected": true, + "text": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "value": "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + ], + "query": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "skipUrlSync": false, + "type": "textbox" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "All reports by cluster id", + "uid": "GJkuC3nMk", + "version": 7 +} diff --git a/dashboard/private/cluster/cluster_autoscaler_mode.json b/dashboard/private/cluster/cluster_autoscaler_mode.json new file mode 100644 index 0000000..ad7199e --- /dev/null +++ b/dashboard/private/cluster/cluster_autoscaler_mode.json @@ -0,0 +1,301 @@ +{ + "__inputs": [], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + } + ], + "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, + "links": [], + "panels": [ + { + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto", + "filterable": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "cluster_id" + }, + "properties": [ + { + "id": "custom.width", + "value": 328 + }, + { + "id": "links", + "value": [ + { + "title": "Show details", + "url": "/d/9pUyOJrWk/cluster-private?orgId=1&var-c_id=${__value.raw}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "report_id" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "Show details", + "url": "/d/hyqCQ97Mk/raw-cluster-report?orgId=1&var-id=${__value.raw}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "total_bytes" + }, + "properties": [ + { + "id": "unit", + "value": "decbytes" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "total_used_bytes" + }, + "properties": [ + { + "id": "unit", + "value": "decbytes" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "osd_count" + }, + "properties": [ + { + "id": "unit", + "value": "locale" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "pools_num" + }, + "properties": [ + { + "id": "unit", + "value": "locale" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "pg_num" + }, + "properties": [ + { + "id": "unit", + "value": "locale" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "created" + }, + "properties": [ + { + "id": "custom.width", + "value": 197 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "cluster_versions" + }, + "properties": [ + { + "id": "custom.width", + "value": 234 + } + ] + } + ] + }, + "gridPos": { + "h": 31, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 3, + "options": { + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "total_bytes" + } + ] + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "/*\nwith autoscaler_mode_per_report as (\n\tselect w.report_id, array_agg(distinct(pg_autoscale_mode)) \"autoscaler_mode\"\n\tfrom grafana.pool p\n\tinner join grafana.weekly_reports_sliding w on p.report_id = w.report_id \n\twhere\n\t w.DAILY_WINDOW BETWEEN $__timeTo()::timestamp - interval '1 day' AND $__timeTo()::timestamp\n\tgroup by w.report_id\n)\nselect\n a.autoscaler_mode,\n c.*\nfrom autoscaler_mode_per_report a\ninner join grafana.ts_cluster c on a.report_id = c.report_id;\n*/\n\n\n\nwith autoscaler_mode_per_report as (\n\tselect p.report_id, p.pg_autoscale_mode, count(*) \"total\"\n\tfrom grafana.pool p\n\tinner join grafana.weekly_reports_sliding w on p.report_id = w.report_id \n\twhere\n\t w.DAILY_WINDOW BETWEEN $__timeTo()::timestamp - interval '1 day' AND $__timeTo()::timestamp\n\tgroup by p.report_id, p.pg_autoscale_mode\n),\nauto_scaler_dist as (\n\tselect a.report_id, array_agg(a.pg_autoscale_mode) \"autoscaler_mode\", array_agg(a.total) \"pools_distribution\"\n\tfrom autoscaler_mode_per_report a\n\tgroup by 1\n),\nceph_version as (\n\tselect m.report_id, array_agg(distinct(m.value)) \"cluster_versions\" \n\tfrom grafana.metadata m\n\tinner join auto_scaler_dist d on m.report_id = d.report_id\n\twhere attr = 'ceph_version_norm'\n\tgroup by m.report_id \n)\nselect ad.autoscaler_mode, ad.pools_distribution, c.*, v.cluster_versions --split_part(v.cluster_versions::TEXT, ',', 1) \nfrom auto_scaler_dist ad\ninner join grafana.ts_cluster c on ad.report_id = c.report_id\nleft join ceph_version v on v.report_id = c.report_id \norder by ad.report_id;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Autoscaler mode for all clusters reporting during the week of ${__to:date:YYYY-MM-DD}", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "ipv4_addr_mons": true, + "ipv6_addr_mons": true, + "ts": true, + "v1_addr_mons": true, + "v2_addr_mons": true + }, + "indexByName": { + "autoscaler_mode": 5, + "channel_basic": 9, + "channel_crash": 10, + "channel_device": 11, + "channel_ident": 12, + "cluster_id": 1, + "cluster_versions": 3, + "created": 2, + "fs_count": 22, + "hosts_num": 23, + "ipv4_addr_mons": 17, + "ipv6_addr_mons": 18, + "mon_count": 16, + "osd_count": 15, + "pg_num": 8, + "pools_distribution": 6, + "pools_num": 4, + "rbd_num_pools": 21, + "report_id": 0, + "total_bytes": 13, + "total_used_bytes": 14, + "ts": 7, + "v1_addr_mons": 19, + "v2_addr_mons": 20 + }, + "renameByName": {} + } + } + ], + "type": "table" + } + ], + "refresh": "", + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-6M", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Autoscaler Mode", + "uid": "R9we5VKnk", + "version": 12 +} \ No newline at end of file diff --git a/dashboard/private/cluster/cluster_capacity_density.json b/dashboard/private/cluster/cluster_capacity_density.json new file mode 100644 index 0000000..3008a8b --- /dev/null +++ b/dashboard/private/cluster/cluster_capacity_density.json @@ -0,0 +1,1453 @@ +{ + "__inputs": [], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph (old)", + "version": "" + } + ], + "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, + "links": [], + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 12, + "w": 24, + "x": 0, + "y": 0 + }, + "hiddenSeries": false, + "id": 14, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 0.5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select $__timeGroup(daily_window, '1d', 0), \nPERCENTILE_DISC(0.25) within group (order by c.total_bytes) as p25,\nPERCENTILE_DISC(0.50) within group (order by c.total_bytes) as p50,\nPERCENTILE_DISC(0.75) within group (order by c.total_bytes) as p75,\nPERCENTILE_DISC(1) within group (order by c.total_bytes) as p100\nfrom grafana.weekly_reports_sliding w \ninner join grafana.ts_cluster c on w.report_id = c.report_id\ngroup by daily_window\norder by daily_window;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Cluster / TiB - Capacity Percentiles by a Daily Sliding Window of a Week", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": null, + "format": "bytes", + "label": null, + "logBase": 2, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 12 + }, + "hiddenSeries": false, + "id": 16, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 0.5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select $__timeGroup(daily_window, '1d', 0), \nPERCENTILE_DISC(0.25) within group (order by c.total_bytes) as p25,\nPERCENTILE_DISC(0.50) within group (order by c.total_bytes) as p50,\nPERCENTILE_DISC(0.75) within group (order by c.total_bytes) as p75,\nPERCENTILE_DISC(1) within group (order by c.total_bytes) as p100\nfrom grafana.weekly_reports_sliding w \ninner join grafana.ts_cluster c on w.report_id = c.report_id\nwhere c.total_bytes / 1024 / 1024 / 1024 / 1024 / 1024::real < 1\ngroup by daily_window\norder by daily_window;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Cluster / TiB < 1 PiB - Capacity Percentiles by a Daily Sliding Window of a Week", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": null, + "format": "bytes", + "label": null, + "logBase": 2, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 12 + }, + "hiddenSeries": false, + "id": 18, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 0.5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select $__timeGroup(daily_window, '1d', 0), \nPERCENTILE_DISC(0.25) within group (order by c.total_bytes) as p25,\nPERCENTILE_DISC(0.50) within group (order by c.total_bytes) as p50,\nPERCENTILE_DISC(0.75) within group (order by c.total_bytes) as p75,\nPERCENTILE_DISC(1) within group (order by c.total_bytes) as p100\nfrom grafana.weekly_reports_sliding w \ninner join grafana.ts_cluster c on w.report_id = c.report_id\nwhere c.total_bytes / 1024 / 1024 / 1024 / 1024 / 1024::real > 1\ngroup by daily_window\norder by daily_window;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Cluster / TiB > 1 PiB - Capacity Percentiles by a Daily Sliding Window of a Week", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": null, + "format": "bytes", + "label": null, + "logBase": 2, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 21 + }, + "hiddenSeries": false, + "id": 20, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 0.5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select \ndaily_window as time, \nPERCENTILE_DISC(0.25) within group (order by c.osd_count / c.hosts_num::real) as p25,\nPERCENTILE_DISC(0.50) within group (order by c.osd_count / c.hosts_num::real) as p50,\nPERCENTILE_DISC(0.75) within group (order by c.osd_count / c.hosts_num::real) as p75,\nPERCENTILE_DISC(1) within group (order by c.osd_count / c.hosts_num::real) as p100\nfrom grafana.weekly_reports_sliding w \ninner join grafana.ts_cluster c on w.report_id = c.report_id\ngroup by daily_window\norder by daily_window;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "OSD / Host - Capacity per Hosts Percentiles by a Daily Sliding Window of a Week", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": null, + "format": "locale", + "label": null, + "logBase": 2, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 30 + }, + "hiddenSeries": false, + "id": 22, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 0.5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select daily_window as time, \nPERCENTILE_DISC(0.25) within group (order by c.osd_count / c.hosts_num::real) as p25,\nPERCENTILE_DISC(0.50) within group (order by c.osd_count / c.hosts_num::real) as p50,\nPERCENTILE_DISC(0.75) within group (order by c.osd_count / c.hosts_num::real) as p75,\nPERCENTILE_DISC(1) within group (order by c.osd_count / c.hosts_num::real) as p100\nfrom grafana.weekly_reports_sliding w \ninner join grafana.ts_cluster c on w.report_id = c.report_id\nwhere c.total_bytes / 1024 / 1024 / 1024 / 1024 / 1024::real < 1\ngroup by daily_window\norder by daily_window;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "OSD / Host < 1 PiB - Capacity per Hosts Percentiles by a Daily Sliding Window of a Week", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "locale", + "label": null, + "logBase": 2, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 30 + }, + "hiddenSeries": false, + "id": 24, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 0.5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select daily_window as time, \nPERCENTILE_DISC(0.25) within group (order by c.osd_count / c.hosts_num::real) as p25,\nPERCENTILE_DISC(0.50) within group (order by c.osd_count / c.hosts_num::real) as p50,\nPERCENTILE_DISC(0.75) within group (order by c.osd_count / c.hosts_num::real) as p75,\nPERCENTILE_DISC(1) within group (order by c.osd_count / c.hosts_num::real) as p100\nfrom grafana.weekly_reports_sliding w \ninner join grafana.ts_cluster c on w.report_id = c.report_id\nwhere c.total_bytes / 1024 / 1024 / 1024 / 1024 / 1024::real > 1\ngroup by daily_window\norder by daily_window;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "OSD / Host > 1 PiB - Capacity per Hosts Percentiles by a Daily Sliding Window of a Week", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "locale", + "label": null, + "logBase": 2, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 39 + }, + "hiddenSeries": false, + "id": 8, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 0.5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select daily_window as time, \nPERCENTILE_DISC(0.25) within group (order by c.total_bytes / c.osd_count::real) as p25,\nPERCENTILE_DISC(0.50) within group (order by c.total_bytes / c.osd_count::real) as p50,\nPERCENTILE_DISC(0.75) within group (order by c.total_bytes / c.osd_count::real) as p75,\nPERCENTILE_DISC(1) within group (order by c.total_bytes / c.osd_count::real) as p100\nfrom grafana.weekly_reports_sliding w \ninner join grafana.ts_cluster c on w.report_id = c.report_id\nwhere c.osd_count > 0\ngroup by daily_window\norder by daily_window;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "TiB / OSD - Capacity per OSD Count Percentiles by a Daily Sliding Window of a Week", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 2, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 49 + }, + "hiddenSeries": false, + "id": 10, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 0.5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select daily_window as time, \nPERCENTILE_DISC(0.25) within group (order by c.total_bytes / c.osd_count::real) as p25,\nPERCENTILE_DISC(0.50) within group (order by c.total_bytes / c.osd_count::real) as p50,\nPERCENTILE_DISC(0.75) within group (order by c.total_bytes / c.osd_count::real) as p75,\nPERCENTILE_DISC(1) within group (order by c.total_bytes / c.osd_count::real) as p100\nfrom grafana.weekly_reports_sliding w \ninner join grafana.ts_cluster c on w.report_id = c.report_id\nwhere c.osd_count > 0\nand c.total_bytes / 1024 / 1024 / 1024 / 1024 / 1024::real < 1\ngroup by daily_window\norder by daily_window;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "TiB / OSD < 1 PiB - Capacity per OSD Count Percentiles by a Daily Sliding Window of a Week", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 2, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 49 + }, + "hiddenSeries": false, + "id": 12, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 0.5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select daily_window as time, \nPERCENTILE_DISC(0.25) within group (order by c.total_bytes / c.osd_count::real) as p25,\nPERCENTILE_DISC(0.50) within group (order by c.total_bytes / c.osd_count::real) as p50,\nPERCENTILE_DISC(0.75) within group (order by c.total_bytes / c.osd_count::real) as p75,\nPERCENTILE_DISC(1) within group (order by c.total_bytes / c.osd_count::real) as p100\nfrom grafana.weekly_reports_sliding w \ninner join grafana.ts_cluster c on w.report_id = c.report_id\nwhere c.osd_count > 0\nand c.total_bytes / 1024 / 1024 / 1024 / 1024 / 1024::real > 1\ngroup by daily_window\norder by daily_window;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "TiB / OSD > 1 PiB - Capacity per OSD Count Percentiles by a Daily Sliding Window of a Week", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 2, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 59 + }, + "hiddenSeries": false, + "id": 2, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 0.5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select \ndaily_window as time, \nPERCENTILE_DISC(0.25) within group (order by c.total_bytes / c.hosts_num::real) as p25,\nPERCENTILE_DISC(0.50) within group (order by c.total_bytes / c.hosts_num::real) as p50,\nPERCENTILE_DISC(0.75) within group (order by c.total_bytes / c.hosts_num::real) as p75,\nPERCENTILE_DISC(1) within group (order by c.total_bytes / c.hosts_num::real) as p100\nfrom grafana.weekly_reports_sliding w \ninner join grafana.ts_cluster c on w.report_id = c.report_id\ngroup by daily_window\norder by daily_window;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "TiB / Host - Capacity per Hosts Percentiles by a Daily Sliding Window of a Week", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 2, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 68 + }, + "hiddenSeries": false, + "id": 4, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 0.5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select daily_window as time, \nPERCENTILE_DISC(0.25) within group (order by c.total_bytes / c.hosts_num::real) as p25,\nPERCENTILE_DISC(0.50) within group (order by c.total_bytes / c.hosts_num::real) as p50,\nPERCENTILE_DISC(0.75) within group (order by c.total_bytes / c.hosts_num::real) as p75,\nPERCENTILE_DISC(1) within group (order by c.total_bytes / c.hosts_num::real) as p100\nfrom grafana.weekly_reports_sliding w \ninner join grafana.ts_cluster c on w.report_id = c.report_id\nwhere c.total_bytes / 1024 / 1024 / 1024 / 1024 / 1024::real < 1\ngroup by daily_window\norder by daily_window;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "TiB / Host < 1 PiB - Capacity per Hosts Percentiles by a Daily Sliding Window of a Week", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 2, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 68 + }, + "hiddenSeries": false, + "id": 6, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 0.5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select daily_window as time, \nPERCENTILE_DISC(0.25) within group (order by c.total_bytes / c.hosts_num::real) as p25,\nPERCENTILE_DISC(0.50) within group (order by c.total_bytes / c.hosts_num::real) as p50,\nPERCENTILE_DISC(0.75) within group (order by c.total_bytes / c.hosts_num::real) as p75,\nPERCENTILE_DISC(1) within group (order by c.total_bytes / c.hosts_num::real) as p100\nfrom grafana.weekly_reports_sliding w \ninner join grafana.ts_cluster c on w.report_id = c.report_id\nwhere c.total_bytes / 1024 / 1024 / 1024 / 1024 / 1024::real > 1\ngroup by daily_window\norder by daily_window;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "TiB / Host > 1 PiB - Capacity per Hosts Percentiles by a Daily Sliding Window of a Week", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 2, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-6M", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Capacity Density", + "uid": "Pb90AgCWk", + "version": 4 +} \ No newline at end of file diff --git a/dashboard/private/cluster/cluster_clusters_by_reports_count.json b/dashboard/private/cluster/cluster_clusters_by_reports_count.json new file mode 100644 index 0000000..28315f9 --- /dev/null +++ b/dashboard/private/cluster/cluster_clusters_by_reports_count.json @@ -0,0 +1,174 @@ +{ + "__inputs": [], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "panel", + "id": "table-old", + "name": "Table (old)", + "version": "" + } + ], + "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, + "links": [], + "panels": [ + { + "columns": [], + "datasource": null, + "fontSize": "100%", + "gridPos": { + "h": 19, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "pageSize": null, + "showHeader": true, + "sort": { + "col": null, + "desc": false + }, + "styles": [ + { + "$$hashKey": "object:178", + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "$$hashKey": "object:179", + "alias": "", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "linkTooltip": "", + "linkUrl": "/d/9pUyOJrWk/cluster-private?orgId=1&var-c_id=${__cell}", + "mappingType": 1, + "pattern": "cluster_id", + "thresholds": [], + "type": "string", + "unit": "short" + }, + { + "$$hashKey": "object:180", + "alias": "", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "report timestamp", + "thresholds": [], + "type": "date", + "unit": "short" + }, + { + "$$hashKey": "object:181", + "alias": "", + "align": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "thresholds": [], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select cluster_id, count(*) reports\nfrom grafana.ts_cluster\ngroup by cluster_id\norder by reports desc;\n\n/*\nSELECT\n c.report_id as \"report\",\n c.ts as \"report timestamp\"\nfrom\n grafana.ts_cluster c\nwhere\n c.id = 123\norder by\n c.ts desc\n*/ ", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Clusters by reports count", + "transform": "table", + "type": "table-old" + } + ], + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Clusters by reports count", + "uid": "aPqAwsQMk", + "version": 3 +} \ No newline at end of file diff --git a/dashboard/private/cluster/cluster_ec_clay_plugin.json b/dashboard/private/cluster/cluster_ec_clay_plugin.json new file mode 100644 index 0000000..15fc32a --- /dev/null +++ b/dashboard/private/cluster/cluster_ec_clay_plugin.json @@ -0,0 +1,148 @@ +{ + "__inputs": [], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + } + ], + "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, + "links": [], + "panels": [ + { + "datasource": null, + "description": "All clusters that ever reported a pool with a CLAY EC plugin.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "cluster_id" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "Show details", + "url": "/d/9pUyOJrWk/cluster-private?orgId=1&var-c_id=${__value.raw}" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 19, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "showHeader": true + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "-- CLAY Profile\nwith clay_cluster as (\n\tselect gc.cluster_id, count(gc.*) as \"reports_with_clay_plugin_count\", \n\t\tmax(gc.ts) as \"latest_report\", max(gc.report_id) as \"max_report\"\n\t--\tarray_agg(distinct(replace(pr.report, E'\\\\u0000', ' ')::jsonb#>'{contact}')) as \"contact\"\n\tfrom \n\t\t(select report_id from grafana.pool where ec_plugin = 'clay' group by report_id) clay\n\tinner join grafana.ts_cluster gc on clay.report_id = gc.report_id\n\t--inner join public.report pr on gc.report_id = pr.id \n\tgroup by gc.cluster_id\n)\nselect\n\tclay_cluster.cluster_id,\n\tclay_cluster.reports_with_clay_plugin_count,\n clay_cluster.latest_report,\n\treplace(pr.report, E'\\\\u0000', ' ')::jsonb#>'{organization}' as \"organization\",\n\treplace(pr.report, E'\\\\u0000', ' ')::jsonb#>'{description}' as \"description\",\n\treplace(pr.report, E'\\\\u0000', ' ')::jsonb#>'{contact}' as \"contact\"\nfrom clay_cluster\ninner join public.report pr on clay_cluster.max_report = pr.id\n;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "All Clusters reporting CLAY Plugin", + "type": "table" + } + ], + "refresh": "", + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "EC CLAY Plugin", + "uid": "zAltsvHnk", + "version": 3 +} \ No newline at end of file diff --git a/dashboard/private/cluster/cluster_leaderboard.json b/dashboard/private/cluster/cluster_leaderboard.json new file mode 100644 index 0000000..115e0da --- /dev/null +++ b/dashboard/private/cluster/cluster_leaderboard.json @@ -0,0 +1,813 @@ +{ + "__inputs": [], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + } + ], + "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, + "links": [ + { + "icon": "dashboard", + "tags": [], + "title": "Ceph Telemetry", + "tooltip": "", + "type": "link", + "url": "/d/-GcbjrXZz/telemetry?orgId=1" + } + ], + "panels": [ + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 10, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "description": "All clusters reporting during the last 7 days that enabled leaderboard", + "fieldConfig": { + "defaults": { + "custom": { + "align": null, + "displayMode": "auto", + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "cluster_id" + }, + "properties": [ + { + "id": "unit", + "value": "string" + }, + { + "id": "displayName", + "value": "Cluster ID" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "total_tb" + }, + "properties": [ + { + "id": "displayName", + "value": "Total Capacity (TiB)" + }, + { + "id": "unit", + "value": "locale" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "total_used_tb" + }, + "properties": [ + { + "id": "displayName", + "value": "Total Used Capacity (TiB)" + }, + { + "id": "unit", + "value": "locale" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "osd_count" + }, + "properties": [ + { + "id": "displayName", + "value": "OSD Count" + }, + { + "id": "unit", + "value": "locale" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "id_internal" + }, + "properties": [ + { + "id": "displayName", + "value": "ID - for internal use" + }, + { + "id": "links", + "value": [ + { + "title": "show details", + "url": "/d/9pUyOJrWk/cluster-private?orgId=1&var-c_id=${__value.raw}" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 2, + "options": { + "showHeader": true + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "with leaderboard_clusters as (\n\t-- get all clusters that opted in to leaderboard\n\tselect \n\t\tr.id report_id,\n\t\treplace(r.report, E'\\\\u0000', ' ')::jsonb#>'{organization}' organization,\n\t\treplace(r.report, E'\\\\u0000', ' ')::jsonb#>'{description}' description,\n\t\treplace(r.report, E'\\\\u0000', ' ')::jsonb#>'{contact}' contact\n\t\t--replace(r.report, E'\\\\u0000', ' ')::jsonb ? 'leaderboard', \n\t\t--cluster_id,\n\t\t--r.report_stamp \n\tfrom public.report r\n\t-- we join the materialized view since not all clusters report daily, and mv normalizes this\n\tinner join grafana.weekly_reports_sliding w on r.id = w.report_id\n\twhere\n\t-- replace(report, '\\\\u0000', ' ')::jsonb ? 'leaderboard'\n\t replace(r.report, E'\\\\u0000', ' ')::jsonb#>'{leaderboard}' != 'false'\n\tand\n\t\tdate_trunc('day', daily_window) = date_trunc('day', now() - interval '1 day')\n\t--date_trunc('day', daily_window) = '2021-06-14'\n)\nselect\n cluster_id id_internal,\n\tsubstring(ts.cluster_id, 1, 8) cluster_id,\n\tage(date_trunc('day', ts.created)) as \"Age\",\n\tround(ts.total_bytes / POWER(1024.0, 4)) total_tb, \n\tround(ts.total_used_bytes / POWER(1024.0, 4)) total_used_tb,\n\tts.osd_count,\n\tlc.organization as \"Organization\",\n\tlc.description as \"Description\",\n\tlc.contact as \"Contact\"\n\t--* \nfrom grafana.ts_cluster ts,\n\t leaderboard_clusters lc\nwhere \n--\tts.cluster_id = lc.cluster_id\n--and \n\tts.report_id = lc.report_id\nand ts.osd_count is not null -- some clusters report empty telemetry\norder by total_tb desc\n;\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Leaderboard opted-in - last week", + "type": "table" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 8 + }, + "id": 6, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "description": "All clusters reporting during the last 7 days that enabled 'ident' channel, but not necessarily enabled 'leaderboard'", + "fieldConfig": { + "defaults": { + "custom": { + "align": null, + "displayMode": "auto", + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "cluster_id" + }, + "properties": [ + { + "id": "unit", + "value": "string" + }, + { + "id": "displayName", + "value": "Cluster ID" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "total_tb" + }, + "properties": [ + { + "id": "displayName", + "value": "Total Capacity (TiB)" + }, + { + "id": "unit", + "value": "locale" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "total_used_tb" + }, + "properties": [ + { + "id": "displayName", + "value": "Total Used Capacity (TiB)" + }, + { + "id": "unit", + "value": "locale" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "osd_count" + }, + "properties": [ + { + "id": "displayName", + "value": "OSD Count" + }, + { + "id": "unit", + "value": "locale" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "id_internal" + }, + "properties": [ + { + "id": "displayName", + "value": "ID - for internal use" + }, + { + "id": "unit", + "value": "string" + }, + { + "id": "links", + "value": [ + { + "title": "show details", + "url": "/d/9pUyOJrWk/cluster-private?orgId=1&var-c_id=${__value.raw}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "ID - for internal use" + }, + "properties": [ + { + "id": "custom.width", + "value": 352 + } + ] + } + ] + }, + "gridPos": { + "h": 15, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 3, + "options": { + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "-- leaderboard for all clusters enabled 'ident' channel, but not necessarily 'leadeboard':\nwith ident_clusters as (\n\tselect ts.report_id, ts.cluster_id--, array_agg(ts)\n\tfrom grafana.ts_cluster ts\n\tinner join grafana.weekly_reports_sliding w on ts.report_id = w.report_id\n\twhere channel_ident\n\tand date_trunc('day', w.daily_window) = date_trunc('day', now() - interval '1 day')\n\t--and ts.total_bytes > 0\n\t--ts > '2021-06-01'\n\t--group by cluster_id\n\t)\nselect --ic.report_id, \n ic.cluster_id id_internal,\n\tsubstring(tsc.cluster_id, 1, 8) cluster_id,\n\tround(tsc.total_bytes / POWER(1024.0, 4)) total_tb, \n\tround(tsc.total_used_bytes / POWER(1024.0, 4)) total_used_tb,\n\ttsc.osd_count--,\nfrom ident_clusters ic\ninner join grafana.ts_cluster tsc \non ic.report_id = tsc.report_id\n--where\n-- r.report_stamp > '2021-06-10'\nwhere\n\ttsc.osd_count is not null -- some clusters report empty telemetry\nand round(tsc.total_bytes / POWER(1024.0, 4)) > 0\norder by total_tb desc;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Ident channel opted-in - last week", + "type": "table" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 24 + }, + "id": 8, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "description": "All clusters reporting during the last 7 days", + "fieldConfig": { + "defaults": { + "custom": { + "align": null, + "displayMode": "auto", + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "cluster_id" + }, + "properties": [ + { + "id": "unit", + "value": "string" + }, + { + "id": "displayName", + "value": "Cluster ID" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "total_tb" + }, + "properties": [ + { + "id": "displayName", + "value": "Total Capacity (TiB)" + }, + { + "id": "unit", + "value": "locale" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "total_used_tb" + }, + "properties": [ + { + "id": "displayName", + "value": "Total Used Capacity (TiB)" + }, + { + "id": "unit", + "value": "locale" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "osd_count" + }, + "properties": [ + { + "id": "displayName", + "value": "OSD Count" + }, + { + "id": "unit", + "value": "locale" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "id_internal" + }, + "properties": [ + { + "id": "displayName", + "value": "ID - for internal use" + }, + { + "id": "unit", + "value": "string" + }, + { + "id": "links", + "value": [ + { + "title": "show details", + "url": "/d/9pUyOJrWk/cluster-private?orgId=1&var-c_id=${__value.raw}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "ID - for internal use" + }, + "properties": [ + { + "id": "custom.width", + "value": 352 + } + ] + } + ] + }, + "gridPos": { + "h": 15, + "w": 24, + "x": 0, + "y": 25 + }, + "id": 7, + "options": { + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "-- leaderboard for all clusters:\nwith all_clusters as (\n\tselect ts.report_id, ts.cluster_id--, array_agg(ts)\n\tfrom grafana.ts_cluster ts\n\tinner join grafana.weekly_reports_sliding w on ts.report_id = w.report_id\n\twhere --channel_ident\n\t--and \n\t date_trunc('day', w.daily_window) = date_trunc('day', now() - interval '1 day')\n\t--and ts.total_bytes > 0\n\t--ts > '2021-06-01'\n\t--group by cluster_id\n\t)\nselect --ac.report_id, \n ac.cluster_id id_internal,\n\tsubstring(tsc.cluster_id, 1, 8) cluster_id,\n\tround(tsc.total_bytes / POWER(1024.0, 4)) total_tb, \n\tround(tsc.total_used_bytes / POWER(1024.0, 4)) total_used_tb,\n\ttsc.osd_count--,\nfrom all_clusters ac\ninner join grafana.ts_cluster tsc \non ac.report_id = tsc.report_id\n--where\n-- r.report_stamp > '2021-06-10'\nwhere\n\ttsc.osd_count is not null -- some clusters report empty telemetry\nand round(tsc.total_bytes / POWER(1024.0, 4)) > 0\norder by total_tb desc;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "All clusters- last week", + "type": "table" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 40 + }, + "id": 5, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 41 + }, + "id": 9, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + } + ], + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Leaderboard", + "uid": "8zJ68iWnk", + "version": 6 +} \ No newline at end of file diff --git a/dashboard/private/cluster/cluster_main.json b/dashboard/private/cluster/cluster_main.json new file mode 100644 index 0000000..5041c38 --- /dev/null +++ b/dashboard/private/cluster/cluster_main.json @@ -0,0 +1,2150 @@ +{ + "__inputs": [ + { + "name": "DS_POSTGRESQL", + "label": "PostgreSQL", + "description": "", + "type": "datasource", + "pluginId": "postgres", + "pluginName": "PostgreSQL" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph (old)", + "version": "" + }, + { + "type": "panel", + "id": "heatmap", + "name": "Heatmap", + "version": "" + }, + { + "type": "datasource", + "id": "postgres", + "name": "PostgreSQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + } + ], + "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": 1646868193703, + "links": [ + { + "$$hashKey": "object:704", + "icon": "dashboard", + "tags": [], + "title": "Devices Telemetry", + "type": "link", + "url": "/d/OVxgLWiGz/main?orgId=1" + } + ], + "panels": [ + { + "datasource": null, + "description": "", + "gridPos": { + "h": 5, + "w": 10, + "x": 0, + "y": 0 + }, + "id": 35, + "options": { + "content": "
Dropdown usage:
\n
\nThese dropdowns affect 'Version by Cluster Count' and 'Version by Daemon Count' charts below.\n
Stats can be displayed by either major or minor versions. \n
'Major' dropdown filters the options of 'Minor' dropdown. \n
Stats by either 'Major' or 'Minor' dropdowns are also filtered by 'Daemons' dropdown.\n
", + "mode": "html" + }, + "pluginVersion": "8.1.2", + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "gridPos": { + "h": 5, + "w": 4, + "x": 12, + "y": 0 + }, + "id": 41, + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "gridPos": { + "h": 5, + "w": 5, + "x": 18, + "y": 0 + }, + "id": 40, + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "cacheTimeout": null, + "datasource": null, + "description": "Counting all OSDs from clusters reporting during the last 7 days", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 0, + "y": 5 + }, + "id": 15, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select sum(c.osd_count) as \"OSD Count\"\nfrom grafana.weekly_reports_sliding w\ninner join grafana.ts_cluster c on w.report_id = c.report_id\nwhere daily_window >= CURRENT_DATE - INTERVAL '1' DAY\ngroup by daily_window;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "OSD Count", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": null, + "description": "Counting all clusters reporting during the last 7 days", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 8, + "y": 5 + }, + "id": 14, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "-- no need to count distinct since cluster_id is already distinct per day\nselect count(c.cluster_id) total\nfrom grafana.weekly_reports_sliding w\ninner join grafana.ts_cluster c on w.report_id = c.report_id\nwhere daily_window >= CURRENT_DATE - INTERVAL '1' DAY\ngroup by daily_window;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Active Clusters", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": null, + "description": "Counting capacity of all clusters reporting during the last 7 days", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 16, + "y": 5 + }, + "id": 10, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select sum(c.TOTAL_BYTES) total\nfrom grafana.weekly_reports_sliding w\ninner join grafana.ts_cluster c on w.report_id = c.report_id\nwhere daily_window >= CURRENT_DATE - INTERVAL '1' DAY\ngroup by daily_window;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Total Capacity", + "type": "stat" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "Takes the latest report of each cluster per week, and counts the versions by cluster count:\nEach cluster contributes '1', regardless of number of daemons:\nIf 2/200 daemons are v1 and 198 v2, then we add in .01 for v1; and .99 for v2.\nDisplays only the checked options from 'Major' or 'Minor' dropdowns on the top left corner of this page.", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "12" + }, + "properties": [ + { + "id": "displayName", + "value": "Luminous" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "13" + }, + "properties": [ + { + "id": "displayName", + "value": "Mimic" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "14" + }, + "properties": [ + { + "id": "displayName", + "value": "Nautilus" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "15" + }, + "properties": [ + { + "id": "displayName", + "value": "Octopus" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "16" + }, + "properties": [ + { + "id": "displayName", + "value": "Pacific" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "17" + }, + "properties": [ + { + "id": "displayName", + "value": "Quincy" + } + ] + } + ] + }, + "fill": 6, + "fillGradient": 0, + "gridPos": { + "h": 18, + "w": 24, + "x": 0, + "y": 9 + }, + "hiddenSeries": false, + "id": 28, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "WITH\n-- Get the matching metadata stats, per the above report (latest, weekly)\nweekly_metadata AS (\n SELECT\n daily_window, grafana.metadata.*\n FROM\n grafana.metadata\n INNER JOIN\n grafana.WEEKLY_REPORTS_SLIDING w ON w.report_id = grafana.metadata.report_id\n WHERE\n attr='ceph_version_norm'\n),\n-- This retrieves total daemons per report (which is of a cluster, per week)\nweekly_cluster_daemons AS ( \n SELECT report_id, sum(total) sum_daemons\n FROM grafana.metadata\n WHERE attr='ceph_version_norm'\n and entity in ($daemons)\n GROUP BY report_id\n)\nselect\n $__timeGroup(wm.daily_window, '1d', 0),\n -- daily_window as time, \n CASE\n \tWHEN '$display' = 'Major' then\n SPLIT_PART(value, '.', 1)\n ELSE value\n END as metric,\n --wm.value as metric, \n sum(wm.total / CAST(cd.sum_daemons AS real)) \nfrom weekly_metadata wm\ninner join weekly_cluster_daemons cd \nON wm.report_id = cd.report_id\nwhere $__timeFilter(daily_window) \nand case when '$display'='Major' then\n SPLIT_PART(value, '.', 1)\n else value end\n in\n (select unnest(case when '$display'='Major' then Array[$major]\nelse Array[$minor] end))\n-- and value in ($minor) \nand entity in ($daemons)\nGROUP by daily_window, 2\norder by daily_window, 2;\n-- order by 2, daily_window;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Version by Cluster Count", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:209", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:210", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "decimals": null, + "description": "Takes the latest report of each cluster per week, and counts the versions by daemons. Displays only the checked options from 'Major' or 'Minor' dropdowns on the top left corner of this page.", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "12" + }, + "properties": [ + { + "id": "displayName", + "value": "Luminous" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "13" + }, + "properties": [ + { + "id": "displayName", + "value": "Mimic" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "14" + }, + "properties": [ + { + "id": "displayName", + "value": "Nautilus" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "15" + }, + "properties": [ + { + "id": "displayName", + "value": "Octopus" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "16" + }, + "properties": [ + { + "id": "displayName", + "value": "Pacific" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "17" + }, + "properties": [ + { + "id": "displayName", + "value": "Quincy" + } + ] + } + ] + }, + "fill": 6, + "fillGradient": 0, + "gridPos": { + "h": 18, + "w": 24, + "x": 0, + "y": 27 + }, + "hiddenSeries": false, + "id": 26, + "legend": { + "avg": false, + "current": false, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 0.5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:137" + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select $__timeGroup(w.daily_window, '1d', 0),\n --w.daily_window as time,\n --value as metric,\n CASE\n WHEN '$display' = 'Major' then\n SPLIT_PART(value, '.', 1) \n else value\n end as metric,\n sum(total)\nfrom grafana.weekly_reports_sliding w\ninner join\n grafana.metadata\n on w.report_id = grafana.metadata.report_id\nwhere \n attr='ceph_version_norm'\n and $__timeFilter(w.daily_window)\n --and value in ($major)\n and case when '$display'='Major' then\n SPLIT_PART(value, '.', 1)\n else value end\n in\n (select unnest(case when '$display'='Major' then Array[$major]\n else Array[$minor] end))\n and entity in ($daemons)\ngroup by w.daily_window, 2\norder by w.daily_window, 2;\n-- order by 2, w.daily_window;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Version by Daemon Count", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:306", + "decimals": null, + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:307", + "decimals": null, + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "Every day shows a count of all distinct clusters reporting over a past week.", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 11, + "w": 24, + "x": 0, + "y": 45 + }, + "hiddenSeries": false, + "id": 21, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 0.5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select daily_window as time, count(*) as \"Active Clusters\"\nfrom grafana.weekly_reports_sliding w\ninner join grafana.ts_cluster c on w.report_id = c.report_id\ngroup by daily_window\norder by daily_window;\n\n\n/*\n-- weekly_reports_sliding: returns a table with rows of \"days\" (acutally called ts),\n-- and for each \"days\" returns all the reports of all clusters\n-- that reported in the week preceeding the day, but only 1 report per cluster - the newest.\nwith weekly_reports_sliding as (\n select distinct on(days, cluster_id) days ts, report_id \n -- generate_series generates a table with a single column 'days' (since 'day' is a reserved keyword) \n -- and 365 rows;\n from grafana.ts_cluster c, GENERATE_SERIES(now()::date - 365, now()::date, interval '1' day) days\n where c.ts between days - interval '7' day AND days + interval '1' day\n order by days, cluster_id, ts desc\n)\n-- clusters reporting\nselect ts as time, count(*) from weekly_reports_sliding\ngroup by ts\norder by ts;\n*/", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Active Clusters by a Daily Sliding Window of a Week", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:344", + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:345", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "OSD count": "light-green" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "Every day shows an OSD count of all distinct clusters reporting over a past week.", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 56 + }, + "hiddenSeries": false, + "id": 20, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 0.5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n daily_window as time,\n sum(c.osd_count) as \"OSD count\"\nFROM\n grafana.weekly_reports_sliding w\nINNER JOIN \n grafana.ts_cluster c \n ON \n w.report_id = c.report_id\nGROUP BY \n daily_window\nORDER BY \n daily_window;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "OSD Count by a Daily Sliding Window of a Week", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "Every day shows a total bytes count of all distinct clusters reporting over a past week.", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 12, + "w": 24, + "x": 0, + "y": 66 + }, + "hiddenSeries": false, + "id": 19, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 0.5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select daily_window as time, sum(c.TOTAL_BYTES) as \"Total\", sum(c.TOTAL_USED_BYTES) as \"Used\"\nfrom grafana.weekly_reports_sliding w \ninner join grafana.ts_cluster c on w.report_id = c.report_id\ngroup by daily_window\norder by daily_window;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Total Capacity by a Daily Sliding Window of a Week", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "Every day shows a total bytes count of all distinct clusters reporting over a past week. We aggregate the number of total bytes according to the osd versions.", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "decbytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "12" + }, + "properties": [ + { + "id": "displayName", + "value": "Luminous" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "13" + }, + "properties": [ + { + "id": "displayName", + "value": "Mimic" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "14" + }, + "properties": [ + { + "id": "displayName", + "value": "Nautilus" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "15" + }, + "properties": [ + { + "id": "displayName", + "value": "Octopus" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "16" + }, + "properties": [ + { + "id": "displayName", + "value": "Pacific" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "17" + }, + "properties": [ + { + "id": "displayName", + "value": "Quincy" + } + ] + } + ] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 13, + "w": 12, + "x": 0, + "y": 78 + }, + "hiddenSeries": false, + "id": 42, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 0.5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "with cpo as ( --capacity_per_osd\n\tselect\n\t --$__timeGroup(w.daily_window, '1d', 0),\n\t\tw.daily_window, -- as time,\n\t\tc.report_id,\n\t\t--c.osd_count,\n\t\tc.TOTAL_BYTES / c.osd_count::real as \"total_bytes_per_osd\"\n\t\t--, c.TOTAL_USED_BYTES / c.osd_count::real as \"total_used_bytes_per_osd\"\n\t\t--sum(c.TOTAL_BYTES) as \"Total\",\n\t\t--sum(c.TOTAL_USED_BYTES) as \"Used\"\n\t\t--c.TOTAL_BYTES as \"Total\",\n\t\t--c.TOTAL_USED_BYTES as \"Used\"\n\tfrom grafana.weekly_reports_sliding w \n\tinner join grafana.ts_cluster c on w.report_id = c.report_id\n\twhere osd_count > 0\n\t--and c.TOTAL_BYTES > 0\n\t--group by daily_window\n\t--order by daily_window\n)\nselect --*,\n\t--cpo.daily_window as time,\n\t$__timeGroup(cpo.daily_window, '1d', 0),\n\t--gm.value as metric,\n\tCASE\n WHEN '$display' = 'Major' then\n SPLIT_PART(gm.value, '.', 1) \n else gm.value\n end as metric,\n\t-- gm.total is the total number of daemons with that attribute\n\tsum(gm.total * total_bytes_per_osd) as \"Total bytes\"--, -- total bytes for all osds reporting this ceph_version_norm\n\t--, sum(gm.total * total_used_bytes_per_osd) as \"Total used bytes\" -- -- total used bytes for all osds reporting this ceph_version_norm\nfrom cpo\ninner join grafana.metadata gm on cpo.report_id = gm.report_id \nwhere gm.attr = 'ceph_version_norm'\nand case when '$display'='Major' then\n SPLIT_PART(gm.value, '.', 1)\n else gm.value end\n in\n (select unnest(case when '$display'='Major' then Array[$major]\n else Array[$minor] end))\nand gm.entity = 'osd'\ngroup by 1, 2\norder by 1; --upo.daily_window;\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Total Capacity by Version", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:452", + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:453", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "Every day shows a total bytes count of all distinct clusters reporting over a past week. We aggregate the number of total used bytes according to the osd versions.", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "decbytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "12" + }, + "properties": [ + { + "id": "displayName", + "value": "Luminous" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "13" + }, + "properties": [ + { + "id": "displayName", + "value": "Mimic" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "14" + }, + "properties": [ + { + "id": "displayName", + "value": "Nautilus" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "15" + }, + "properties": [ + { + "id": "displayName", + "value": "Octopus" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "16" + }, + "properties": [ + { + "id": "displayName", + "value": "Pacific" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "17" + }, + "properties": [ + { + "id": "displayName", + "value": "Quincy" + } + ] + } + ] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 13, + "w": 12, + "x": 12, + "y": 78 + }, + "hiddenSeries": false, + "id": 43, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 0.5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "with cpo as ( --capacity_per_osd\n\tselect\n\t --$__timeGroup(w.daily_window, '1d', 0),\n\t\tw.daily_window, -- as time,\n\t\tc.report_id,\n\t\t--c.osd_count,\n\t\t-- c.TOTAL_BYTES / c.osd_count::real as \"total_bytes_per_osd\",\n\t\tc.TOTAL_USED_BYTES / c.osd_count::real as \"total_used_bytes_per_osd\"\n\t\t--sum(c.TOTAL_BYTES) as \"Total\",\n\t\t--sum(c.TOTAL_USED_BYTES) as \"Used\"\n\t\t--c.TOTAL_BYTES as \"Total\",\n\t\t--c.TOTAL_USED_BYTES as \"Used\"\n\tfrom grafana.weekly_reports_sliding w \n\tinner join grafana.ts_cluster c on w.report_id = c.report_id\n\twhere osd_count > 0\n\t--and c.TOTAL_BYTES > 0\n\t--group by daily_window\n\t--order by daily_window\n)\nselect --*,\n\t--cpo.daily_window as time,\n\t$__timeGroup(cpo.daily_window, '1d', 0),\n\t--gm.value as metric,\n\tCASE\n WHEN '$display' = 'Major' then\n SPLIT_PART(gm.value, '.', 1) \n else gm.value\n end as metric,\n\t-- gm.total is the total number of daemons with that attribute\n\t--sum(gm.total * total_bytes_per_osd) as \"Total bytes\"--, -- total bytes for all osds reporting this ceph_version_norm\n\tsum(gm.total * total_used_bytes_per_osd) as \"Total used bytes\" -- -- total used bytes for all osds reporting this ceph_version_norm\nfrom cpo\ninner join grafana.metadata gm on cpo.report_id = gm.report_id \nwhere gm.attr = 'ceph_version_norm'\nand case when '$display'='Major' then\n SPLIT_PART(gm.value, '.', 1)\n else gm.value end\n in\n (select unnest(case when '$display'='Major' then Array[$major]\n else Array[$minor] end))\nand gm.entity = 'osd'\ngroup by 1, 2\norder by 1; --cpo.daily_window;\n\n/*\nselect daily_window as time, sum(c.TOTAL_BYTES) as \"Total\", sum(c.TOTAL_USED_BYTES) as \"Used\"\nfrom grafana.weekly_reports_sliding w \ninner join grafana.ts_cluster c on w.report_id = c.report_id\ngroup by daily_window\norder by daily_window;\n*/", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Total Used Capacity by Version", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:452", + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:453", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "cards": { + "cardPadding": null, + "cardRound": null + }, + "color": { + "cardColor": "#b4ff00", + "colorScale": "sqrt", + "colorScheme": "interpolateSpectral", + "exponent": 0.5, + "mode": "spectrum" + }, + "dataFormat": "timeseries", + "datasource": null, + "description": "X axis is a daily sliding window of a week;\nY axis is total capacity;\nColor intensity represents the number of clusters within this total capacity range.", + "gridPos": { + "h": 15, + "w": 24, + "x": 0, + "y": 91 + }, + "heatmap": {}, + "hideZeroBuckets": false, + "highlightCards": true, + "id": 31, + "legend": { + "show": true + }, + "links": [ + { + "targetBlank": true, + "title": "See odd clusters", + "url": "/d/8xqKFTrZz/odd-clusters?orgId=1" + } + ], + "reverseYBuckets": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select\n\tw.DAILY_WINDOW as time,\n\tc.total_bytes / 1024 / 1024 / 1024 gb\nfrom\n\tgrafana.WEEKLY_REPORTS_SLIDING w\ninner join \n\tgrafana.ts_cluster c\non\n\tw.REPORT_ID = c.REPORT_ID\nWHERE\n $__timeFilter(w.DAILY_WINDOW)\norder by\n\tw.DAILY_WINDOW;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Cluster Distribution by Total Capacity", + "tooltip": { + "show": true, + "showHistogram": false + }, + "tooltipDecimals": 0, + "type": "heatmap", + "xAxis": { + "show": true + }, + "xBucketNumber": null, + "xBucketSize": "1d", + "yAxis": { + "decimals": 0, + "format": "gbytes", + "logBase": 2, + "max": null, + "min": "64", + "show": true, + "splitFactor": 1 + }, + "yBucketBound": "auto", + "yBucketNumber": null, + "yBucketSize": null + }, + { + "cards": { + "cardPadding": null, + "cardRound": null + }, + "color": { + "cardColor": "#73BF69", + "colorScale": "sqrt", + "colorScheme": "interpolateGreys", + "exponent": 0.5, + "mode": "spectrum" + }, + "dataFormat": "timeseries", + "datasource": null, + "description": "X axis is a daily sliding window of a week;\nY axis is total capacity;\nColor intensity represents the number of clusters within this total capacity range.", + "gridPos": { + "h": 15, + "w": 24, + "x": 0, + "y": 106 + }, + "heatmap": {}, + "hideZeroBuckets": false, + "highlightCards": true, + "id": 33, + "legend": { + "show": true + }, + "links": [ + { + "targetBlank": true, + "title": "See odd clusters", + "url": "/d/8xqKFTrZz/odd-clusters?orgId=1" + } + ], + "reverseYBuckets": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select\n\tw.DAILY_WINDOW as time,\n\tc.total_bytes / 1024 / 1024 / 1024 gb\nfrom\n\tgrafana.WEEKLY_REPORTS_SLIDING w\ninner join \n\tgrafana.ts_cluster c\non\n\tw.REPORT_ID = c.REPORT_ID\nWHERE\n $__timeFilter(w.DAILY_WINDOW)\norder by\n\tw.DAILY_WINDOW;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Cluster Distribution by Total Capacity", + "tooltip": { + "show": true, + "showHistogram": false + }, + "tooltipDecimals": 0, + "type": "heatmap", + "xAxis": { + "show": true + }, + "xBucketNumber": null, + "xBucketSize": "1d", + "yAxis": { + "decimals": 0, + "format": "gbytes", + "logBase": 2, + "max": null, + "min": "64", + "show": true, + "splitFactor": 1 + }, + "yBucketBound": "auto", + "yBucketNumber": null, + "yBucketSize": null + }, + { + "cards": { + "cardPadding": null, + "cardRound": null + }, + "color": { + "cardColor": "#b4ff00", + "colorScale": "sqrt", + "colorScheme": "interpolateSpectral", + "exponent": 0.5, + "mode": "spectrum" + }, + "dataFormat": "timeseries", + "datasource": null, + "description": "X axis is a daily sliding window of a week;\nY axis is total used capacity;\nColor intensity represents the number of clusters within this total used capacity range.", + "gridPos": { + "h": 15, + "w": 24, + "x": 0, + "y": 121 + }, + "heatmap": {}, + "hideZeroBuckets": false, + "highlightCards": true, + "id": 32, + "legend": { + "show": true + }, + "links": [ + { + "title": "See odd clusters", + "url": "/d/8xqKFTrZz/odd-clusters?orgId=1" + } + ], + "reverseYBuckets": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select\n\tw.DAILY_WINDOW as time,\n\tc.total_used_bytes / 1024 / 1024 / 1024 gb\nfrom\n\tgrafana.WEEKLY_REPORTS_SLIDING w\ninner join \n\tgrafana.ts_cluster c\non\n\tw.REPORT_ID = c.REPORT_ID\nWHERE\n $__timeFilter(w.DAILY_WINDOW)\norder by\n\tw.DAILY_WINDOW;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Cluster Distribution by Total Used Capacity", + "tooltip": { + "show": true, + "showHistogram": false + }, + "tooltipDecimals": 0, + "type": "heatmap", + "xAxis": { + "show": true + }, + "xBucketNumber": null, + "xBucketSize": "1d", + "yAxis": { + "decimals": 0, + "format": "gbytes", + "logBase": 2, + "max": null, + "min": "64", + "show": true, + "splitFactor": 1 + }, + "yBucketBound": "auto", + "yBucketNumber": null, + "yBucketSize": null + }, + { + "cards": { + "cardPadding": null, + "cardRound": null + }, + "color": { + "cardColor": "#b4ff00", + "colorScale": "sqrt", + "colorScheme": "interpolateSpectral", + "exponent": 0.5, + "mode": "spectrum" + }, + "dataFormat": "timeseries", + "datasource": null, + "description": "X axis is a daily sliding window of a week;\nY axis is OSD count;\nColor intensity represents the number of clusters which have this OSD count.", + "gridPos": { + "h": 13, + "w": 24, + "x": 0, + "y": 136 + }, + "heatmap": {}, + "hideZeroBuckets": false, + "highlightCards": true, + "id": 30, + "legend": { + "show": true + }, + "links": [], + "reverseYBuckets": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select\n\tw.DAILY_WINDOW as time,\n\tc.OSD_COUNT\nfrom\n\tgrafana.WEEKLY_REPORTS_SLIDING w\ninner join \n\tgrafana.ts_cluster c\non\n\tw.REPORT_ID = c.REPORT_ID\nWHERE\n $__timeFilter(w.DAILY_WINDOW)\norder by\n\tw.DAILY_WINDOW;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Cluster Distribution by OSD Count", + "tooltip": { + "show": true, + "showHistogram": false + }, + "tooltipDecimals": 0, + "type": "heatmap", + "xAxis": { + "show": true + }, + "xBucketNumber": null, + "xBucketSize": "1d", + "yAxis": { + "decimals": 1, + "format": "locale", + "logBase": 2, + "max": null, + "min": null, + "show": true, + "splitFactor": 2 + }, + "yBucketBound": "auto", + "yBucketNumber": null, + "yBucketSize": null + }, + { + "datasource": null, + "gridPos": { + "h": 3, + "w": 8, + "x": 0, + "y": 149 + }, + "id": 37, + "options": { + "content": "\n# [See more capacity density charts](/d/Pb90AgCWk/capacity-density?orgId=1)\n\n", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "More Charts", + "transparent": true, + "type": "text" + } + ], + "refresh": "", + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "selected": true, + "text": "Major", + "value": "Major" + }, + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "Display by", + "multi": false, + "name": "display", + "options": [ + { + "selected": true, + "text": "Major", + "value": "Major" + }, + { + "selected": false, + "text": "Minor", + "value": "Minor" + } + ], + "query": "Major,Minor", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select\n replace(concat(version, ' -- ', name), 'Dev -- ', 'Dev') as __text,\n version as __value\nfrom grafana.version_to_name;", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "Major", + "multi": true, + "name": "major", + "options": [], + "query": "select\n replace(concat(version, ' -- ', name), 'Dev -- ', 'Dev') as __text,\n version as __value\nfrom grafana.version_to_name;", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "/*select\n\tdistinct(SPLIT_PART(value, '.', '1')) major\nfrom\n\tgrafana.metadata\nwhere\n\tattr='ceph_version_norm'\norder BY\n\tmajor;\n*/\n\nselect\n distinct(value)\nfrom\n\tgrafana.metadata\nwhere\n\tattr='ceph_version_norm'\nand\n SPLIT_PART(value, '.', '1') in ($major);\n", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "Minor", + "multi": true, + "name": "minor", + "options": [], + "query": "/*select\n\tdistinct(SPLIT_PART(value, '.', '1')) major\nfrom\n\tgrafana.metadata\nwhere\n\tattr='ceph_version_norm'\norder BY\n\tmajor;\n*/\n\nselect\n distinct(value)\nfrom\n\tgrafana.metadata\nwhere\n\tattr='ceph_version_norm'\nand\n SPLIT_PART(value, '.', '1') in ($major);\n", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "All", + "value": [ + "$__all" + ] + }, + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "Daemons", + "multi": true, + "name": "daemons", + "options": [ + { + "selected": true, + "text": "All", + "value": "$__all" + }, + { + "selected": false, + "text": "osd", + "value": "osd" + }, + { + "selected": false, + "text": "mon", + "value": "mon" + } + ], + "query": "osd,mon", + "skipUrlSync": false, + "type": "custom" + } + ] + }, + "time": { + "from": "now-6M", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Telemetry", + "uid": "-GcbjrXZz", + "version": 116 +} \ No newline at end of file diff --git a/dashboard/private/cluster/cluster_objectstore.json b/dashboard/private/cluster/cluster_objectstore.json new file mode 100644 index 0000000..df45902 --- /dev/null +++ b/dashboard/private/cluster/cluster_objectstore.json @@ -0,0 +1,1065 @@ +{ + "__inputs": [ + { + "name": "DS_POSTGRESQL", + "label": "PostgreSQL", + "description": "", + "type": "datasource", + "pluginId": "postgres", + "pluginName": "PostgreSQL" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph (old)", + "version": "" + }, + { + "type": "datasource", + "id": "postgres", + "name": "PostgreSQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + } + ], + "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": 1646869253298, + "links": [ + { + "$$hashKey": "object:704", + "icon": "dashboard", + "tags": [], + "title": "Ceph Telemetry", + "tooltip": "", + "type": "link", + "url": "/d/-GcbjrXZz/telemetry?orgId=1" + } + ], + "panels": [ + { + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": null, + "displayMode": "auto", + "filterable": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 1 + }, + { + "color": "#6ED0E0", + "value": 2 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "version" + }, + "properties": [ + { + "id": "custom.align", + "value": "left" + }, + { + "id": "custom.width", + "value": 128 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "osds" + }, + "properties": [ + { + "id": "unit", + "value": "locale" + } + ] + } + ] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 44, + "options": { + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select\n CASE\n WHEN '$display' = 'Major' then\n SPLIT_PART(md_ver.value, '.', 1)\n else md_ver.value\n end as version,\n md_obj.value objectstore,\n-- ARRAY_POSITION(Array['filestore', 'bluestore', 'memstore'], md_obj.value::text) color,\n sum(md_ver.total) OSDs\nfrom\n grafana.weekly_reports_sliding w\ninner join\n grafana.metadata md_ver\n on w.report_id = md_ver.report_id and md_ver.attr = 'ceph_version_norm' AND md_ver.entity = 'osd'\ninner join\n grafana.metadata md_obj\n on w.report_id = md_obj.report_id and md_obj.attr = 'osd_objectstore'\nwhere \n w.DAILY_WINDOW BETWEEN $__timeTo()::timestamp - interval '1 day' AND $__timeTo()::timestamp\n and case when '$display'='Major' then\n SPLIT_PART(md_ver.value, '.', 1)\n else md_ver.value end\n in\n (select unnest(case when '$display'='Major' then Array[$major]\n else Array[$minor] end))\n-- and entity in ($daemons)\ngroup by 1, md_obj.value\norder by 1;\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "OSD count by objectstore and version for ${__to:date:YYYY-MM-DD}", + "type": "table" + }, + { + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": null, + "displayMode": "auto", + "filterable": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "version" + }, + "properties": [ + { + "id": "custom.align", + "value": "left" + }, + { + "id": "custom.width", + "value": 128 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "osds" + }, + "properties": [ + { + "id": "unit", + "value": "locale" + } + ] + } + ] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 45, + "options": { + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "\nWITH\n-- Get the matching metadata stats, per the above report (latest, weekly)\nweekly_metadata AS (\n SELECT\n daily_window, grafana.metadata.*\n FROM\n grafana.metadata\n INNER JOIN\n grafana.WEEKLY_REPORTS_SLIDING w ON w.report_id = grafana.metadata.report_id\n WHERE\n attr='ceph_version_norm'\n),\n-- This retrieves total daemons per report (which is of a cluster, per week)\nweekly_cluster_daemons AS ( \n SELECT report_id, sum(total) sum_daemons\n FROM grafana.metadata\n WHERE attr='ceph_version_norm'\n AND entity = 'osd'\n GROUP BY report_id\n)\nselect\n -- daily_window as time, \n CASE\n \tWHEN '$display' = 'Major' then\n SPLIT_PART(wm.value, '.', 1)\n ELSE wm.value\n END as version,\n --wm.value as metric,\n md_obj.value as objectstore,\n -- Sum the OSDs (attr='ceph_version_norm') total' and not the objectstore (attr='osd_objectstore') 'total' \n sum(wm.total / CAST(cd.sum_daemons AS real)) as clusters\nfrom weekly_metadata wm\ninner join weekly_cluster_daemons cd \nON wm.report_id = cd.report_id\nINNER JOIN grafana.metadata md_obj ON md_obj.report_id = wm.report_id \nwhere $__timeFilter(daily_window)\nAND md_obj.attr = 'osd_objectstore'\nand case when '$display'='Major' then\n SPLIT_PART(wm.value, '.', 1)\n else wm.value end\n in\n (select unnest(case when '$display'='Major' then Array[$major]\nelse Array[$minor] end))\n-- and value in ($minor) \nand wm.entity = 'osd'\nAND daily_window BETWEEN $__timeTo()::timestamp - interval '1 day' AND $__timeTo()::timestamp\nGROUP by daily_window, 1, md_obj.value\norder by 1, daily_window;\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Cluster count by version and objectstore for ${__to:date:YYYY-MM-DD}", + "type": "table" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_POSTGRESQL}", + "description": "", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 12 + }, + "hiddenSeries": false, + "id": 39, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select\n\t--*\n\tw.DAILY_WINDOW as time,\n\tcount(*) \"Active clusters\"\n\t--count(distinct(cluster_id))\n\t--w.DAILY_WINDOW,\n\t--w.report_id--,\n\t--percentile_cont(0.5) within group (order by num_images) as med,\n\t--round(avg(c.num_images)) as avg,\n\t--count(c.num_images),\n\t--count(c.pool_idx),\n\t--sum(c.num_images) as total_images_per_cluster--,\n\t--max(c.num_images)\n\t--count(distinct(cluster_id))\nfrom\n\tgrafana.WEEKLY_REPORTS_SLIDING w\ninner join \n\tgrafana.ts_cluster c\n\t--grafana.rbd_pool c -- 'c' for cluster\non\n\tw.REPORT_ID = c.REPORT_ID\nWHERE\n $__timeFilter(w.DAILY_WINDOW)\nGROUP BY w.daily_window--, w.report_id\norder by\n\tw.DAILY_WINDOW;\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + }, + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select\n\t--*\n\tw.DAILY_WINDOW as time,\n\tcount(*) \"Active clusters reporting objectstore\"\n\t--count(distinct(cluster_id))\n\t--w.DAILY_WINDOW,\n\t--w.report_id--,\n\t--percentile_cont(0.5) within group (order by num_images) as med,\n\t--round(avg(c.num_images)) as avg,\n\t--count(c.num_images),\n\t--count(c.pool_idx),\n\t--sum(c.num_images) as total_images_per_cluster--,\n\t--max(c.num_images)\n\t--count(distinct(cluster_id))\nfrom\n\tgrafana.WEEKLY_REPORTS_SLIDING w\ninner join \n\tgrafana.metadata md\n\t--grafana.rbd_pool c -- 'c' for cluster\non\n\tw.REPORT_ID = md.REPORT_ID\nWHERE\n $__timeFilter(w.DAILY_WINDOW)\nAND\n md.attr = 'osd_objectstore'\nGROUP BY w.daily_window--, w.report_id\norder by\n\tw.DAILY_WINDOW;\n", + "refId": "B", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Active clusters", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:242", + "format": "locale", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:243", + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_POSTGRESQL}", + "description": "", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 12 + }, + "hiddenSeries": false, + "id": 41, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select\n $__timeGroup(w.DAILY_WINDOW, '1d', 0),\n sum(md.total) as value,\n value as metric\nfrom\n\tgrafana.WEEKLY_REPORTS_SLIDING w\ninner join \n\tgrafana.metadata md \non\n\tw.REPORT_ID = md.REPORT_ID\nWHERE\n-- $__timeFilter(w.DAILY_WINDOW)\n w.DAILY_WINDOW BETWEEN $__timeFrom()::timestamp - interval '1 day' AND $__timeTo()\n AND md.attr = 'osd_objectstore'\nGROUP BY w.daily_window, md.value\norder by\n\tw.DAILY_WINDOW;\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "OSD count by objectstore across all versions", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:242", + "format": "locale", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:243", + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_POSTGRESQL}", + "description": "", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 22 + }, + "hiddenSeries": false, + "id": 42, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "--select\n-- $__timeGroup(w.DAILY_WINDOW, '1d', 0),\nwith mixed as (\n SELECT md.report_id, wrs.daily_window, count(distinct(value)) val\n FROM grafana.metadata md\n INNER JOIN grafana.weekly_reports_sliding wrs ON md.report_id = wrs.report_id\n WHERE\n \t$__timeFilter(wrs.daily_window)\n \tAND md.attr = 'osd_objectstore'\n GROUP BY md.report_id, wrs.daily_window \n HAVING count(distinct(value)) > 1 \n)\nselect daily_window as time, count(*) from mixed\nGROUP BY daily_window \nORDER BY daily_window \n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Clusters with multiple objectstore types", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:242", + "format": "locale", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:243", + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_POSTGRESQL}", + "description": "", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 22 + }, + "hiddenSeries": false, + "id": 47, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "with\n -- extract number of bluestore OSDs per day\nmd_bs AS (\n\tselect\n\t\t-- $__timeGroup(w.DAILY_WINDOW, '1d', 0),\n \t\tw.DAILY_WINDOW,\n \t\tsum(md.total) as value\n\tfrom\n\t\tgrafana.WEEKLY_REPORTS_SLIDING w\n\tinner join \n\t\tgrafana.metadata md \n\ton\n\t\tw.REPORT_ID = md.REPORT_ID\n\tWHERE attr='osd_objectstore' AND value = 'bluestore'\n\tGROUP BY w.DAILY_WINDOW\n),\nmd_fs AS (\n\tselect\n\t\t-- $__timeGroup(w.DAILY_WINDOW, '1d', 0),\n\t\tw.DAILY_WINDOW,\n\t\tsum(md.total) as value\n\tfrom\n\t\tgrafana.WEEKLY_REPORTS_SLIDING w\n\tinner join \n\t\tgrafana.metadata md \n\ton\n\t\tw.REPORT_ID = md.REPORT_ID\n\tWHERE attr='osd_objectstore' AND value = 'filestore'\n\tGROUP BY w.DAILY_WINDOW\n)\nselect\n $__timeGroup(md_fs.DAILY_WINDOW, '1d', 0),\n md_fs.value::real / md_bs.value ratio\nfrom md_fs\ninner join md_bs on md_fs.DAILY_WINDOW = md_bs.DAILY_WINDOW\nwhere md_fs.DAILY_WINDOW BETWEEN $__timeFrom()::timestamp - interval '1 day' AND $__timeTo()\norder by md_fs.DAILY_WINDOW", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "OSD filestore/bluestore ratio", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:242", + "format": "locale", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:243", + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "14 bluestore": "green" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "decimals": null, + "description": "Takes the latest report of each cluster per week, and counts the versions by daemons. Displays only the checked options from 'Major' or 'Minor' dropdowns on the top left corner of this page.", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "12" + }, + "properties": [ + { + "id": "displayName", + "value": "Luminous" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "13" + }, + "properties": [ + { + "id": "displayName", + "value": "Mimic" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "14" + }, + "properties": [ + { + "id": "displayName", + "value": "Nautilus" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "15" + }, + "properties": [ + { + "id": "displayName", + "value": "Octopus" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "16" + }, + "properties": [ + { + "id": "displayName", + "value": "Pacific" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "17" + }, + "properties": [ + { + "id": "displayName", + "value": "Quincy" + } + ] + } + ] + }, + "fill": 6, + "fillGradient": 0, + "gridPos": { + "h": 18, + "w": 24, + "x": 0, + "y": 32 + }, + "hiddenSeries": false, + "id": 26, + "legend": { + "avg": false, + "current": false, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 0.5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:137" + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select $__timeGroup(w.daily_window, '1d', 0),\n CASE\n WHEN '$display' = 'Major' then\n concat(SPLIT_PART(md_ver.value, '.', 1), ' ', md_obj.value) \n else concat(md_ver.value, ' ', md_obj.value)\n end as metric,\n sum(md_ver.total)\nfrom\n grafana.weekly_reports_sliding w\ninner join\n grafana.metadata md_ver\n on w.report_id = md_ver.report_id and md_ver.attr = 'ceph_version_norm' AND md_ver.entity = 'osd'\ninner join\n grafana.metadata md_obj\n on w.report_id = md_obj.report_id and md_obj.attr = 'osd_objectstore'\nwhere \n w.DAILY_WINDOW BETWEEN $__timeFrom()::timestamp - interval '1 day' AND $__timeTo()\n and case when '$display'='Major' then\n SPLIT_PART(md_ver.value, '.', 1)\n else md_ver.value end\n in\n (select unnest(case when '$display'='Major' then Array[$major]\n else Array[$minor] end))\n-- and entity in ($daemons)\ngroup by w.daily_window, 2, md_obj.value\norder by 2, w.daily_window;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "OSD count by objectstore and version", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:306", + "decimals": null, + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:307", + "decimals": null, + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": false, + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "selected": true, + "text": "Major", + "value": "Major" + }, + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "Display by", + "multi": false, + "name": "display", + "options": [ + { + "selected": true, + "text": "Major", + "value": "Major" + }, + { + "selected": false, + "text": "Minor", + "value": "Minor" + } + ], + "query": "Major,Minor", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select\n replace(concat(version, ' -- ', name), 'Dev -- ', 'Dev') as __text,\n version as __value\nfrom grafana.version_to_name;", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "Major", + "multi": true, + "name": "major", + "options": [], + "query": "select\n replace(concat(version, ' -- ', name), 'Dev -- ', 'Dev') as __text,\n version as __value\nfrom grafana.version_to_name;", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "/*select\n\tdistinct(SPLIT_PART(value, '.', '1')) major\nfrom\n\tgrafana.metadata\nwhere\n\tattr='ceph_version_norm'\norder BY\n\tmajor;\n*/\n\nselect\n distinct(value)\nfrom\n\tgrafana.metadata\nwhere\n\tattr='ceph_version_norm'\nand\n SPLIT_PART(value, '.', '1') in ($major);\n", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "Minor", + "multi": true, + "name": "minor", + "options": [], + "query": "/*select\n\tdistinct(SPLIT_PART(value, '.', '1')) major\nfrom\n\tgrafana.metadata\nwhere\n\tattr='ceph_version_norm'\norder BY\n\tmajor;\n*/\n\nselect\n distinct(value)\nfrom\n\tgrafana.metadata\nwhere\n\tattr='ceph_version_norm'\nand\n SPLIT_PART(value, '.', '1') in ($major);\n", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6M", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Objectstore", + "uid": "YxQPMg3Mk", + "version": 5 +} \ No newline at end of file diff --git a/dashboard/private/cluster/cluster_raw_cluster_report.json b/dashboard/private/cluster/cluster_raw_cluster_report.json new file mode 100644 index 0000000..45c55b0 --- /dev/null +++ b/dashboard/private/cluster/cluster_raw_cluster_report.json @@ -0,0 +1,266 @@ +{ + "__inputs": [ + { + "name": "DS_POSTGRESQL", + "label": "PostgreSQL", + "description": "", + "type": "datasource", + "pluginId": "postgres", + "pluginName": "PostgreSQL" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "datasource", + "id": "postgres", + "name": "PostgreSQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + } + ], + "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": 1646869443967, + "links": [ + { + "$$hashKey": "object:39", + "icon": "dashboard", + "tags": [], + "title": "Back to all reports", + "tooltip": "", + "type": "link", + "url": "/d/GJkuC3nMk/all-reports-by-cluster-id?orgId=1&var-id=$cluster_id" + }, + { + "icon": "dashboard", + "tags": [], + "title": "Cluster x-ray", + "tooltip": "", + "type": "link", + "url": "/d/9pUyOJrWk/cluster-private?orgId=1&var-c_id=$cluster_id" + } + ], + "panels": [ + { + "datasource": null, + "gridPos": { + "h": 20, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 4, + "options": { + "content": "
\n  \n    $content\n  \n
", + "mode": "html" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Raw Report", + "type": "text" + } + ], + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "187292", + "value": "187292" + }, + "description": null, + "error": null, + "hide": 0, + "label": "Report ID", + "name": "id", + "options": [ + { + "selected": true, + "text": "299839", + "value": "299839" + } + ], + "query": "299839", + "skipUrlSync": false, + "type": "textbox" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select JSONB_PRETTY(report::jsonb)\nfrom public.report\nwhere id = $id;", + "description": null, + "error": null, + "hide": 2, + "includeAll": false, + "label": "content", + "multi": false, + "name": "content", + "options": [], + "query": "select JSONB_PRETTY(report::jsonb)\nfrom public.report\nwhere id = $id;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select\ncluster_id\n--report_stamp ts\nfrom public.report\nwhere id = $id;", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "Cluster ID", + "multi": false, + "name": "cluster_id", + "options": [], + "query": "select\ncluster_id\n--report_stamp ts\nfrom public.report\nwhere id = $id;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select\nreport_stamp::TEXT ts\nfrom public.report\nwhere id = $id;", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "ts", + "multi": false, + "name": "ts", + "options": [], + "query": "select\nreport_stamp::TEXT ts\nfrom public.report\nwhere id = $id;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select cluster_id\nfrom grafana.ts_cluster\nwhere report_id = $id;", + "description": null, + "error": null, + "hide": 2, + "includeAll": false, + "label": "cluster_serial_id", + "multi": false, + "name": "cluster_serial_id", + "options": [], + "query": "select cluster_id\nfrom grafana.ts_cluster\nwhere report_id = $id;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Raw Cluster Report", + "uid": "hyqCQ97Mk", + "version": 6 +} \ No newline at end of file diff --git a/dashboard/private/cluster/cluster_rbd.json b/dashboard/private/cluster/cluster_rbd.json new file mode 100644 index 0000000..46dca61 --- /dev/null +++ b/dashboard/private/cluster/cluster_rbd.json @@ -0,0 +1,549 @@ +{ + "__inputs": [], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph (old)", + "version": "" + } + ], + "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, + "links": [ + { + "icon": "dashboard", + "tags": [], + "title": "Ceph Telemetry", + "tooltip": "", + "type": "link", + "url": "/d/-GcbjrXZz/telemetry?orgId=1" + } + ], + "panels": [ + { + "aliasColors": { + "p75": "red" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 0 + }, + "hiddenSeries": false, + "id": 10, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select\n\t--*\n\t--count(*),\n\t--count(distinct(cluster_id)),\n\tw.DAILY_WINDOW as time,\n\tavg(c.rbd_num_pools),\n\tpercentile_cont(0.25) within group (order by c.rbd_num_pools) as p25,\n\tpercentile_cont(0.5) within group (order by c.rbd_num_pools) as p50,\n\tpercentile_cont(0.75) within group (order by c.rbd_num_pools) as p75,\n\tpercentile_cont(1) within group (order by c.rbd_num_pools) as p100--,\n\t--max(c.rbd_num_pools)\n\t--w.report_id--,\n\t--percentile_cont(0.5) within group (order by num_images) as med,\n\t--round(avg(c.num_images)) as avg,\n\t--count(c.num_images),\n\t--count(c.pool_idx),\n\t--sum(c.num_images) as total_images_per_cluster--,\n\t--max(c.num_images)\n\t--count(distinct(cluster_id))\nfrom\n\tgrafana.WEEKLY_REPORTS_SLIDING w\ninner join \n\tgrafana.ts_cluster c\n\t--grafana.rbd_pool c -- 'c' for cluster\non\n\tw.REPORT_ID = c.REPORT_ID\nWHERE\n $__timeFilter(w.DAILY_WINDOW)\n --w.DAILY_WINDOW BETWEEN '2021-01-10' and '2021-01-22'\nAND\n\tc.rbd_num_pools > 0\nGROUP BY w.daily_window--, w.report_id\norder by\n\tw.DAILY_WINDOW;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "RBD Pool Count", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:156", + "format": "locale", + "label": "", + "logBase": 2, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:157", + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 0 + }, + "hiddenSeries": false, + "id": 6, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select\n\t--*\n\tw.DAILY_WINDOW as time,\n\tcount(*) \"Active clusters\"\n\t--count(distinct(cluster_id))\n\t--w.DAILY_WINDOW,\n\t--w.report_id--,\n\t--percentile_cont(0.5) within group (order by num_images) as med,\n\t--round(avg(c.num_images)) as avg,\n\t--count(c.num_images),\n\t--count(c.pool_idx),\n\t--sum(c.num_images) as total_images_per_cluster--,\n\t--max(c.num_images)\n\t--count(distinct(cluster_id))\nfrom\n\tgrafana.WEEKLY_REPORTS_SLIDING w\ninner join \n\tgrafana.ts_cluster c\n\t--grafana.rbd_pool c -- 'c' for cluster\non\n\tw.REPORT_ID = c.REPORT_ID\nWHERE\n $__timeFilter(w.DAILY_WINDOW)\nGROUP BY w.daily_window--, w.report_id\norder by\n\tw.DAILY_WINDOW;\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + }, + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select\n\t--*\n\tw.DAILY_WINDOW as time,\n\tcount(*) \"Active clusters reporting RBD\"\n\t--count(distinct(cluster_id))\n\t--w.DAILY_WINDOW,\n\t--w.report_id--,\n\t--percentile_cont(0.5) within group (order by num_images) as med,\n\t--round(avg(c.num_images)) as avg,\n\t--count(c.num_images),\n\t--count(c.pool_idx),\n\t--sum(c.num_images) as total_images_per_cluster--,\n\t--max(c.num_images)\n\t--count(distinct(cluster_id))\nfrom\n\tgrafana.WEEKLY_REPORTS_SLIDING w\ninner join \n\tgrafana.ts_cluster c\n\t--grafana.rbd_pool c -- 'c' for cluster\non\n\tw.REPORT_ID = c.REPORT_ID\nWHERE\n $__timeFilter(w.DAILY_WINDOW)\nAND\n c.rbd_num_pools > 0\nGROUP BY w.daily_window--, w.report_id\norder by\n\tw.DAILY_WINDOW;\n", + "refId": "B", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Active clusters", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:242", + "format": "locale", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:243", + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 10 + }, + "hiddenSeries": false, + "id": 8, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:328", + "alias": "max", + "yaxis": 2 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select\n\tw.DAILY_WINDOW as time,\n\t--round(avg(c.num_images)) as avg,\n\tavg(c.num_images) as avg,\n\tpercentile_cont(0.25) within group (order by num_images) as p25,\n\tpercentile_cont(0.5) within group (order by num_images) as p50,\n\tpercentile_cont(0.75) within group (order by num_images) as p75,\n\tpercentile_cont(1) within group (order by num_images) as p100--,\n\t--max(c.num_images)\n\t--percentile_cont(0.5) within group (order by num_images) as med--,\n\t--count(c.num_images),\n\t--sum(c.num_images),\n\t--count(distinct(cluster_id))\nfrom\n\tgrafana.WEEKLY_REPORTS_SLIDING w\ninner join \n\t--grafana.ts_cluster c\n\tgrafana.rbd_pool c\non\n\tw.REPORT_ID = c.REPORT_ID\nWHERE\n $__timeFilter(w.DAILY_WINDOW)\n --w.DAILY_WINDOW BETWEEN '2021-01-10' and '2021-01-12'\nGROUP BY w.daily_window\norder by\n\tw.DAILY_WINDOW;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "RBD Images by Pool", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:342", + "format": "locale", + "label": "", + "logBase": 2, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:343", + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 10 + }, + "hiddenSeries": false, + "id": 9, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select\n\tagg.DAILY_WINDOW as time,\n\t--count(*),\n\t--max(total_images_per_cluster),\n\t--round(avg(total_images_per_cluster)) avg,\n\tavg(total_images_per_cluster) avg,\n\tpercentile_cont(0.25) within group (order by total_images_per_cluster) as p25,\n\tpercentile_cont(0.5) within group (order by total_images_per_cluster) as p50,\n\tpercentile_cont(0.75) within group (order by total_images_per_cluster) as p75,\n\tpercentile_cont(1) within group (order by total_images_per_cluster) as p100--,\n\t--max(total_images_per_cluster)\nfrom (\n\tselect\n\t\tw.DAILY_WINDOW,\n\t\tw.report_id,\n\t\t--percentile_cont(0.5) within group (order by num_images) as med,\n\t\t--round(avg(c.num_images)) as avg,\n\t\t--count(c.num_images),\n\t\t--count(c.pool_idx),\n\t\tsum(c.num_images) as total_images_per_cluster--,\n\t\t--max(c.num_images)\n\t\t--count(distinct(cluster_id))\n\tfrom\n\t\tgrafana.WEEKLY_REPORTS_SLIDING w\n\tinner join \n\t\t--grafana.ts_cluster c\n\t\tgrafana.rbd_pool c -- 'c' for cluster\n\ton\n\t\tw.REPORT_ID = c.REPORT_ID\n\t--WHERE\n\t --$__timeFilter(w.DAILY_WINDOW)\n\t --w.DAILY_WINDOW BETWEEN '2021-01-10' and '2021-01-12'\n\tGROUP BY w.daily_window, w.report_id\n\torder by\n\t\tw.DAILY_WINDOW\n) agg\nGROUP BY agg.daily_window--, agg.report_id\norder by\n\tagg.DAILY_WINDOW\n;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "RBD Images by Cluster", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:434", + "format": "locale", + "label": "", + "logBase": 2, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:435", + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-6M", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "RBD", + "uid": "DnkZQQPMk", + "version": 7 +} \ No newline at end of file diff --git a/dashboard/private/cluster/cluster_replicated_pool_with_ec.json b/dashboard/private/cluster/cluster_replicated_pool_with_ec.json new file mode 100644 index 0000000..4d83b05 --- /dev/null +++ b/dashboard/private/cluster/cluster_replicated_pool_with_ec.json @@ -0,0 +1,241 @@ +{ + "__inputs": [], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + } + ], + "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, + "links": [], + "panels": [ + { + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "cluster_id" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "Show details", + "url": "/d/9pUyOJrWk/cluster-private?orgId=1&var-c_id=${__value.raw}" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 4, + "options": { + "showHeader": true + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "with mixed_report as (\n\tselect report_id, count(*) \n\tfrom grafana.pool \n\twhere type = 'replicated' \n\tand length(ec_k::text) > 0 \n\tgroup by report_id\n)\nselect \n gt.cluster_id, \n count(*) as \"reports_with_mixed_pool_profile\",\n max(gt.ts) as \"latest_report\"\nfrom grafana.ts_cluster gt\ninner join mixed_report mr on gt.report_id = mr.report_id\ngroup by gt.cluster_id;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Clusters reporting mixed pool profiles", + "type": "table" + }, + { + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto", + "filterable": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "report_id" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "Show report", + "url": "/d/hyqCQ97Mk/raw-cluster-report?orgId=1&var-id=${__value.numeric}" + } + ] + }, + { + "id": "custom.align", + "value": "left" + } + ] + } + ] + }, + "gridPos": { + "h": 17, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 2, + "options": { + "showHeader": true + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select * from grafana.pool p where (p.type = 'replicated' or p.type = '1') and length(p.ec_k::text) > 0;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "All reports where pool type == 'replicated', but an EC profile exists ", + "type": "table" + } + ], + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Replicated Pool with EC", + "uid": "1rDWH5H7k", + "version": 4 +} \ No newline at end of file diff --git a/dashboard/private/cluster/cluster_report_table.json b/dashboard/private/cluster/cluster_report_table.json new file mode 100644 index 0000000..5e83469 --- /dev/null +++ b/dashboard/private/cluster/cluster_report_table.json @@ -0,0 +1,280 @@ +{ + "__inputs": [ + { + "name": "DS_POSTGRESQL", + "label": "PostgreSQL", + "description": "", + "type": "datasource", + "pluginId": "postgres", + "pluginName": "PostgreSQL" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "datasource", + "id": "postgres", + "name": "PostgreSQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table-old", + "name": "Table (old)", + "version": "" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + } + ], + "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": 1646869674782, + "links": [ + { + "icon": "dashboard", + "tags": [], + "title": "Cluster x-ray", + "tooltip": "", + "type": "link", + "url": "/d/9pUyOJrWk/cluster-private?orgId=1&var-c_id=$cluster_id" + }, + { + "icon": "dashboard", + "tags": [], + "title": "Pretty print report", + "tooltip": "", + "type": "link", + "url": "/d/hyqCQ97Mk/raw-cluster-report?orgId=1&var-id=$id" + } + ], + "panels": [ + { + "cacheTimeout": null, + "columns": [], + "datasource": null, + "fontSize": "100%", + "gridPos": { + "h": 28, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "links": [], + "pageSize": null, + "pluginVersion": "6.6.2", + "showHeader": true, + "sort": { + "col": 0, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "align": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "thresholds": [], + "type": "string", + "unit": "short" + } + ], + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "\nselect\njsonb_each(to_jsonb(report::json)) as \"Report\"\n--json_each_text(report::json) as \"Report\"\nfrom report\nwhere id in ($id);\n\n\n/*\nselect \nJSONB_PRETTY(FROM_JSONB(to_jsonb(report::json)))\n--jsonb_each(to_jsonb(report::json))\nfrom REPORT R \nwhere id=61629;\n*/\n\n/*\nselect '
' || replace(replace(JSONB_PRETTY(TO_JSONB(report::json)), ' ', ' '), E'\\n', '
') || '
'\nfrom REPORT R \nwhere id=61629;\n*/\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Original Report", + "transform": "table", + "type": "table-old" + }, + { + "datasource": null, + "gridPos": { + "h": 2, + "w": 24, + "x": 0, + "y": 28 + }, + "id": 4, + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + } + ], + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "231573", + "value": "231573" + }, + "description": null, + "error": null, + "hide": 0, + "label": null, + "name": "id", + "options": [ + { + "selected": true, + "text": "47454", + "value": "47454" + } + ], + "query": "205001", + "skipUrlSync": false, + "type": "textbox" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select cluster_id\nfrom public.report\nwhere id = $id;", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "Cluster ID", + "multi": false, + "name": "cluster_id", + "options": [], + "query": "select cluster_id\nfrom public.report\nwhere id = $id;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Report", + "uid": "40VIcT9Wk", + "version": 22 +} \ No newline at end of file diff --git a/dashboard/private/crash/crash_all_versions_minors_crashiness.json b/dashboard/private/crash/crash_all_versions_minors_crashiness.json new file mode 100644 index 0000000..b2f8202 --- /dev/null +++ b/dashboard/private/crash/crash_all_versions_minors_crashiness.json @@ -0,0 +1,283 @@ +{ + "__inputs": [], + "__requires": [ + { + "type": "panel", + "id": "bargauge", + "name": "Bar gauge", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + } + ], + "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": 1646865958409, + "links": [], + "panels": [ + { + "collapsed": false, + "datasource": null, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 7, + "panels": [], + "repeat": "all_majors", + "title": "Crashiness of version $all_majors", + "type": "row" + }, + { + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "displayName": "$__cell_0", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 2, + "options": { + "displayMode": "gradient", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": true + }, + "showUnfilled": true, + "text": {} + }, + "pluginVersion": "8.1.2", + "repeat": null, + "repeatDirection": "v", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "with \n latest_report AS ( -- The latest cluster report for a specific time interval\n\tSELECT\n\t\tDISTINCT ON(cluster_id)\n\t\treport_id\n\tFROM \n\t\tgrafana.ts_cluster\n\tWHERE\n\t\t$__timeFilter(ts)\n\tORDER BY\n\t\tcluster_id,\n\t ts DESC\n ),\n version_count AS ( -- Number of daemons running a specific version for the time frame selected above.\n\tSELECT value as version, sum(total) num\n\tFROM latest_report INNER JOIN grafana.metadata ON latest_report.report_id = grafana.metadata.report_id\n\tWHERE\n\t\tattr='ceph_version_norm'\n\t\tAND SPLIT_PART(value, '.', 1) = $all_majors\n\tGROUP BY 1\n ),\n crashes_versions_count AS ( -- Crashes count per version per time frame.\n\tSELECT split_part(ceph_version, '-', 1) as version, count(*) num\n\tFROM crash.crash\n\tWHERE $__timeFilter(ts)\n\tAND SPLIT_PART(ceph_version, '.', 1) = $all_majors\n\tGROUP BY 1\n )\nSELECT 'v' || version_count.version::TEXT AS version, coalesce(crashes_versions_count.num / version_count.num::REAL, 0) crashiness\nFROM version_count\nLEFT JOIN crashes_versions_count ON crashes_versions_count.version = version_count.version\nORDER BY version_count.version", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Crashes per daemon between ${__from:date:YYYY-MM-DD} and ${__to:date:YYYY-MM-DD}", + "type": "bargauge" + }, + { + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "displayName": "$__cell_0", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 15, + "options": { + "displayMode": "gradient", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": true + }, + "showUnfilled": true, + "text": {} + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT 'v' || split_part(ceph_version, '-', 1) as version, count(distinct(spec_id)) num\nFROM crash.crash\n INNER JOIN crash.spec ON crash.crash.spec_id = crash.spec.id\n INNER JOIN crash.spec_status ON crash.spec.spec_status_id = crash.spec_status.id\nWHERE NOT crash.spec_status.ignore\nAND $__timeFilter(ts)\nAND split_part(ceph_version, '.', 1) = $all_majors\nGROUP BY 1\nORDER BY 1\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Unique crash fingerprints between ${__from:date:YYYY-MM-DD} and ${__to:date:YYYY-MM-DD}", + "type": "bargauge" + } + ], + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "selected": true, + "tags": [], + "text": [ + "13", + "14", + "15", + "16" + ], + "value": [ + "13", + "14", + "15", + "16" + ] + }, + "description": null, + "error": null, + "hide": 2, + "includeAll": false, + "label": null, + "multi": true, + "name": "all_majors", + "options": [ + { + "selected": true, + "text": "13", + "value": "13" + }, + { + "selected": true, + "text": "14", + "value": "14" + }, + { + "selected": true, + "text": "15", + "value": "15" + }, + { + "selected": true, + "text": "16", + "value": "16" + } + ], + "query": "13,14,15,16", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + } + ] + }, + "time": { + "from": "now-1y", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "All versions minors crashiness", + "uid": "yR2njn-Mk", + "version": 3 +} \ No newline at end of file diff --git a/dashboard/private/crash/crash_crash_spec_x-ray.json b/dashboard/private/crash/crash_crash_spec_x-ray.json new file mode 100644 index 0000000..20a5315 --- /dev/null +++ b/dashboard/private/crash/crash_crash_spec_x-ray.json @@ -0,0 +1,2081 @@ +{ + "__inputs": [ + { + "name": "DS_POSTGRESQL", + "label": "PostgreSQL", + "description": "", + "type": "datasource", + "pluginId": "postgres", + "pluginName": "PostgreSQL" + } + ], + "__requires": [ + { + "type": "panel", + "id": "bargauge", + "name": "Bar gauge", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph (old)", + "version": "" + }, + { + "type": "datasource", + "id": "postgres", + "name": "PostgreSQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + } + ], + "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": 1646865473159, + "links": [ + { + "icon": "dashboard", + "tags": [], + "title": "Main", + "tooltip": "", + "type": "link", + "url": "/d/GiO_B8bMz/main?orgId=1" + }, + { + "icon": "dashboard", + "tags": [], + "title": "Search", + "tooltip": "", + "type": "link", + "url": "/d/Nvj6XTaMk/spec-search?orgId=1" + } + ], + "panels": [ + { + "datasource": null, + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 30, + "options": { + "content": "
\n
\n Crash fingerprint:\n
${sig_v2}
\n
\n
", + "mode": "html" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-purple", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 4 + }, + "id": 14, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/.*/", + "values": true + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select ts_first_occurrence::date::text\nfrom crash.spec_mv\nWHERE sig_v2 = decode('$sig_v2', 'hex')", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "First reported", + "type": "stat" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "semi-dark-purple", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 4 + }, + "id": 15, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/.*/", + "values": true + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "\nselect max(ts)::date::text\nfrom crash.crash\nINNER JOIN crash.spec on crash.spec.id = crash.crash.spec_id\nWHERE crash.spec.sig_v2 = decode('$sig_v2', 'hex')", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Last reported", + "type": "stat" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-purple", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 12, + "y": 4 + }, + "id": 6, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT count(*)\nFROM crash.crash\nINNER JOIN crash.spec ON spec_id = crash.spec.id\nWHERE sig_v2 = decode('$sig_v2', 'hex')\nAND $__timeFilter(ts)", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Crash count", + "type": "stat" + }, + { + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "super-light-purple", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 16, + "y": 4 + }, + "id": 31, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "--SELECT count(*)\n\nselect\n count(*)\nfrom (\n SELECT\n DISTINCT ON(cluster_id)\n grafana.ts_cluster.*\n from crash.crash\n INNER JOIN crash.spec ON spec_id = crash.spec.id\n INNER JOIN grafana.ts_cluster ON crash.crash.report_id = grafana.ts_cluster.report_id\n WHERE sig_v2 = decode('$sig_v2', 'hex')\n AND $__timeFilter(crash.crash.ts)\n order by grafana.ts_cluster.cluster_id, grafana.ts_cluster.ts desc\n) as affected_clusters;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Affected Clusters", + "type": "stat" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "status" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "Show issue", + "url": "https://tracker.ceph.com/issues/${issue_id}" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 20, + "y": 4 + }, + "id": 28, + "links": [ + { + "title": "Show issues", + "url": "/d/jByk5HaMz/crash-spec-x-ray?viewPanel=41&orgId=1&var-sig_v2=${sig_v2}" + } + ], + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/.*/", + "values": true + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT crash.spec_status.description as status\nFROM crash.spec\nINNER JOIN crash.spec_status on crash.spec.spec_status_id = crash.spec_status.id\nWHERE sig_v2 = decode('$sig_v2', 'hex');\n\n/*\nSELECT issue_status as status\nFROM crash.spec_to_redmine_main_issue\nINNER JOIN crash.spec on crash.spec.id = crash.spec_to_redmine_main_issue.spec_id\nWHERE sig_v2 = decode('$sig_v2', 'hex');\n*/\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Status", + "type": "stat" + }, + { + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "displayName": "$__cell_0", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "count" + }, + "properties": [ + { + "id": "unit", + "value": "locale" + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 8 + }, + "id": 8, + "options": { + "displayMode": "gradient", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": true + }, + "showUnfilled": true, + "text": {} + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT 'v' || split_part(crash.crash.ceph_version, '-', 1) as metric, count(*)\nFROM crash.crash\nINNER JOIN crash.spec ON spec_id = crash.spec.id\nWHERE sig_v2 = decode('$sig_v2', 'hex')\nAND $__timeFilter(ts)\nGROUP BY 1\nORDER BY 1;\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Crashes by Version", + "type": "bargauge" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 18 + }, + "id": 35, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "description": "The stack trace of the crash without function offsets", + "fieldConfig": { + "defaults": { + "custom": { + "align": null, + "displayMode": "auto", + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "functions" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "Search this function in other crashes", + "url": "/d/Nvj6XTaMk/spec-search?orgId=1&var-substr_1=${__value.text}" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 16, + "w": 24, + "x": 0, + "y": 19 + }, + "id": 12, + "options": { + "showHeader": true + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select UNNEST(stack_names) as functions\nfrom crash.spec\nWHERE sig_v2 = decode('$sig_v2', 'hex')\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Stack Names (Most recent call first)", + "type": "table" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 35 + }, + "id": 34, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": { + "align": null, + "displayMode": "auto", + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 36 + }, + "id": 23, + "options": { + "showHeader": true + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select assert_func\nfrom crash.spec_mv\nwhere sig_v2 = decode('$sig_v2', 'hex');", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Assert Function", + "type": "table" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 39 + }, + "id": 19, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": { + "align": null, + "displayMode": "auto", + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 40 + }, + "id": 24, + "options": { + "showHeader": true + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select assert_condition\nfrom crash.spec_mv\nwhere sig_v2 = decode('$sig_v2', 'hex');", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Assert Condition", + "type": "table" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 43 + }, + "id": 33, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fieldConfig": { + "defaults": { + "unit": "locale" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 44 + }, + "hiddenSeries": false, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT $__timeGroup(ts, '1d', 0) as time, count(*)\nFROM crash.crash\nINNER JOIN crash.spec ON spec_id = crash.spec.id\nWHERE sig_v2 = decode('$sig_v2', 'hex')\nAND $__timeFilter(ts)\nGROUP BY $__timeGroup(ts, '1d', 0)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Daily Occurrences", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:415", + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:416", + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 52 + }, + "id": 32, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": { + "align": "left", + "displayMode": "auto", + "filterable": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "cluster_id" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "Show cluster", + "url": "/d/9pUyOJrWk/x-ray?orgId=1&var-c_id=${__value.text}" + } + ] + }, + { + "id": "custom.width", + "value": 52 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "total_bytes" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "total_used_bytes" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "pg_num" + }, + "properties": [ + { + "id": "unit", + "value": "locale" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "created" + }, + "properties": [ + { + "id": "custom.width", + "value": 210 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "ts" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeAsSystem" + }, + { + "id": "custom.width", + "value": 219 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "report_id" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "Show report", + "url": "/d/hyqCQ97Mk/raw-cluster-report?orgId=1&var-id=${__value.numeric}" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 53 + }, + "id": 10, + "options": { + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "pools_num" + } + ] + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "-- cluster info from a report that contains a related crash\nwith\ncluster_info as (\n\tselect\n\t DISTINCT ON(cluster_id)\n\t grafana.ts_cluster.*\n\tfrom crash.crash\n\tINNER JOIN crash.spec ON spec_id = crash.spec.id\n\tINNER JOIN grafana.ts_cluster ON crash.crash.report_id = grafana.ts_cluster.report_id\n\tWHERE sig_v2 = decode('$sig_v2', 'hex')\n\t--AND $__timeFilter(crash.crash.ts)\n),\nrecent_versions as (\n\t-- the latest metadata for each cluster\n\tselect gm.report_id, array_agg(distinct(gm.value)) recent_versions, gc.cluster_id \n\tfrom grafana.metadata gm inner join grafana.ts_cluster gc on gm.report_id = gc.report_id \n\twhere gm.report_id in (\n\t\tselect max(report_id) \n\t\tfrom grafana.ts_cluster \n\t\twhere cluster_id in --('2133741d-5f4e-4afd-ace3-2760b255d7c7', '0b54fcbf-aa86-4154-8290-7767a733a824')\n\t\t\t\t( select ci.cluster_id\n\t\t\t\tfrom cluster_info ci\n\t\t\t\t)\n\t\tgroup by cluster_id\n\t\t)\n\tand attr = 'ceph_version_norm'\n\tgroup by gm.report_id, gc.cluster_id \n)\nselect ci.*, rv.recent_versions \nfrom \nrecent_versions rv\ninner join cluster_info ci on rv.cluster_id = ci.cluster_id\norder by ci.cluster_id, ci.ts desc\n\n/*\nselect\n DISTINCT ON(cluster_id)\n grafana.ts_cluster.*\nfrom crash.crash\nINNER JOIN crash.spec ON spec_id = crash.spec.id\nINNER JOIN grafana.ts_cluster ON crash.crash.report_id = grafana.ts_cluster.report_id\nWHERE sig_v2 = decode('$sig_v2', 'hex')\nAND $__timeFilter(crash.crash.ts)\norder by grafana.ts_cluster.cluster_id, grafana.ts_cluster.ts desc\n*/", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Affected Clusters", + "type": "table" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 63 + }, + "id": 20, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "description": "Crashes with the same specification/fingerprint that occurred between ${__from:date:YYYY-MM-DD} and ${__to:date:YYYY-MM-DD}. Click on a crash_id to see more details (like its backtrace). ", + "fieldConfig": { + "defaults": { + "custom": { + "align": "left", + "displayMode": "auto", + "filterable": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "crash_id" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "See crash details", + "url": "/d/eLsJZ9-Mz/crash-x-ray?orgId=1&var-crash_id=${__value.raw}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "report_id" + }, + "properties": [ + { + "id": "custom.width", + "value": 117 + }, + { + "id": "links", + "value": [ + { + "title": "See report", + "url": "/d/hyqCQ97Mk/raw-cluster-report?orgId=1&var-id=${__value.numeric}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "spec_id" + }, + "properties": [ + { + "id": "custom.width", + "value": 90 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "ts" + }, + "properties": [ + { + "id": "custom.width", + "value": 215 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "sig_v1" + }, + "properties": [ + { + "id": "custom.width", + "value": 160 + }, + { + "id": "links", + "value": [ + { + "title": "See other crashes with the same sig_v1", + "url": "/d/Nvj6XTaMk/spec-search?orgId=1&var-substr_1=&var-substr_2=&var-substr_3=&var-assert_function=&var-assert_condition=&var-sig_v1=${__value.text}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "entity_name" + }, + "properties": [ + { + "id": "custom.width", + "value": 175 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "id" + }, + "properties": [ + { + "id": "custom.width", + "value": 84 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "process_name" + }, + "properties": [ + { + "id": "custom.width", + "value": 133 + }, + { + "id": "links", + "value": [ + { + "title": "Show other crashes of ${__value.text}", + "url": "/d/Nvj6XTaMk/spec-search?orgId=1&var-daemons=${__value.text}" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 64 + }, + "id": 26, + "options": { + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "process_name" + } + ] + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT \n--crash.crash.*\n crash.crash.id,\n crash.crash.spec_id,\n crash.crash.crash_id,\n crash.crash.report_id,\n crash.crash.ts::text,\n encode(crash.crash.sig_v1, 'hex') sig_v1,\n crash.crash.process_name,\n crash.crash.entity_name,\n crash.crash.ceph_version,\n crash.crash.utsname_hostname,\n crash.crash.utsname_sysname,\n crash.crash.utsname_release,\n crash.crash.utsname_version,\n crash.crash.utsname_machine,\n crash.crash.os_name,\n crash.crash.os_id,\n crash.crash.os_version_id,\n crash.crash.os_version,\n crash.crash.assert_file,\n crash.crash.assert_line,\n crash.crash.assert_thread_name,\n crash.crash.assert_msg,\n crash.crash.io_error,\n crash.crash.io_error_devname,\n crash.crash.io_error_path,\n crash.crash.io_error_code,\n crash.crash.io_error_optype,\n crash.crash.io_error_offset,\n crash.crash.io_error_length\nFROM crash.crash\nINNER JOIN crash.spec ON spec_id = crash.spec.id\nWHERE crash.spec.sig_v2 = decode('$sig_v2', 'hex')\nAND $__timeFilter(crash.crash.ts)\nORDER BY crash.crash.ts DESC\n\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Crashes", + "type": "table" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 73 + }, + "id": 38, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": { + "align": null, + "displayMode": "auto", + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "cluster_id" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "Show cluster", + "url": "/d/9pUyOJrWk/x-ray?orgId=1&var-c_id=${__value.text}" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 74 + }, + "id": 37, + "options": { + "showHeader": true + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "--select 'NA'\n\n--/*\n--affected clusters\nwith affected_clusters as (\n\tselect\n\t --count(*)\n\t report_id, cluster_id\n\tfrom (\n\t\t SELECT\n\t\t DISTINCT ON(cluster_id)\n\t\t grafana.ts_cluster.*\n\t\t from crash.crash\n\t\t INNER JOIN crash.spec ON spec_id = crash.spec.id\n\t\t INNER JOIN grafana.ts_cluster ON crash.crash.report_id = grafana.ts_cluster.report_id\n\t\t --WHERE spec_id in (1407)--(select * from generate_series(1,100))\n\t\t WHERE sig_v2 = decode('$sig_v2', 'hex')\n\t\t AND $__timeFilter(crash.crash.ts)\n\t\t AND channel_ident\n\t\t order by grafana.ts_cluster.cluster_id, grafana.ts_cluster.ts desc\n\t) affected_clusters\n)\nselect pr.cluster_id, --pr.id,\n\t\treplace(pr.report, E'\\\\u0000', ' ')::jsonb#>'{organization}' organization,\n\t\treplace(pr.report, E'\\\\u0000', ' ')::jsonb#>'{description}' description,\n\t\treplace(pr.report, E'\\\\u0000', ' ')::jsonb#>'{contact}' contact\nfrom affected_clusters ac\n-- inner join crash.crash cc on ac.report_id = cc.report_id \ninner join public.report pr on ac.report_id = pr.id\nwhere pr.id in (ac.report_id)\n--*/", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Affected Clusters Contact Details", + "type": "table" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 81 + }, + "id": 39, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": { + "align": null, + "displayMode": "auto", + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "issue_id" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "Show issue", + "url": "https://tracker.ceph.com/issues/${__value.raw}" + } + ] + }, + { + "id": "custom.width", + "value": 121 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "spec_id" + }, + "properties": [ + { + "id": "custom.width", + "value": 100 + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 82 + }, + "id": 41, + "options": { + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "--select id from crash.spec where sig_v2 = decode('$sig_v2', 'hex');\n\n--select * from crash.redmine_description_added\nselect * from crash.spec_to_redmine_main_issue\nwhere spec_id = (select id from crash.spec where sig_v2 = decode('$sig_v2', 'hex'))", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Redmine Issues", + "type": "table" + }, + { + "datasource": null, + "gridPos": { + "h": 2, + "w": 24, + "x": 0, + "y": 88 + }, + "id": 27, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 90 + }, + "id": 42, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + } + ], + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": true, + "text": "a91bbf707e66015fe8e1c264c6b5e9151dc51f81f4c6f177ba158e599f0f6548", + "value": "a91bbf707e66015fe8e1c264c6b5e9151dc51f81f4c6f177ba158e599f0f6548" + }, + "description": null, + "error": null, + "hide": 0, + "label": null, + "name": "sig_v2", + "options": [ + { + "selected": true, + "text": "a91bbf707e66015fe8e1c264c6b5e9151dc51f81f4c6f177ba158e599f0f6548", + "value": "a91bbf707e66015fe8e1c264c6b5e9151dc51f81f4c6f177ba158e599f0f6548" + } + ], + "query": "a91bbf707e66015fe8e1c264c6b5e9151dc51f81f4c6f177ba158e599f0f6548", + "skipUrlSync": false, + "type": "textbox" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select issue_id from crash.redmine_description_added\nwhere spec_id = (select id from crash.spec where sig_v2 = decode('$sig_v2', 'hex'))\nlimit 1;", + "description": null, + "error": null, + "hide": 2, + "includeAll": false, + "label": null, + "multi": false, + "name": "issue_id", + "options": [], + "query": "select issue_id from crash.redmine_description_added\nwhere spec_id = (select id from crash.spec where sig_v2 = decode('$sig_v2', 'hex'))\nlimit 1;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-2y", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Crash spec X-ray", + "uid": "jByk5HaMz", + "version": 48 +} \ No newline at end of file diff --git a/dashboard/private/crash/crash_crash_x-ray.json b/dashboard/private/crash/crash_crash_x-ray.json new file mode 100644 index 0000000..e09a6ae --- /dev/null +++ b/dashboard/private/crash/crash_crash_x-ray.json @@ -0,0 +1,1689 @@ +{ + "__inputs": [ + { + "name": "DS_POSTGRESQL", + "label": "PostgreSQL", + "description": "", + "type": "datasource", + "pluginId": "postgres", + "pluginName": "PostgreSQL" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "datasource", + "id": "postgres", + "name": "PostgreSQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + } + ], + "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": 1646865609059, + "links": [], + "panels": [ + { + "datasource": null, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "report_id" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "Show report", + "url": "/d/hyqCQ97Mk/raw-cluster-report?orgId=1&var-id=${__value.numeric}" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 2, + "w": 4, + "x": 0, + "y": 0 + }, + "id": 8, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select report_id\nfrom crash.crash\nwhere crash_id = '$crash_id';", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Report ID", + "type": "stat" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 4, + "x": 4, + "y": 0 + }, + "id": 10, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/.*/", + "values": true + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select process_name\nfrom crash.crash\nwhere crash_id = '$crash_id';", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Process Name", + "type": "stat" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "ceph_version" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "Show other ${__value.raw} crashes", + "url": "/d/Nvj6XTaMk/spec-search?orgId=1&var-substr_1=&var-substr_2=&var-substr_3=&var-minors_affected=${__value.raw}&var-only_new_fingerprints=false" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 2, + "w": 4, + "x": 8, + "y": 0 + }, + "id": 9, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/^ceph_version$/", + "values": true + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select ceph_version\nfrom crash.crash\nwhere crash_id = '$crash_id';", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Ceph Version", + "type": "stat" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "cluster_id" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "Show cluster's details", + "url": "/d/9pUyOJrWk/x-ray?orgId=1&var-c_id=${__value.text}" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 2, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 11, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/.*/", + "values": true + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "--select 'NA';\n\n--/*\nselect cluster_id\nfrom crash.crash inner join grafana.ts_cluster on crash.crash.report_id = grafana.ts_cluster.report_id\nwhere crash_id = '$crash_id';\n--*/", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Cluster ID", + "type": "stat" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 12, + "x": 0, + "y": 2 + }, + "id": 32, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/.*/", + "values": true + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select crash_id\nfrom crash.crash\nwhere crash_id = '$crash_id';", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Crash ID", + "type": "stat" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 12, + "x": 12, + "y": 2 + }, + "id": 22, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/.*/", + "values": true + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select entity_name\nfrom crash.crash\nwhere crash_id = '$crash_id';", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Entity Name", + "type": "stat" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 4 + }, + "id": 25, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "custom": { + "align": null, + "displayMode": "auto", + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "utsname_hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": 186 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "utsname_sysname" + }, + "properties": [ + { + "id": "custom.width", + "value": 176 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "utsname_release" + }, + "properties": [ + { + "id": "custom.width", + "value": 255 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "utsname_version" + }, + "properties": [ + { + "id": "custom.width", + "value": 433 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "os_name" + }, + "properties": [ + { + "id": "custom.width", + "value": 242 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "os_version_id" + }, + "properties": [ + { + "id": "custom.width", + "value": 297 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "os_version" + }, + "properties": [ + { + "id": "custom.width", + "value": 362 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "os_id" + }, + "properties": [ + { + "id": "custom.width", + "value": 539 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "sig_v1" + }, + "properties": [ + { + "id": "custom.width", + "value": 679 + }, + { + "id": "links", + "value": [ + { + "title": "See other crashes with the same sig_v1", + "url": "/d/Nvj6XTaMk/spec-search?orgId=1&var-substr_1=&var-substr_2=&var-substr_3=&var-assert_function=&var-assert_condition=&var-sig_v1=${__value.text}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "sig_v2" + }, + "properties": [ + { + "id": "custom.width", + "value": 744 + }, + { + "id": "links", + "value": [ + { + "title": "See other crashes with the same sig_v2", + "url": "/d/Nvj6XTaMk/spec-search?orgId=1&var-substr_1=&var-substr_2=&var-substr_3=&var-assert_function=&var-assert_condition=&var-sig_v2=${__value.text}" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 3, + "w": 23, + "x": 0, + "y": 5 + }, + "id": 16, + "options": { + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "sig_v1" + } + ] + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select\n encode(crash.crash.sig_v1, 'hex') sig_v1,\n encode(crash.spec.sig_v2, 'hex') sig_v2\nfrom crash.crash inner join crash.spec on crash.crash.spec_id = crash.spec.id\nwhere crash_id = '$crash_id';", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "table" + }, + { + "datasource": null, + "gridPos": { + "h": 25, + "w": 24, + "x": 0, + "y": 8 + }, + "id": 35, + "options": { + "content": "
\n    \n$crash_content\n    \n
", + "mode": "html" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select\n jsonb_pretty(a.single_crash::jsonb)\nfrom (\n\tselect\n\t\tjsonb_array_elements(report::jsonb->'crashes') as single_crash\n\tfrom public.report\n\twhere id in (\n\t select report_id\n\t\t\t\tfrom crash.crash\n\t\t\t\twhere crash_id = '$crash_id'\n\t\t\t\t)\n\t) a\nwhere a.single_crash::jsonb->>'crash_id' = '$crash_id';", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Raw crash report", + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": { + "align": null, + "displayMode": "auto", + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 24, + "w": 24, + "x": 0, + "y": 33 + }, + "id": 4, + "options": { + "showHeader": true + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select unnest(backtrace) as \"Backtrace\"\nfrom crash.crash\nwhere crash_id = '$crash_id';", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Backtrace (Most recent call first)", + "type": "table" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 57 + }, + "id": 27, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "custom": { + "align": null, + "displayMode": "auto", + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "value" + }, + "properties": [ + { + "id": "noValue", + "value": "null" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "key" + }, + "properties": [ + { + "id": "custom.width", + "value": 188 + } + ] + } + ] + }, + "gridPos": { + "h": 23, + "w": 24, + "x": 0, + "y": 58 + }, + "id": 17, + "options": { + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "with\n\tq as (\n\t\tselect\n\t\t crash.spec.assert_func,\n\t\t crash.spec.assert_condition,\n\t\t assert_file,\n assert_line,\n assert_thread_name,\n assert_msg,\n\t\t os_name,\n os_id,\n os_version_id,\n os_version,\n\t\t utsname_hostname,\n utsname_sysname,\n utsname_release,\n utsname_version,\n utsname_machine,\n io_error,\n io_error_devname,\n io_error_path,\n io_error_code,\n io_error_optype,\n io_error_offset,\n io_error_length\n from crash.crash inner join crash.spec on crash.crash.spec_id = crash.spec.id\n where crash_id = '$crash_id'\n /*\n select\n encode(crash.crash.sig_v1, 'hex') sig_v1,\n encode(crash.spec.sig_v2, 'hex') sig_v2\nfrom crash.crash inner join crash.spec on crash.crash.spec_id = crash.spec.id\nwhere crash_id = '$crash_id';\n */\n \n\t),\n\trj as (\n\t\tselect row_to_json(q) rj from q\n\t)\nselect je.key, je.value from rj join json_each_text(rj.rj) as je on true;\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Additional Details", + "type": "table" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 81 + }, + "id": 26, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "custom": { + "align": null, + "displayMode": "auto", + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "utsname_hostname" + }, + "properties": [ + { + "id": "custom.width", + "value": 186 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "utsname_sysname" + }, + "properties": [ + { + "id": "custom.width", + "value": 176 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "utsname_release" + }, + "properties": [ + { + "id": "custom.width", + "value": 255 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "utsname_version" + }, + "properties": [ + { + "id": "custom.width", + "value": 433 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "io_error" + }, + "properties": [ + { + "id": "custom.width", + "value": 109 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "io_error_devname" + }, + "properties": [ + { + "id": "custom.width", + "value": 174 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "io_error_path" + }, + "properties": [ + { + "id": "custom.width", + "value": 281 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "io_error_code" + }, + "properties": [ + { + "id": "custom.width", + "value": 133 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "io_error_optype" + }, + "properties": [ + { + "id": "custom.width", + "value": 216 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "assert_file" + }, + "properties": [ + { + "id": "custom.width", + "value": 656 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "assert_line" + }, + "properties": [ + { + "id": "custom.width", + "value": 196 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "assert_thread_name" + }, + "properties": [ + { + "id": "custom.width", + "value": 289 + } + ] + } + ] + }, + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 82 + }, + "id": 20, + "options": { + "showHeader": true + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select\n assert_msg\nfrom crash.crash\nwhere crash_id = '$crash_id';", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Assert Message", + "type": "table" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 85 + }, + "id": 29, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": { + "align": null, + "displayMode": "auto", + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 86 + }, + "id": 15, + "options": { + "showHeader": true + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select assert_func\nfrom crash.spec \n inner join crash.crash on crash.spec.id = crash.crash.spec_id\nwhere crash_id = '$crash_id';", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Assert Function", + "type": "table" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 89 + }, + "id": 31, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": { + "align": null, + "displayMode": "auto", + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 90 + }, + "id": 13, + "options": { + "showHeader": true + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select assert_condition\nfrom crash.spec \n inner join crash.crash on crash.spec.id = crash.crash.spec_id\nwhere crash_id = '$crash_id';", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Assert Condition", + "type": "table" + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 94 + }, + "id": 30, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + } + ], + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "2020-03-24_17:24:51.441665Z_f63205cf-ad5a-4ed3-89b2-85b7f606ecf7", + "value": "2020-03-24_17:24:51.441665Z_f63205cf-ad5a-4ed3-89b2-85b7f606ecf7" + }, + "description": null, + "error": null, + "hide": 0, + "label": "Crash ID", + "name": "crash_id", + "options": [ + { + "selected": false, + "text": "2021-07-09T05:56:10.992923Z_06193940-b811-47de-bd0c-8c135d052eea", + "value": "2021-07-09T05:56:10.992923Z_06193940-b811-47de-bd0c-8c135d052eea" + } + ], + "query": "2020-03-24_17:24:51.441665Z_f63205cf-ad5a-4ed3-89b2-85b7f606ecf7", + "skipUrlSync": false, + "type": "textbox" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select\n jsonb_pretty(a.single_crash::jsonb)\nfrom (\n\tselect\n\t\tjsonb_array_elements(report::jsonb->'crashes') as single_crash\n\tfrom public.report\n\twhere id in (\n\t select report_id\n\t\t\t\tfrom crash.crash\n\t\t\t\twhere crash_id = '$crash_id'\n\t\t\t\t)\n\t) a\nwhere a.single_crash::jsonb->>'crash_id' = '$crash_id';", + "description": null, + "error": null, + "hide": 2, + "includeAll": false, + "label": null, + "multi": false, + "name": "crash_content", + "options": [], + "query": "select\n jsonb_pretty(a.single_crash::jsonb)\nfrom (\n\tselect\n\t\tjsonb_array_elements(report::jsonb->'crashes') as single_crash\n\tfrom public.report\n\twhere id in (\n\t select report_id\n\t\t\t\tfrom crash.crash\n\t\t\t\twhere crash_id = '$crash_id'\n\t\t\t\t)\n\t) a\nwhere a.single_crash::jsonb->>'crash_id' = '$crash_id';", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Crash x-ray", + "uid": "eLsJZ9-Mz", + "version": 40 +} \ No newline at end of file diff --git a/dashboard/private/crash/crash_main.json b/dashboard/private/crash/crash_main.json new file mode 100644 index 0000000..01acc4a --- /dev/null +++ b/dashboard/private/crash/crash_main.json @@ -0,0 +1,1228 @@ +{ + "__inputs": [], + "__requires": [ + { + "type": "panel", + "id": "bargauge", + "name": "Bar gauge", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph (old)", + "version": "" + }, + { + "type": "panel", + "id": "heatmap", + "name": "Heatmap", + "version": "" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + } + ], + "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, + "links": [], + "panels": [ + { + "datasource": null, + "gridPos": { + "h": 2, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 14, + "options": { + "content": "
\nThe panels in this dashboard are affected by the time range selected in the time picker (top right corner).", + "mode": "html" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "description": "", + "gridPos": { + "h": 3, + "w": 8, + "x": 0, + "y": 2 + }, + "id": 17, + "options": { + "content": "
\n
\n search\n
", + "mode": "html" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "count" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "Show crash fingerprints for this time range", + "url": "d/Nvj6XTaMk/spec-search?${__url_time_range}&var-only_new_fingerprints=false" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 2 + }, + "id": 15, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": true + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT count(distinct(crash.crash.spec_id))\nFROM crash.crash\nWHERE $__timeFilter(ts)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Distinct Crash Fingerprints", + "type": "stat" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "count" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "Show new crash fingerprints for this time range", + "url": "/d/Nvj6XTaMk/spec-search?${__url_time_range}&var-only_new_fingerprints=true" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 12, + "y": 2 + }, + "id": 11, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT count(*)\nFROM crash.spec_mv\nWHERE $__timeFilter(ts_first_occurrence)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "New Crash Fingerprints", + "type": "stat" + }, + { + "datasource": null, + "description": "Counts all crash events between ${__from:date:YYYY-MM-DD} and ${__to:date:YYYY-MM-DD}.", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 2 + }, + "id": 12, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT count(*)\nFROM crash.crash\nWHERE $__timeFilter(ts);\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Crash Events", + "type": "stat" + }, + { + "datasource": null, + "description": "Counts all crash events between ${__from:date:YYYY-MM-DD} and ${__to:date:YYYY-MM-DD} that reported IO errors.", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 20, + "y": 2 + }, + "id": 25, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT count(*)\nFROM crash.crash\nWHERE $__timeFilter(ts)\n AND crash.crash.io_error = 'true';\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "IO Errors", + "type": "stat" + }, + { + "cards": { + "cardPadding": null, + "cardRound": null + }, + "color": { + "cardColor": "#b4ff00", + "colorScale": "sqrt", + "colorScheme": "interpolateOranges", + "exponent": 0.5, + "mode": "spectrum" + }, + "dataFormat": "timeseries", + "datasource": null, + "description": "", + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 5 + }, + "heatmap": {}, + "hideZeroBuckets": false, + "highlightCards": true, + "id": 19, + "legend": { + "show": false + }, + "pluginVersion": "7.3.6", + "reverseYBuckets": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroup(ts, '1d', 0) as time, count(*)\nFROM\n crash.crash\nWHERE\n $__timeFilter(ts)\nGROUP BY\n $__timeGroup(ts, '1d', 0), spec_id\nORDER BY\n 1", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Count of fingerprints bucketed by number of crash events", + "tooltip": { + "show": true, + "showHistogram": false + }, + "type": "heatmap", + "xAxis": { + "show": true + }, + "xBucketNumber": null, + "xBucketSize": "1d", + "yAxis": { + "decimals": null, + "format": "locale", + "logBase": 2, + "max": null, + "min": null, + "show": true, + "splitFactor": null + }, + "yBucketBound": "auto", + "yBucketNumber": null, + "yBucketSize": null + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 15 + }, + "id": 22, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "cacheTimeout": null, + "datasource": null, + "description": "Number of crashes per daemon per major version for the whole time frame selected.", + "fieldConfig": { + "defaults": { + "displayName": "$__cell_0", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "yellow", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "crashiness" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "Show details", + "url": "/d/yR2njn-Mk/all-versions-minors-crashiness?${__url_time_range}" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 9, + "interval": "", + "links": [], + "options": { + "displayMode": "gradient", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": true + }, + "showUnfilled": true, + "text": {} + }, + "pluginVersion": "8.1.2", + "repeat": null, + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "ceph_version", + "rawQuery": true, + "rawSql": "with \n latest_report AS ( -- The latest cluster report for a specific time interval\n\tSELECT\n\t\tDISTINCT ON(cluster_id)\n\t\treport_id\n\tFROM \n\t\tgrafana.ts_cluster\n\tWHERE\n\t\t$__timeFilter(ts)\n\tORDER BY\n\t\tcluster_id,\n\t ts DESC\n ),\n version_count AS (\n -- Number of daemons running a specific version for the time frame selected above.\n\tSELECT SPLIT_PART(value, '.', 1) as version, sum(total) num\n\tFROM latest_report \n\tINNER JOIN grafana.metadata ON latest_report.report_id = grafana.metadata.report_id\n\tWHERE\n\t\tattr='ceph_version_norm'\n\tGROUP BY 1\n ),\n crashes_versions_count AS (\n -- Crashes count per version per time frame.\n\tSELECT split_part(ceph_version, '.', 1) as version, count(*) num\n\tFROM crash.crash\n\tWHERE $__timeFilter(ts)\n\tGROUP BY 1\n )\nSELECT 'v' || version_count.version::TEXT AS version,\n coalesce(crashes_versions_count.num / version_count.num::REAL, 0) crashiness\nFROM version_count\nLEFT JOIN crashes_versions_count ON crashes_versions_count.version = version_count.version\nORDER BY version;", + "refId": "A", + "select": [ + [ + { + "params": [ + "crash_sig_id" + ], + "type": "column" + } + ] + ], + "table": "crash.crash", + "timeColumn": "ts", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Version Crashiness", + "type": "bargauge" + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "hiddenSeries": false, + "id": 4, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:80", + "alias": "fingerprints", + "bars": false, + "fill": 0, + "legend": true, + "lines": true, + "linewidth": 2, + "stack": false, + "yaxis": 2, + "zindex": 2 + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "hide": false, + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroup(ts, '1d', 0) as time,\n case when crash.crash.io_error is null then 'crashes' else 'io_error' end as metric,\n count(*) as crash_count\nFROM\n crash.crash\nWHERE\n $__timeFilter(ts)\nGROUP BY\n $__timeGroup(ts, '1d', 0),2\nORDER BY\n 1\n ", + "refId": "C", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + }, + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroup(ts, '1d', 0) as time,\n 'fingerprints' as metric,\n count(distinct(spec_id)) as fingerprints\nFROM\n crash.crash\nWHERE\n $__timeFilter(ts)\nGROUP BY\n $__timeGroup(ts, '1d', 0)\nORDER BY\n 1\n ", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Crash Events", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:269", + "decimals": null, + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:270", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 24 + }, + "id": 24, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "Counts the distinct occurrences of v2 crash signatures, and aggregates them by major versions.", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 25 + }, + "hiddenSeries": false, + "id": 6, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroup(ts, '1d', 0) as time,\n count(distinct(spec_id)),\n split_part(ceph_version, '-', 1) as metric\nFROM\n crash.crash\nWHERE\n $__timeFilter(ts)\nGROUP BY\n $__timeGroup(ts, '1d', 0),\n split_part(ceph_version, '-', 1)\nORDER BY\n 1, split_part(ceph_version, '-', 1)\n -- split_part(ceph_version, '-', 1), 1", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Crash Fingerprints by Version", + "tooltip": { + "shared": true, + "sort": 1, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:342", + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:343", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 34 + }, + "id": 23, + "options": { + "content": "", + "mode": "markdown" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 11, + "w": 24, + "x": 0, + "y": 35 + }, + "hiddenSeries": false, + "id": 7, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroup(ts, '1d', 0) as time,\n count(*),\n split_part(ceph_version, '-', 1) as metric\nFROM\n crash.crash\nWHERE\n $__timeFilter(ts)\nGROUP BY\n $__timeGroup(ts, '1d', 0),\n split_part(ceph_version, '-', 1)\nORDER BY\n 1, split_part(ceph_version, '-', 1); \n-- split_part(ceph_version, '-', 1), 1 ", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Crash Events by Version", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:407", + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:408", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": false, + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-30d", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Main", + "uid": "GiO_B8bMz", + "version": 22 +} \ No newline at end of file diff --git a/dashboard/private/crash/crash_spec_search.json b/dashboard/private/crash/crash_spec_search.json new file mode 100644 index 0000000..13016f2 --- /dev/null +++ b/dashboard/private/crash/crash_spec_search.json @@ -0,0 +1,720 @@ +{ + "__inputs": [ + { + "name": "DS_POSTGRESQL", + "label": "PostgreSQL", + "description": "", + "type": "datasource", + "pluginId": "postgres", + "pluginName": "PostgreSQL" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "datasource", + "id": "postgres", + "name": "PostgreSQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + } + ], + "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": 1646855480874, + "links": [ + { + "icon": "dashboard", + "tags": [], + "title": "Main", + "type": "link", + "url": "/d/GiO_B8bMz/main?orgId=1" + } + ], + "panels": [ + { + "datasource": null, + "description": "", + "gridPos": { + "h": 8, + "w": 14, + "x": 0, + "y": 0 + }, + "id": 5, + "options": { + "content": "
\nSearch guidelines:
\nSearch for substrings in the function names of the stack trace.
\nRemove trailing parenthesis, and the offset.
\nFor example, to find fingerprints with this function in their stack:
\n(BlueStore::_txc_add_transaction(BlueStore::TransContext*, ObjectStore::Transaction*)+0x1671) [0x55def4121481]
\nSearch for:
\nBlueStore::_txc_add_transaction(BlueStore::TransContext*, ObjectStore::Transaction*)
\n(or any substring of it)
\nAll of the substrings supplied must be found in the stack names for the fingerprint to match.
\nLeave a field empty to ignore it.
\nSearch is case sensitive.
", + "mode": "html" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "custom": { + "align": null, + "displayMode": "auto", + "filterable": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 20 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "clusters_count" + }, + "properties": [ + { + "id": "custom.width", + "value": 119 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "ts_first_occurrence" + }, + "properties": [ + { + "id": "custom.width", + "value": 139 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "sig_v2" + }, + "properties": [ + { + "id": "custom.width", + "value": 122 + }, + { + "id": "links", + "value": [ + { + "title": "Spec X-ray", + "url": "/d/jByk5HaMz/crash-spec-x-ray?var-sig_v2=${__value.text}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "majors_count" + }, + "properties": [ + { + "id": "custom.width", + "value": 111 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "minors_affected" + }, + "properties": [ + { + "id": "custom.width", + "value": 332 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "crashes_count" + }, + "properties": [ + { + "id": "unit", + "value": "locale" + }, + { + "id": "custom.width", + "value": 142 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "assert_func" + }, + "properties": [ + { + "id": "custom.width", + "value": 395 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "majors_affected" + }, + "properties": [ + { + "id": "custom.width", + "value": 119 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "minors_count" + }, + "properties": [ + { + "id": "custom.width", + "value": 105 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "ts_last_occurrence" + }, + "properties": [ + { + "id": "custom.width", + "value": 151 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "crashes_in_tf" + }, + "properties": [ + { + "id": "noValue", + "value": "0" + }, + { + "id": "unit", + "value": "locale" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "sig_v1_arr" + }, + "properties": [ + { + "id": "custom.width", + "value": 128 + } + ] + } + ] + }, + "gridPos": { + "h": 18, + "w": 24, + "x": 0, + "y": 8 + }, + "id": 2, + "options": { + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "clusters_count" + } + ] + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT --*\n crash.spec_mv.description as status,\n encode(crash.spec_mv.sig_v2, 'hex') as sig_v2,\n\tts_first_occurrence::date::text,\n\tts_last_occurrence::date::text,\n\tcrash_count as crashes_count, -- all time crashes count\n\tCC.cnt as crashes_in_tf,\n\tclusters_count,\n\tmajors_count,\n\tmajors_affected,\n\tminors_count,\n\tminors_affected,\n\tarray_remove(daemon_arr, NULL) daemons, -- removes NULL process names\n\tassert_func,\n\tassert_condition\n\t--, sig_v1_arr\n\t--, crash.spec_mv.ignore\nFROM crash.spec_mv\n INNER JOIN\n (SELECT COUNT(*) cnt, spec_id--, max(ts) as ts_last_occurrence\n --, array_agg(distinct(process_name)) daemons -- moved to crash.spec_mv\n FROM crash.crash\n WHERE $__timeFilter(crash.crash.ts) \n GROUP BY spec_id) AS CC\n ON crash.spec_mv.id = CC.spec_id\nWHERE\n -- unnest returns the result set as a table\n\t (0 < (select count(*) from unnest(crash.spec_mv.stack_names) nam where position('$substr_1' in nam) > 0 ))\n\tAND (0 < (select count(*) from unnest(crash.spec_mv.stack_names) nam where position('$substr_2' in nam) > 0 ))\n\tAND (0 < (select count(*) from unnest(crash.spec_mv.stack_names) nam where position('$substr_3' in nam) > 0 ))\n\tAND ARRAY_REMOVE(ARRAY[$majors_affected]::text[], '') <@ majors_affected\n\tAND ARRAY_REMOVE(ARRAY[$minors_affected]::text[], '') <@ minors_affected\n\tAND ((LENGTH('$assert_function') = 0) OR (position('$assert_function' in crash.spec_mv.assert_func) > 0))\n\tAND ((LENGTH('$assert_condition') = 0) OR (position('$assert_condition' in crash.spec_mv.assert_condition) > 0))\n\t--AND ((LENGTH('$sig_v1') = 0) OR (position('$sig_v1' in crash.spec_mv.sig_v1_arr) > 0))\n\tAND (0 < (select count(*) from unnest(crash.spec_mv.sig_v1_arr) sig_v1_array where position('$sig_v1' in sig_v1_array) > 0 ))\n AND ((LENGTH('$sig_v2') = 0) OR (position('$sig_v2' in encode(crash.spec_mv.sig_v2, 'hex')) > 0))\n AND ARRAY_REMOVE(ARRAY[$daemons]::text[], '') <@ daemon_arr\n AND crash.spec_mv.description in ($status_description)\n AND\n CASE\n WHEN $only_open::boolean\n THEN crash.spec_mv.ignore = false\n ELSE true\n END\n AND\n CASE\n WHEN $only_new_fingerprints::boolean\n THEN $__timeFilter(crash.spec_mv.ts_first_occurrence)\n ELSE true\n END\nORDER BY\n clusters_count DESC;\n\n\n/*\n SELECT\n crash.spec_mv.ts_first_occurrence::date::text,\n CC.ts_last_occurrence::date::text,\n encode(sig_v2, 'hex') \"fingerprint (sig_v2)\",\n CC.cnt as crashes_count,\n clusters_count,\n majors_count,\n minors_affected,\n assert_func,\n assert_condition\nFROM\n crash.spec_mv\n INNER JOIN\n (SELECT COUNT(*) cnt, spec_id, max(ts) as ts_last_occurrence\n FROM crash.crash\n --WHERE $__timeFilter(crash.crash.ts) \n GROUP BY spec_id) AS CC\n ON crash.spec_mv.id = CC.spec_id\nWHERE\n -- unnest returns the result set as a table\n\t (0 < (select count(*) from unnest(crash.spec_mv.stack_names) nam where position('$substr_1' in nam) > 0 ))\n\tAND (0 < (select count(*) from unnest(crash.spec_mv.stack_names) nam where position('$substr_2' in nam) > 0 ))\n\tAND (0 < (select count(*) from unnest(crash.spec_mv.stack_names) nam where position('$substr_3' in nam) > 0 ))\n\tAND ARRAY[$minors_affected]::text[] <@ minors_affected\n\tAND ((LENGTH('$assert_function') = 0) OR (position('$assert_function' in crash.spec_mv.assert_func) > 0))\n\tAND ((LENGTH('$assert_condition') = 0) OR (position('$assert_condition' in crash.spec_mv.assert_condition) > 0))\nORDER BY\n clusters_count DESC\n*/", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Found $total_results Crash Fingerprints", + "type": "table" + } + ], + "refresh": "", + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": true, + "text": "", + "value": "" + }, + "description": null, + "error": null, + "hide": 0, + "label": null, + "name": "substr_1", + "options": [ + { + "selected": true, + "text": "", + "value": "" + } + ], + "query": "", + "skipUrlSync": false, + "type": "textbox" + }, + { + "current": { + "selected": true, + "text": "", + "value": "" + }, + "description": null, + "error": null, + "hide": 0, + "label": null, + "name": "substr_2", + "options": [ + { + "selected": true, + "text": "", + "value": "" + } + ], + "query": "", + "skipUrlSync": false, + "type": "textbox" + }, + { + "current": { + "selected": true, + "text": "", + "value": "" + }, + "description": null, + "error": null, + "hide": 0, + "label": null, + "name": "substr_3", + "options": [ + { + "selected": true, + "text": "", + "value": "" + } + ], + "query": "", + "skipUrlSync": false, + "type": "textbox" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select ''\nunion\nselect distinct(split_part(ceph_version, '.', 1))\nfrom crash.crash\nwhere split_part(ceph_version, '.', 1) != 'l-v15'\norder by 1;", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "majors_affected", + "multi": true, + "name": "majors_affected", + "options": [], + "query": "select ''\nunion\nselect distinct(split_part(ceph_version, '.', 1))\nfrom crash.crash\nwhere split_part(ceph_version, '.', 1) != 'l-v15'\norder by 1;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select ''\nunion\nselect distinct(split_part(ceph_version, '-', 1))\nfrom crash.crash\norder by 1;", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "minors_affected", + "multi": true, + "name": "minors_affected", + "options": [], + "query": "select ''\nunion\nselect distinct(split_part(ceph_version, '-', 1))\nfrom crash.crash\norder by 1;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": true, + "text": "", + "value": "" + }, + "description": null, + "error": null, + "hide": 0, + "label": "assert_function", + "name": "assert_function", + "options": [ + { + "selected": true, + "text": "", + "value": "" + } + ], + "query": "", + "skipUrlSync": false, + "type": "textbox" + }, + { + "current": { + "selected": false, + "text": "", + "value": "" + }, + "description": null, + "error": null, + "hide": 0, + "label": "assert_condition", + "name": "assert_condition", + "options": [ + { + "selected": true, + "text": "", + "value": "" + } + ], + "query": "", + "skipUrlSync": false, + "type": "textbox" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "SELECT \n count(*)\n /*\n encode(crash.spec_mv.sig_v2, 'hex') as sig_v2,\n\tts_first_occurrence::date::text,\n\tts_last_occurrence::date::text,\n\tcrash_count as crashes_count, -- all time crashes count\n\tCC.cnt as crashes_in_tf,\n\tclusters_count,\n\tmajors_count,\n\tmajors_affected,\n\tminors_count,\n\tminors_affected,\n\tarray_remove(daemon_arr, NULL) daemons, -- removes NULL process names\n\tassert_func,\n\tassert_condition,\n\tsig_v1_arr,\n\tcrash.spec_mv.description\n */\nFROM crash.spec_mv\n INNER JOIN\n (SELECT COUNT(*) cnt, spec_id--, max(ts) as ts_last_occurrence\n --, array_agg(distinct(process_name)) daemons -- moved to crash.spec_mv\n FROM crash.crash\n WHERE $__timeFilter(crash.crash.ts) \n GROUP BY spec_id) AS CC\n ON crash.spec_mv.id = CC.spec_id\nWHERE\n -- unnest returns the result set as a table\n\t (0 < (select count(*) from unnest(crash.spec_mv.stack_names) nam where position('$substr_1' in nam) > 0 ))\n\tAND (0 < (select count(*) from unnest(crash.spec_mv.stack_names) nam where position('$substr_2' in nam) > 0 ))\n\tAND (0 < (select count(*) from unnest(crash.spec_mv.stack_names) nam where position('$substr_3' in nam) > 0 ))\n\tAND ARRAY_REMOVE(ARRAY[$majors_affected]::text[], '') <@ majors_affected\n\tAND ARRAY_REMOVE(ARRAY[$minors_affected]::text[], '') <@ minors_affected\n\tAND ((LENGTH('$assert_function') = 0) OR (position('$assert_function' in crash.spec_mv.assert_func) > 0))\n\tAND ((LENGTH('$assert_condition') = 0) OR (position('$assert_condition' in crash.spec_mv.assert_condition) > 0))\n\t--AND ((LENGTH('$sig_v1') = 0) OR (position('$sig_v1' in crash.spec_mv.sig_v1_arr) > 0))\n\tAND (0 < (select count(*) from unnest(crash.spec_mv.sig_v1_arr) sig_v1_array where position('$sig_v1' in sig_v1_array) > 0 ))\n AND ((LENGTH('$sig_v2') = 0) OR (position('$sig_v2' in encode(crash.spec_mv.sig_v2, 'hex')) > 0))\n AND ARRAY_REMOVE(ARRAY[$daemons]::text[], '') <@ daemon_arr\n AND crash.spec_mv.description in ($status_description)\n AND\n CASE\n WHEN $only_open::boolean\n THEN crash.spec_mv.ignore = false\n ELSE true\n END\n AND\n CASE\n WHEN $only_new_fingerprints::boolean\n THEN $__timeFilter(crash.spec_mv.ts_first_occurrence)\n ELSE true\n END;\n--ORDER BY\n --clusters_count DESC;", + "description": null, + "error": null, + "hide": 2, + "includeAll": false, + "label": "total_results", + "multi": false, + "name": "total_results", + "options": [], + "query": "SELECT \n count(*)\n /*\n encode(crash.spec_mv.sig_v2, 'hex') as sig_v2,\n\tts_first_occurrence::date::text,\n\tts_last_occurrence::date::text,\n\tcrash_count as crashes_count, -- all time crashes count\n\tCC.cnt as crashes_in_tf,\n\tclusters_count,\n\tmajors_count,\n\tmajors_affected,\n\tminors_count,\n\tminors_affected,\n\tarray_remove(daemon_arr, NULL) daemons, -- removes NULL process names\n\tassert_func,\n\tassert_condition,\n\tsig_v1_arr,\n\tcrash.spec_mv.description\n */\nFROM crash.spec_mv\n INNER JOIN\n (SELECT COUNT(*) cnt, spec_id--, max(ts) as ts_last_occurrence\n --, array_agg(distinct(process_name)) daemons -- moved to crash.spec_mv\n FROM crash.crash\n WHERE $__timeFilter(crash.crash.ts) \n GROUP BY spec_id) AS CC\n ON crash.spec_mv.id = CC.spec_id\nWHERE\n -- unnest returns the result set as a table\n\t (0 < (select count(*) from unnest(crash.spec_mv.stack_names) nam where position('$substr_1' in nam) > 0 ))\n\tAND (0 < (select count(*) from unnest(crash.spec_mv.stack_names) nam where position('$substr_2' in nam) > 0 ))\n\tAND (0 < (select count(*) from unnest(crash.spec_mv.stack_names) nam where position('$substr_3' in nam) > 0 ))\n\tAND ARRAY_REMOVE(ARRAY[$majors_affected]::text[], '') <@ majors_affected\n\tAND ARRAY_REMOVE(ARRAY[$minors_affected]::text[], '') <@ minors_affected\n\tAND ((LENGTH('$assert_function') = 0) OR (position('$assert_function' in crash.spec_mv.assert_func) > 0))\n\tAND ((LENGTH('$assert_condition') = 0) OR (position('$assert_condition' in crash.spec_mv.assert_condition) > 0))\n\t--AND ((LENGTH('$sig_v1') = 0) OR (position('$sig_v1' in crash.spec_mv.sig_v1_arr) > 0))\n\tAND (0 < (select count(*) from unnest(crash.spec_mv.sig_v1_arr) sig_v1_array where position('$sig_v1' in sig_v1_array) > 0 ))\n AND ((LENGTH('$sig_v2') = 0) OR (position('$sig_v2' in encode(crash.spec_mv.sig_v2, 'hex')) > 0))\n AND ARRAY_REMOVE(ARRAY[$daemons]::text[], '') <@ daemon_arr\n AND crash.spec_mv.description in ($status_description)\n AND\n CASE\n WHEN $only_open::boolean\n THEN crash.spec_mv.ignore = false\n ELSE true\n END\n AND\n CASE\n WHEN $only_new_fingerprints::boolean\n THEN $__timeFilter(crash.spec_mv.ts_first_occurrence)\n ELSE true\n END;\n--ORDER BY\n --clusters_count DESC;", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": true, + "text": "", + "value": "" + }, + "description": null, + "error": null, + "hide": 0, + "label": "sig_v1", + "name": "sig_v1", + "options": [ + { + "selected": true, + "text": "", + "value": "" + } + ], + "query": "", + "skipUrlSync": false, + "type": "textbox" + }, + { + "current": { + "selected": true, + "text": "", + "value": "" + }, + "description": null, + "error": null, + "hide": 0, + "label": "sig_v2", + "name": "sig_v2", + "options": [ + { + "selected": true, + "text": "", + "value": "" + } + ], + "query": "", + "skipUrlSync": false, + "type": "textbox" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select ''\nunion\nSELECT\n distinct(process_name) --daemons\nFROM crash.crash\nWHERE process_name is not NULL;\n\n\n/*\n-- selects all daemons except for 'NULL'\nSELECT\n unnest(array_remove(array_agg(distinct(process_name)), NULL)) --daemons\nFROM crash.crash;\n*/", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "daemons", + "multi": true, + "name": "daemons", + "options": [], + "query": "select ''\nunion\nSELECT\n distinct(process_name) --daemons\nFROM crash.crash\nWHERE process_name is not NULL;\n\n\n/*\n-- selects all daemons except for 'NULL'\nSELECT\n unnest(array_remove(array_agg(distinct(process_name)), NULL)) --daemons\nFROM crash.crash;\n*/", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "selected": false, + "text": "false", + "value": "false" + }, + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "only_new_fingerprints", + "multi": false, + "name": "only_new_fingerprints", + "options": [ + { + "selected": false, + "text": "true", + "value": "true" + }, + { + "selected": true, + "text": "false", + "value": "false" + } + ], + "query": "true, false", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select description\nfrom crash.spec_status;", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "status", + "multi": true, + "name": "status_description", + "options": [], + "query": "select description\nfrom crash.spec_status;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "selected": false, + "text": "false", + "value": "false" + }, + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "only_open", + "multi": false, + "name": "only_open", + "options": [ + { + "selected": false, + "text": "true", + "value": "true" + }, + { + "selected": true, + "text": "false", + "value": "false" + } + ], + "query": "true, false", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + } + ] + }, + "time": { + "from": "now-5y", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Spec Search", + "uid": "Nvj6XTaMk", + "version": 109 +} \ No newline at end of file diff --git a/dashboard/private/device/device_all_reports.json b/dashboard/private/device/device_all_reports.json new file mode 100644 index 0000000..b4f0d9e --- /dev/null +++ b/dashboard/private/device/device_all_reports.json @@ -0,0 +1,269 @@ +{ + "__inputs": [ + { + "name": "DS_POSTGRESQL", + "label": "PostgreSQL", + "description": "", + "type": "datasource", + "pluginId": "postgres", + "pluginName": "PostgreSQL" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "datasource", + "id": "postgres", + "name": "PostgreSQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + } + ], + "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": 1646869868920, + "links": [ + { + "icon": "dashboard", + "tags": [], + "title": "Back to by vendor and model", + "tooltip": "", + "type": "link", + "url": "/d/H719wbmGk/by-vendor-and-model?orgId=1&var-class=All&var-vendor=$vendor&var-model=$model" + } + ], + "panels": [ + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": { + "align": "left", + "displayMode": "auto", + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "report_id" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "Show report", + "url": "/d/L15CkaiGk/report?orgId=1&var-id=${__data.fields[report_id]}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "anon_report" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "Show report", + "url": "/d/0td7269Gk/raw-report-open?orgId=1&var-id=${__data.fields[anon_report]}" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 19, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "showHeader": true + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select \n tsd.device_id,\n tsd.report_id,\n od.report_id anon_report,\n tsd.ts::TEXT,\n tsd.error\nfrom device.ts_device tsd\nleft join open_device.anon_report od\non tsd.report_id = od.report_id \nwhere tsd.device_id in ('$device_id')\norder by tsd.ts desc;\n\n\n/*\nselect \n tsd.device_id,\n tsd.report_id,\n tsd.ts::TEXT,\n tsd.error\nfrom device.ts_device tsd\n open_device.report\nwhere tsd.device_id in ('$device_id')\norder by tsd.ts desc;\n*/", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "All Reports", + "type": "table" + } + ], + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "644", + "value": "644" + }, + "description": null, + "error": null, + "hide": 0, + "label": "Device ID", + "name": "device_id", + "options": [ + { + "selected": true, + "text": "17896", + "value": "17896" + } + ], + "query": "17896", + "skipUrlSync": false, + "type": "textbox" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select lower(s.vendor)\nfrom device.device d\ninner join device.spec s\non d.spec_id = s.id\nwhere d.id = $device_id;", + "description": null, + "error": null, + "hide": 2, + "includeAll": false, + "label": "vendor", + "multi": false, + "name": "vendor", + "options": [], + "query": "select lower(s.vendor)\nfrom device.device d\ninner join device.spec s\non d.spec_id = s.id\nwhere d.id = $device_id;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select s.model\nfrom device.device d\ninner join device.spec s\non d.spec_id = s.id\nwhere d.id = $device_id;", + "description": null, + "error": null, + "hide": 2, + "includeAll": false, + "label": "model", + "multi": false, + "name": "model", + "options": [], + "query": "select s.model\nfrom device.device d\ninner join device.spec s\non d.spec_id = s.id\nwhere d.id = $device_id;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "All Reports", + "uid": "fuE9R-iMz", + "version": 8 +} \ No newline at end of file diff --git a/dashboard/private/device/device_by_vendor_and_model.json b/dashboard/private/device/device_by_vendor_and_model.json new file mode 100644 index 0000000..25de1c0 --- /dev/null +++ b/dashboard/private/device/device_by_vendor_and_model.json @@ -0,0 +1,397 @@ +{ + "__inputs": [ + { + "name": "DS_POSTGRESQL", + "label": "PostgreSQL", + "description": "", + "type": "datasource", + "pluginId": "postgres", + "pluginName": "PostgreSQL" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "datasource", + "id": "postgres", + "name": "PostgreSQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + } + ], + "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": 1646869917071, + "links": [ + { + "asDropdown": true, + "icon": "dashboard", + "keepTime": false, + "tags": [ + "test" + ], + "title": "Back to models per vendor", + "tooltip": "", + "type": "link", + "url": "/d/x1_ISxiMz/models-per-vendor?orgId=1&var-vendor=All&var-model=All" + } + ], + "panels": [ + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": { + "align": "left", + "displayMode": "auto", + "filterable": false + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "models" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "targetBlank": true, + "title": "See models", + "url": "/d/x1_ISxiMz/models-per-vendor?orgId=1&var-vendor=${__data.fields[vendor]}" + } + ] + }, + { + "id": "displayName", + "value": "Models" + }, + { + "id": "custom.align", + "value": "center" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "devices" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "See devices", + "url": "/d/Jv-NqTgMz/devices-by-vendor-and-model?var-vendor=${__cell_0}" + } + ] + }, + { + "id": "displayName", + "value": "Devices" + }, + { + "id": "custom.align", + "value": "center" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "vendor" + }, + "properties": [ + { + "id": "displayName", + "value": "Vendor" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Device ID" + }, + "properties": [ + { + "id": "custom.width", + "value": 82 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Vendor_Model_UUID" + }, + "properties": [ + { + "id": "custom.width", + "value": 556 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Vendor" + }, + "properties": [ + { + "id": "custom.width", + "value": 110 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Vendor_Model_UUID" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "See reports", + "url": "/d/fuE9R-iMz/all-reports?orgId=1&var-device_id=${__data.fields[Device ID]}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Model" + }, + "properties": [ + { + "id": "custom.width", + "value": 295 + }, + { + "id": "links", + "value": [ + { + "title": "See model details", + "url": "/d/x1_ISxiMz/models-per-vendor?orgId=1&var-class=All&var-vendor=${__data.fields[Vendor]}&var-model=${__data.fields[Model]}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Host ID" + }, + "properties": [ + { + "id": "custom.width", + "value": 738 + } + ] + } + ] + }, + "gridPos": { + "h": 38, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 4, + "options": { + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Vendor" + } + ] + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select\n device.id \"Device ID\",\n device.vmu \"Vendor_Model_UUID\",\n device.spec.vendor \"Vendor\",\n device.spec.model \"Model\",\n device.host_id \"Host ID\"\nfrom device.spec\ninner join device.device\non device.device.spec_id = device.spec.id\nwhere\n device.spec.vendor in ($vendor)\n and\n device.spec.model in ($model);", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Devices by Vendor and Model - All-time", + "transformations": [], + "type": "table" + } + ], + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select distinct(class) from device.spec\nwhere device.spec.class != 'unknown';", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "class", + "multi": true, + "name": "class", + "options": [], + "query": "select distinct(class) from device.spec\nwhere device.spec.class != 'unknown';", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select distinct(lower(vendor)) from device.spec\nwhere device.spec.class in ($class);", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "vendor", + "multi": true, + "name": "vendor", + "options": [], + "query": "select distinct(lower(vendor)) from device.spec\nwhere device.spec.class in ($class);", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "/*\nselect distinct(lower(model))\nfrom device.spec\nwhere vendor = $vendor\n*/\n\nselect\n distinct(model)\nfrom\n\tdevice.spec\nwhere\n lower(device.spec.vendor) in ($vendor);\n/*\nwhere\n\tattr='ceph_version_norm'\nand\n SPLIT_PART(value, '.', '1') in ($major);\n*/", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "model", + "multi": true, + "name": "model", + "options": [], + "query": "/*\nselect distinct(lower(model))\nfrom device.spec\nwhere vendor = $vendor\n*/\n\nselect\n distinct(model)\nfrom\n\tdevice.spec\nwhere\n lower(device.spec.vendor) in ($vendor);\n/*\nwhere\n\tattr='ceph_version_norm'\nand\n SPLIT_PART(value, '.', '1') in ($major);\n*/", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "by Vendor and Model", + "uid": "H719wbmGk", + "version": 10 +} \ No newline at end of file diff --git a/dashboard/private/device/device_distinct_model_count.json b/dashboard/private/device/device_distinct_model_count.json new file mode 100644 index 0000000..11a21f3 --- /dev/null +++ b/dashboard/private/device/device_distinct_model_count.json @@ -0,0 +1,286 @@ +{ + "__inputs": [ + { + "name": "DS_POSTGRESQL", + "label": "PostgreSQL", + "description": "", + "type": "datasource", + "pluginId": "postgres", + "pluginName": "PostgreSQL" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "datasource", + "id": "postgres", + "name": "PostgreSQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + } + ], + "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": 1646874700390, + "links": [ + { + "asDropdown": true, + "icon": "dashboard", + "keepTime": false, + "tags": [ + "test" + ], + "title": "Back to main", + "tooltip": "", + "type": "link", + "url": "d/OVxgLWiGz/devices?orgId=1" + } + ], + "panels": [ + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": { + "align": null, + "displayMode": "auto" + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "models" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "See models", + "url": "/d/x1_ISxiMz/models-per-vendor?orgId=1&var-vendor=${__data.fields[vendor]}&var-model=All" + } + ] + }, + { + "id": "displayName", + "value": "Models" + }, + { + "id": "custom.align", + "value": "center" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "devices" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "See devices", + "url": "/d/H719wbmGk/devices-by-vendor-and-model?var-vendor=${__data.fields[vendor]}" + } + ] + }, + { + "id": "displayName", + "value": "Devices" + }, + { + "id": "custom.align", + "value": "center" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "vendor" + }, + "properties": [ + { + "id": "displayName", + "value": "Vendor" + } + ] + } + ] + }, + "gridPos": { + "h": 35, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 4, + "options": { + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Models" + } + ] + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select lower(a.vendor) vendor, count(a.model) models, sum(a.devices) devices\nfrom \n\t(select device.spec.vendor, device.spec.model, device.spec.type, device.spec.interface, device.spec.class, count(device.id) devices\n\tfrom device.spec\n\tinner join device.device\n\ton device.device.spec_id = device.spec.id\n\tgroup by device.spec.id\n\torder by devices desc) a\n\twhere lower(vendor) in ($vendor)\n\t --and lower(a.model) in ($model)\ngroup by lower(a.vendor)\n--order by lower(a.vendor);\norder by models desc;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Distinct Models Count per Vendor - All-time", + "transformations": [], + "type": "table" + } + ], + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select distinct(class) from device.spec\nwhere device.spec.class != 'unknown';", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "class", + "multi": true, + "name": "class", + "options": [], + "query": "select distinct(class) from device.spec\nwhere device.spec.class != 'unknown';", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select distinct(lower(vendor)) from device.spec\nwhere device.spec.class in ($class);", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "vendor", + "multi": true, + "name": "vendor", + "options": [], + "query": "select distinct(lower(vendor)) from device.spec\nwhere device.spec.class in ($class);", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Distinct Model Count", + "uid": "GQDv4xmMz", + "version": 4 +} \ No newline at end of file diff --git a/dashboard/private/device/device_failure_prediction.json b/dashboard/private/device/device_failure_prediction.json new file mode 100644 index 0000000..9810f40 --- /dev/null +++ b/dashboard/private/device/device_failure_prediction.json @@ -0,0 +1,748 @@ +{ + "__inputs": [], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + } + ], + "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, + "links": [], + "panels": [ + { + "datasource": null, + "description": "Devices that have (at any point in time) 6-12 valid telemetry reports (i.e. which do not contain smartctl errors).", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 8, + "x": 0, + "y": 0 + }, + "id": 4, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": true + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select count(distinct(device_id))\nfrom device.prediction_result;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Devices eligible for prediction", + "type": "stat" + }, + { + "datasource": null, + "description": "Distinct devices count of all devices which the model supported at some point", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 9, + "x": 8, + "y": 0 + }, + "id": 11, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": true + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select count(distinct(device_id))\nfrom device.prediction_result\nwhere result != 'Model does not support this vendor' and result != 'Model failed';", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Devices which are supported by the model", + "type": "stat" + }, + { + "datasource": null, + "description": "Distinct devices count of all devices which had 'Warning' or 'Bad' as a prediction result at some point", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 7, + "x": 17, + "y": 0 + }, + "id": 9, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": true + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select count(distinct(device_id))\nfrom device.prediction_result\nwhere\n result = 'Warning'\n or result = 'Bad';", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Devices with 'Warning' or 'Bad' prediction", + "type": "stat" + }, + { + "datasource": null, + "description": "", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 5 + }, + "id": 15, + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "description": "Model returned 'Warning' or 'Bad' at some point for these devices.", + "fieldConfig": { + "defaults": { + "custom": { + "align": "left", + "displayMode": "auto", + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "capacity" + }, + "properties": [ + { + "id": "custom.width", + "value": 216 + }, + { + "id": "unit", + "value": "decbytes" + }, + { + "id": "decimals", + "value": 2 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "model" + }, + "properties": [ + { + "id": "custom.width", + "value": 321 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "id" + }, + "properties": [ + { + "id": "custom.width", + "value": 96 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "vendor" + }, + "properties": [ + { + "id": "custom.width", + "value": 146 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "type" + }, + "properties": [ + { + "id": "custom.width", + "value": 112 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "interface" + }, + "properties": [ + { + "id": "custom.width", + "value": 110 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "device_id" + }, + "properties": [ + { + "id": "custom.width", + "value": 158 + }, + { + "id": "links", + "value": [ + { + "title": "See prediction results history", + "url": "/d/FVRTW42Gz/x-ray?orgId=1&var-device_id=${__data.fields[device_id]}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "last_report" + }, + "properties": [ + { + "id": "custom.width", + "value": 214 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "result" + }, + "properties": [ + { + "id": "custom.width", + "value": 173 + } + ] + } + ] + }, + "gridPos": { + "h": 11, + "w": 24, + "x": 0, + "y": 6 + }, + "id": 12, + "options": { + "showHeader": true, + "sortBy": [ + { + "desc": false, + "displayName": "last_report" + } + ] + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "-- Get all devices with alerting prediction result ('Warning' or 'Bad')\n-- with their full spec details \nselect\n\tdistinct on (device_id) device_id, ts::TEXT last_report, result,\n\tdevice.spec.vendor,\n\tdevice.spec.model,\n\tdevice.spec.type,\n\tdevice.spec.interface,\n\tdevice.spec.capacity--,\n\t--device.device.host_id -- remove this in a public dashboard\nfrom device.prediction_result\n\tinner join device.device on device.prediction_result.device_id = device.device.id\n\tinner join device.spec on device.device.spec_id = device.spec.id\nwhere device.prediction_result.device_id IN \n\t(\n\tselect distinct(device_id)--, max(ts) \n\tfrom device.prediction_result\n\twhere result = 'Warning'\n\tor result = 'Bad'\n\t) \norder by device_id, ts desc;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Devices with alerts", + "type": "table" + }, + { + "datasource": null, + "description": "", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 17 + }, + "id": 14, + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": { + "align": "left", + "displayMode": "auto", + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "capacity" + }, + "properties": [ + { + "id": "custom.width", + "value": 183 + }, + { + "id": "unit", + "value": "decbytes" + }, + { + "id": "decimals", + "value": 2 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "model" + }, + "properties": [ + { + "id": "custom.width", + "value": 256 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "id" + }, + "properties": [ + { + "id": "custom.width", + "value": 96 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "vendor" + }, + "properties": [ + { + "id": "custom.width", + "value": 146 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "type" + }, + "properties": [ + { + "id": "custom.width", + "value": 112 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "interface" + }, + "properties": [ + { + "id": "custom.width", + "value": 120 + } + ] + } + ] + }, + "gridPos": { + "h": 12, + "w": 24, + "x": 0, + "y": 18 + }, + "id": 2, + "options": { + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select\n\tdevice.device.id,\n\tdevice.spec.vendor,\n\tdevice.spec.model,\n\tdevice.spec.type,\n\tdevice.spec.interface,\n\tdevice.spec.capacity,\n\tdevice.prediction_result.result \"prediction\"\n\t--substring(device.prediction_result.result, length('PredictionResult.')) \"prediction\"\nfrom device.prediction_result\ninner join device.device on device.prediction_result.device_id = device.device.id\ninner join device.spec on device.device.spec_id = device.spec.id\nlimit 500;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Device Failure Prediction Result", + "type": "table" + } + ], + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-6M", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Failure Prediction", + "uid": "-ZQel1IMk", + "version": 14 +} \ No newline at end of file diff --git a/dashboard/private/device/device_main.json b/dashboard/private/device/device_main.json new file mode 100644 index 0000000..2f2074f --- /dev/null +++ b/dashboard/private/device/device_main.json @@ -0,0 +1,2167 @@ +{ + "__inputs": [ + { + "name": "DS_POSTGRESQL", + "label": "PostgreSQL", + "description": "", + "type": "datasource", + "pluginId": "postgres", + "pluginName": "PostgreSQL" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph (old)", + "version": "" + }, + { + "type": "datasource", + "id": "postgres", + "name": "PostgreSQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + } + ], + "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": 1646874823562, + "links": [ + { + "$$hashKey": "object:117", + "icon": "dashboard", + "tags": [], + "title": "Ceph Telemetry", + "type": "link", + "url": "/d/-GcbjrXZz/telemetry?orgId=1" + } + ], + "panels": [ + { + "cacheTimeout": null, + "datasource": null, + "description": "All active devices (reporting both valid and invalid telemetry)", + "fieldConfig": { + "defaults": { + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "purple", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "total" + }, + "properties": [ + { + "id": "unit", + "value": "locale" + } + ] + } + ] + }, + "gridPos": { + "h": 3, + "w": 8, + "x": 0, + "y": 0 + }, + "id": 28, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "mean" + ] + }, + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "-- TODO: check if it's still correct with the 'tomorrow' box\n SELECT\n COUNT(*) total\n FROM\n device.weekly_reports_sliding w\n --inner join device.ts_device on w.report_id = device.ts_device.report_id\n\t\tINNER JOIN device.ts_device ON w.report_id = device.ts_device.REPORT_ID\n\t\tINNER JOIN device.device ON device.ts_device.DEVICE_ID = device.device.id\n\t\tINNER JOIN device.spec ON device.device.SPEC_ID = device.spec.id\n WHERE\n daily_window = (SELECT MAX(daily_window) FROM device.weekly_reports_sliding)\n and device.spec.class in ($class)\n and lower(device.spec.vendor) in ($vendor)\n and device.spec.model in ($model);\n\n/*\n SELECT\n COUNT(*) total\n FROM\n device.weekly_reports_sliding w\n WHERE\n daily_window = (SELECT MAX(daily_window) FROM device.weekly_reports_sliding);\n*/ ", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Active Devices", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": null, + "description": "Active devices reporting valid telemetry", + "fieldConfig": { + "defaults": { + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "total" + }, + "properties": [ + { + "id": "unit", + "value": "locale" + } + ] + } + ] + }, + "gridPos": { + "h": 3, + "w": 8, + "x": 8, + "y": 0 + }, + "id": 21, + "interval": "", + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "mean" + ] + }, + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": " SELECT\n COUNT(*) total\n FROM\n device.weekly_reports_sliding w\n --inner join device.ts_device on w.report_id = device.ts_device.report_id\n\t\tINNER JOIN device.ts_device ON w.report_id = device.ts_device.REPORT_ID\n\t\tINNER JOIN device.device ON device.ts_device.DEVICE_ID = device.device.id\n\t\tINNER JOIN device.spec ON device.device.SPEC_ID = device.spec.id\n WHERE\n daily_window = (SELECT MAX(daily_window) FROM device.weekly_reports_sliding)\n and\n device.ts_device.error is NULL -- meaning there's data in the report\n and device.spec.class in ($class)\n and lower(device.spec.vendor) in ($vendor)\n and device.spec.model in ($model);\n/*\n-- TODO: check if it's still correct with the 'tomorrow' box\n SELECT\n COUNT(*) total\n FROM\n device.weekly_reports_sliding w\n inner join\n device.ts_device\n on w.report_id = device.ts_device.report_id\n WHERE\n daily_window = (SELECT MAX(daily_window) FROM device.weekly_reports_sliding)\n and\n device.ts_device.error is NULL; -- meaning there's data in the report\n*/", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "With Valid Telemetry", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": null, + "description": "Total capacity of all active devices", + "fieldConfig": { + "defaults": { + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "yellow", + "value": null + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 8, + "x": 16, + "y": 0 + }, + "id": 6, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "fieldOptions": { + "calcs": [ + "mean" + ] + }, + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": " SELECT\n \t\tsum(capacity)\n FROM\n device.weekly_reports_sliding w\n --inner join device.ts_device on w.report_id = device.ts_device.report_id\n\t\tINNER JOIN device.ts_device ON w.report_id = device.ts_device.REPORT_ID\n\t\tINNER JOIN device.device ON device.ts_device.DEVICE_ID = device.device.id\n\t\tINNER JOIN device.spec ON device.device.SPEC_ID = device.spec.id\n WHERE\n daily_window = (SELECT MAX(daily_window) FROM device.weekly_reports_sliding)\n and device.spec.class in ($class)\n and lower(device.spec.vendor) in ($vendor)\n and device.spec.model in ($model);\n\n \n/*\n SELECT\n COUNT(*) total\n FROM\n device.weekly_reports_sliding w\n WHERE\n daily_window = (SELECT MAX(daily_window) FROM device.weekly_reports_sliding);\n*/ ", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Total Capacity", + "type": "stat" + }, + { + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "count" + }, + "properties": [ + { + "id": "unit", + "value": "locale" + } + ] + } + ] + }, + "gridPos": { + "h": 3, + "w": 8, + "x": 0, + "y": 3 + }, + "id": 31, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select count(distinct(host_id))\nfrom device.device d\ninner join device.spec s\non d.spec_id = s.id\nwhere \ns.class in ($class)\nand s.vendor in ($vendor)\n/*\nselect count(distinct(lower(model)))\nfrom device.spec\nwhere device.spec.class in ($class);\n*/", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Hosts - All-time", + "type": "stat" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 8, + "x": 8, + "y": 3 + }, + "id": 26, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select count(distinct(lower(vendor)))\nfrom device.spec\nwhere \ndevice.spec.class in ($class);\n--device.spec.class = 'normal';", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Vendors - All-time", + "type": "stat" + }, + { + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "count" + }, + "properties": [ + { + "id": "unit", + "value": "locale" + } + ] + } + ] + }, + "gridPos": { + "h": 3, + "w": 8, + "x": 16, + "y": 3 + }, + "id": 27, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select count(distinct(lower(model)))\nfrom device.spec\nwhere device.spec.class in ($class)\nand device.spec.vendor in ($vendor);", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Models - All-time", + "type": "stat" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 3, + "gridPos": { + "h": 11, + "w": 24, + "x": 0, + "y": 6 + }, + "hiddenSeries": false, + "id": 17, + "interval": "", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "kingston" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n\t--w.daily_window as time,\n $__timeGroup(w.daily_window, '1d', 0),\n\t--count(*),\n\tlower(device.spec.vendor) as metric,\n\tcount(*)\nFROM\n\tdevice.weekly_reports_sliding w\n\tINNER JOIN device.ts_device ON w.report_id = device.ts_device.REPORT_ID\n\tINNER JOIN device.device ON device.ts_device.DEVICE_ID = device.device.id\n\tINNER JOIN device.spec ON device.device.SPEC_ID = device.spec.id\n where $__timeFilter(daily_window)\n --and device.spec.class = 'normal'\n and device.spec.class in ($class)\n and lower(device.spec.vendor) in ($vendor)\n and device.spec.model in ($model)\n --and device.spec.class != 'unknown'\nGROUP BY\n\tw.daily_window, lower(device.spec.vendor)\n--ORDER BY w.daily_window, lower(device.spec.vendor);\nORDER BY 2, w.daily_window;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Devices by Vendors", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 11, + "w": 24, + "x": 0, + "y": 17 + }, + "hiddenSeries": false, + "id": 4, + "interval": "", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "hide": false, + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select\n daily_window as time, \n count(*) as \"Total\"\nfrom\n device.weekly_reports_sliding w\ninner join\n device.ts_device d on w.report_id = d.report_id\ngroup by\n daily_window\norder by\n daily_window;\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + }, + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select\n daily_window as time, \n count(*) as \"Reporting Invalid Telemetry\"\nfrom\n device.weekly_reports_sliding w\ninner join\n device.ts_device d on w.report_id = d.report_id\nwhere d.error is not NULL -- meaning there's an error and the device is not reporting correctly\ngroup by\n daily_window\norder by\n daily_window;\n", + "refId": "B", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + }, + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select\n daily_window as time, \n count(*) as \"Reporting Valid Telemetry\"\nfrom\n device.weekly_reports_sliding w\ninner join\n device.ts_device d on w.report_id = d.report_id\nwhere d.error is NULL\ngroup by\n daily_window\norder by\n daily_window;\n", + "refId": "C", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Active Devices", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 11, + "w": 12, + "x": 0, + "y": 28 + }, + "hiddenSeries": false, + "id": 32, + "interval": "", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroup(w.daily_window, '1d', 0),\n\tcount(distinct(device.device.host_id)) as \"Distinct Hosts\"\nFROM\n\tdevice.weekly_reports_sliding w\n\tINNER JOIN device.ts_device ON w.report_id = device.ts_device.REPORT_ID\n\tINNER JOIN device.device ON device.ts_device.DEVICE_ID = device.device.id\n\tINNER JOIN device.spec ON device.device.SPEC_ID = device.spec.id\nwhere $__timeFilter(daily_window)\n and device.spec.class in ($class)\n and device.spec.vendor in ($vendor)\n and device.spec.model in ($model)\n --and device.spec.type is not NULL\nGROUP BY\n\tw.daily_window\nORDER BY w.daily_window;\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Distinct Hosts - $vendor", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 11, + "w": 12, + "x": 12, + "y": 28 + }, + "hiddenSeries": false, + "id": 9, + "interval": "", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroup(w.daily_window, '1d', 0),\n\tcount(distinct(device.spec.model)) as \"Distinct Models\"\nFROM\n\tdevice.weekly_reports_sliding w\n\tINNER JOIN device.ts_device ON w.report_id = device.ts_device.REPORT_ID\n\tINNER JOIN device.device ON device.ts_device.DEVICE_ID = device.device.id\n\tINNER JOIN device.spec ON device.device.SPEC_ID = device.spec.id\n where $__timeFilter(daily_window)\n and lower(device.spec.vendor) in ($vendor)\n and device.spec.model in ($model)\n --and device.spec.type is not NULL\nGROUP BY\n\tw.daily_window\nORDER BY w.daily_window;\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Distinct Models - $vendor", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 3, + "gridPos": { + "h": 12, + "w": 24, + "x": 0, + "y": 39 + }, + "hiddenSeries": false, + "id": 7, + "interval": "", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n\t--w.daily_window as time,\n $__timeGroup(w.daily_window, '1d', 0),\n\tcount(*),\n\tdevice.spec.type::TEXT as metric\nFROM\n\tdevice.weekly_reports_sliding w\n\tINNER JOIN device.ts_device ON w.report_id = device.ts_device.REPORT_ID\n\tINNER JOIN device.device ON device.ts_device.DEVICE_ID = device.device.id\n\tINNER JOIN device.spec ON device.device.SPEC_ID = device.spec.id\nwhere $__timeFilter(daily_window)\n and device.spec.type is not NULL\n and lower(device.spec.vendor) in ($vendor)\nGROUP BY\n\tw.daily_window, device.spec.type\nORDER BY w.daily_window;\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Devices by Types - $vendor", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "nvme": "super-light-blue", + "scsi": "super-light-orange" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 2, + "gridPos": { + "h": 11, + "w": 12, + "x": 0, + "y": 51 + }, + "hiddenSeries": false, + "id": 12, + "interval": "", + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n\t--w.daily_window as time,\n $__timeGroup(w.daily_window, '1d', 0),\n\tdevice.spec.interface::TEXT as metric,\n\tcount(*)\nFROM\n\tdevice.weekly_reports_sliding w\n\tINNER JOIN device.ts_device ON w.report_id = device.ts_device.REPORT_ID\n\tINNER JOIN device.device ON device.ts_device.DEVICE_ID = device.device.id\n\tINNER JOIN device.spec ON device.device.SPEC_ID = device.spec.id\n where $__timeFilter(daily_window)\n and\n (device.spec.type::text = 'ssd'\n or \n device.spec.type::text = 'nvme')\n and lower(device.spec.vendor) in ($vendor)\n -- and device.spec.model in ($model)\nGROUP BY\n\tw.daily_window, device.spec.interface\nORDER BY 2, w.daily_window;\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "SSD Devices by Interface - $vendor", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 2, + "gridPos": { + "h": 11, + "w": 12, + "x": 12, + "y": 51 + }, + "hiddenSeries": false, + "id": 13, + "interval": "", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n\t--w.daily_window as time,\n $__timeGroup(w.daily_window, '1d', 0),\n\tcount(*),\n\tdevice.spec.interface::TEXT as metric\nFROM\n\tdevice.weekly_reports_sliding w\n\tINNER JOIN device.ts_device ON w.report_id = device.ts_device.REPORT_ID\n\tINNER JOIN device.device ON device.ts_device.DEVICE_ID = device.device.id\n\tINNER JOIN device.spec ON device.device.SPEC_ID = device.spec.id\n where $__timeFilter(daily_window)\n and device.spec.type::text = 'hdd'\n and lower(device.spec.vendor) in ($vendor)\nGROUP BY\n\tw.daily_window, device.spec.interface\nORDER BY w.daily_window;\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "HDD Devices by Interface - $vendor", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 11, + "w": 12, + "x": 0, + "y": 62 + }, + "hiddenSeries": false, + "id": 19, + "interval": "", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select\n $__timeGroup(w.daily_window, '1d', 0),\n\tsum(capacity) as \"Total Capacity\" \nfrom\n \tdevice.weekly_reports_sliding w\n\tinner join device.ts_device on w.report_id = device.ts_device.report_id\n\tINNER JOIN device.device ON device.ts_device.DEVICE_ID = device.device.id\n\tINNER JOIN device.spec ON device.device.SPEC_ID = device.spec.id\nwhere $__timeFilter(w.daily_window)\n --and device.spec.type is not NULL\n and device.spec.class in ($class)\n and lower(device.spec.vendor) in ($vendor)\n and device.spec.model in ($model)\n group by\n daily_window\norder by\n daily_window; \n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Total Capacity - $vendor", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 11, + "w": 12, + "x": 12, + "y": 62 + }, + "hiddenSeries": false, + "id": 16, + "interval": "", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n -- FIX THIS\n\t--w.daily_window as time,\n $__timeGroup(w.daily_window, '1d', 0),\n\tlower(device.spec.vendor) as metric,\n\tcount(*)\nFROM\n\tdevice.weekly_reports_sliding w\n\tINNER JOIN device.ts_device ON w.report_id = device.ts_device.REPORT_ID\n\tINNER JOIN device.device ON device.ts_device.DEVICE_ID = device.device.id\n\tINNER JOIN device.spec ON device.device.SPEC_ID = device.spec.id\n where $__timeFilter(daily_window)\n and device.spec.class = 'hw_raid'\nGROUP BY\n\tw.daily_window, lower(device.spec.vendor)\nORDER BY 2, w.daily_window;\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Devices by HW RAID", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 1, + "gridPos": { + "h": 11, + "w": 12, + "x": 0, + "y": 73 + }, + "hiddenSeries": false, + "id": 14, + "interval": "", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n\t--w.daily_window as time,\n $__timeGroup(w.daily_window, '1d', 0),\n\tcount(*),\n\tdevice.spec.class as metric\nFROM\n\tdevice.weekly_reports_sliding w\n\tINNER JOIN device.ts_device ON w.report_id = device.ts_device.REPORT_ID\n\tINNER JOIN device.device ON device.ts_device.DEVICE_ID = device.device.id\n\tINNER JOIN device.spec ON device.device.SPEC_ID = device.spec.id\n where $__timeFilter(daily_window)\n and device.spec.class != 'unknown'\nGROUP BY\n\tw.daily_window, device.spec.class\nORDER BY w.daily_window, device.spec.class;\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Devices by Class", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 1, + "gridPos": { + "h": 11, + "w": 12, + "x": 12, + "y": 73 + }, + "hiddenSeries": false, + "id": 15, + "interval": "", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n\t--w.daily_window as time,\n $__timeGroup(w.daily_window, '1d', 0),\n\tcount(*) \"Empty Reports\",\n\tdevice.spec.class as metric\nFROM\n\tdevice.weekly_reports_sliding w\n\tINNER JOIN device.ts_device ON w.report_id = device.ts_device.REPORT_ID\n\tINNER JOIN device.device ON device.ts_device.DEVICE_ID = device.device.id\n\tINNER JOIN device.spec ON device.device.SPEC_ID = device.spec.id\n where $__timeFilter(daily_window)\n --and device.spec.class = 'normal'\n and device.spec.class in ($class)\n and device.ts_device.error is not NULL\nGROUP BY\n\tw.daily_window, device.spec.class\nORDER BY w.daily_window, device.spec.class;\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Invalid Telemetry Reports by Device Class", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "locale", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": null, + "gridPos": { + "h": 3, + "w": 12, + "x": 0, + "y": 84 + }, + "id": 24, + "links": [], + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + }, + { + "datasource": null, + "gridPos": { + "h": 3, + "w": 12, + "x": 12, + "y": 84 + }, + "id": 30, + "options": { + "content": "\n", + "mode": "html" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "transparent": true, + "type": "text" + } + ], + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select distinct(class) from device.spec\nwhere device.spec.class != 'unknown';", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "class", + "multi": true, + "name": "class", + "options": [], + "query": "select distinct(class) from device.spec\nwhere device.spec.class != 'unknown';", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select distinct(lower(vendor)) from device.spec\nwhere device.spec.class in ($class);", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "vendor", + "multi": true, + "name": "vendor", + "options": [], + "query": "select distinct(lower(vendor)) from device.spec\nwhere device.spec.class in ($class);", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "/*\nselect distinct(lower(model))\nfrom device.spec\nwhere vendor = $vendor\n*/\n\nselect\n distinct(model)\nfrom\n\tdevice.spec\nwhere\n --device.spec.class = 'normal'\n--and\n lower(device.spec.vendor) in ($vendor);\n/*\nwhere\n\tattr='ceph_version_norm'\nand\n SPLIT_PART(value, '.', '1') in ($major);\n*/", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "model", + "multi": true, + "name": "model", + "options": [], + "query": "/*\nselect distinct(lower(model))\nfrom device.spec\nwhere vendor = $vendor\n*/\n\nselect\n distinct(model)\nfrom\n\tdevice.spec\nwhere\n --device.spec.class = 'normal'\n--and\n lower(device.spec.vendor) in ($vendor);\n/*\nwhere\n\tattr='ceph_version_norm'\nand\n SPLIT_PART(value, '.', '1') in ($major);\n*/", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6M", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Main", + "uid": "OVxgLWiGz", + "version": 15 +} \ No newline at end of file diff --git a/dashboard/private/device/device_models_per_vendor.json b/dashboard/private/device/device_models_per_vendor.json new file mode 100644 index 0000000..86ed724 --- /dev/null +++ b/dashboard/private/device/device_models_per_vendor.json @@ -0,0 +1,317 @@ +{ + "__inputs": [ + { + "name": "DS_POSTGRESQL", + "label": "PostgreSQL", + "description": "", + "type": "datasource", + "pluginId": "postgres", + "pluginName": "PostgreSQL" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "datasource", + "id": "postgres", + "name": "PostgreSQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + } + ], + "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": 1646874869142, + "links": [ + { + "icon": "dashboard", + "tags": [], + "title": "Back to distinct models", + "type": "link", + "url": "/d/GQDv4xmMz/tabular-data?orgId=1&var-class=All&var-vendor=All" + } + ], + "panels": [ + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": { + "align": "left", + "displayMode": "auto" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "model" + }, + "properties": [ + { + "id": "custom.width", + "value": 280 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "devices" + }, + "properties": [ + { + "id": "links", + "value": [ + { + "title": "See devices", + "url": "/d/H719wbmGk/devices-by-vendor-and-model?var-class=${__data.fields[class]}&var-vendor=${__data.fields[vendor]}&var-model=${__data.fields[model]}" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "capacity" + }, + "properties": [ + { + "id": "unit", + "value": "decbytes" + }, + { + "id": "custom.width", + "value": 133 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "capacity" + }, + "properties": [ + { + "id": "decimals", + "value": 2 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "type" + }, + "properties": [ + { + "id": "custom.width", + "value": 109 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "interface" + }, + "properties": [ + { + "id": "custom.width", + "value": 112 + } + ] + } + ] + }, + "gridPos": { + "h": 14, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "capacity" + } + ] + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "\nselect\n lower(device.spec.vendor) vendor,\n device.spec.model model,\n device.spec.type,\n device.spec.interface,\n device.spec.class,\n device.spec.capacity,\n count(device.id) devices\nfrom device.spec\ninner join device.device\non device.device.spec_id = device.spec.id\nwhere\ndevice.spec.class in ($class)\nand \nlower(device.spec.vendor) in ($vendor)\nand\ndevice.spec.model in ($model)\ngroup by device.spec.id\n--order by lower(device.spec.vendor), lower(device.spec.model) asc;\norder by vendor, model;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Models per Vendor", + "type": "table" + } + ], + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select distinct(class) from device.spec\nwhere device.spec.class != 'unknown';", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "class", + "multi": true, + "name": "class", + "options": [], + "query": "select distinct(class) from device.spec\nwhere device.spec.class != 'unknown';", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select distinct(lower(vendor)) from device.spec\nwhere device.spec.class in ($class);", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "vendor", + "multi": true, + "name": "vendor", + "options": [], + "query": "select distinct(lower(vendor)) from device.spec\nwhere device.spec.class in ($class);", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "/*\nselect distinct(lower(model))\nfrom device.spec\nwhere vendor = $vendor\n*/\n\nselect\n distinct(model)\nfrom\n\tdevice.spec\nwhere\n --device.spec.class = 'normal'\n--and\n lower(device.spec.vendor) in ($vendor);\n/*\nwhere\n\tattr='ceph_version_norm'\nand\n SPLIT_PART(value, '.', '1') in ($major);\n*/\n", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "model", + "multi": true, + "name": "model", + "options": [], + "query": "/*\nselect distinct(lower(model))\nfrom device.spec\nwhere vendor = $vendor\n*/\n\nselect\n distinct(model)\nfrom\n\tdevice.spec\nwhere\n --device.spec.class = 'normal'\n--and\n lower(device.spec.vendor) in ($vendor);\n/*\nwhere\n\tattr='ceph_version_norm'\nand\n SPLIT_PART(value, '.', '1') in ($major);\n*/\n", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Models per Vendor", + "uid": "x1_ISxiMz", + "version": 6 +} \ No newline at end of file diff --git a/dashboard/private/device/device_prediction_by_id.json b/dashboard/private/device/device_prediction_by_id.json new file mode 100644 index 0000000..7bed788 --- /dev/null +++ b/dashboard/private/device/device_prediction_by_id.json @@ -0,0 +1,449 @@ +{ + "__inputs": [], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph (old)", + "version": "" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + } + ], + "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": 1646874967440, + "links": [], + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "'1' == 'Good'; '2' == 'Warning'; '3' == 'Bad'", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 11, + "w": 24, + "x": 0, + "y": 0 + }, + "hiddenSeries": false, + "id": 4, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.2", + "pointradius": 1, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "-- Add to the prediction_result table \n-- yesterday's result for this device_id\nselect\n\t--id,\n --device_id,\n\tts as time,\n\tarray_position(array['Good', 'Warning', 'Bad', 'Model failed', 'Model does not support this vendor'], result) as result\n\t--result as metric\n\t/*curr_res,\n\tlag(result) over (\n\t\torder by ts asc\n\t) as prev_res */\nfrom device.prediction_result\nwhere device_id in ('$device_id') -- TODO change to variable\n;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "thresholds": [ + { + "$$hashKey": "object:314", + "colorMode": "ok", + "fill": true, + "line": true, + "op": "gt", + "value": 0, + "yaxis": "left" + }, + { + "$$hashKey": "object:320", + "colorMode": "warning", + "fill": true, + "line": true, + "op": "gt", + "value": 1, + "yaxis": "left" + }, + { + "$$hashKey": "object:326", + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 2, + "yaxis": "left" + } + ], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Prediction Result", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:75", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:76", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": null, + "description": "Shows only cases where prediction result changed on consecutive days", + "fieldConfig": { + "defaults": { + "custom": { + "align": "left", + "displayMode": "auto" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "curr_res" + }, + "properties": [ + { + "id": "displayName", + "value": "result" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "prev_res" + }, + "properties": [ + { + "id": "displayName", + "value": "previous result" + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 11 + }, + "id": 2, + "options": { + "showHeader": true + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "-- Show only cases where prediction result changed the next day\nselect *\nfrom (\n -- Add to the prediction_result table \n -- yesterday's result for this device_id\n\tselect\n\t\tid,\n\t\tdevice_id,\n\t\tts::TEXT,\n\t\tresult curr_res,\n\t\tlag(result) over (\n\t\t\torder by ts asc\n\t\t) as prev_res\n\tfrom device.prediction_result\n\twhere device_id in ('$device_id')\n\t) res_window\nwhere res_window.curr_res != res_window.prev_res or prev_res is NULL \norder by ts;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Prediction result flip points", + "type": "table" + }, + { + "datasource": null, + "description": "Shows all prediction results for this device_id.", + "fieldConfig": { + "defaults": { + "custom": { + "align": "left", + "displayMode": "auto" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "id" + }, + "properties": [ + { + "id": "custom.width", + "value": 303 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "device_id" + }, + "properties": [ + { + "id": "custom.width", + "value": 290 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "ts" + }, + "properties": [ + { + "id": "custom.width", + "value": 289 + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 20 + }, + "id": 3, + "options": { + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "-- Add to the prediction_result table \n-- yesterday's result for this device_id\nselect\n\tid,\n\tdevice_id,\n\tts::TEXT,\n\tresult /*curr_res,\n\tlag(result) over (\n\t\torder by ts asc\n\t) as prev_res */\nfrom device.prediction_result\nwhere device_id in ('$device_id') -- TODO change to variable\n;", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "All prediction results for device_id $device_id", + "type": "table" + } + ], + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": true, + "text": "7104", + "value": "7104" + }, + "description": null, + "error": null, + "hide": 0, + "label": "Device ID", + "name": "device_id", + "options": [ + { + "selected": true, + "text": "7104", + "value": "7104" + } + ], + "query": "1117", + "skipUrlSync": false, + "type": "textbox" + } + ] + }, + "time": { + "from": "now-6M", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Prediction by ID", + "uid": "FVRTW42Gz", + "version": 6 +} \ No newline at end of file diff --git a/dashboard/private/device/device_raw_report.json b/dashboard/private/device/device_raw_report.json new file mode 100644 index 0000000..547216e --- /dev/null +++ b/dashboard/private/device/device_raw_report.json @@ -0,0 +1,257 @@ +{ + "__inputs": [ + { + "name": "DS_POSTGRESQL", + "label": "PostgreSQL", + "description": "", + "type": "datasource", + "pluginId": "postgres", + "pluginName": "PostgreSQL" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "datasource", + "id": "postgres", + "name": "PostgreSQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + } + ], + "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": 1646875040401, + "links": [ + { + "icon": "dashboard", + "tags": [], + "title": "Back to all reports", + "tooltip": "", + "type": "link", + "url": "/d/fuE9R-iMz/all-reports?orgId=1&var-device_id=$device_serial_id" + } + ], + "panels": [ + { + "datasource": null, + "gridPos": { + "h": 28, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 4, + "options": { + "content": "
\n  \n    $content\n  \n
", + "mode": "html" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Raw Report", + "type": "text" + } + ], + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "187292", + "value": "187292" + }, + "description": null, + "error": null, + "hide": 0, + "label": "Report ID", + "name": "id", + "options": [ + { + "selected": true, + "text": "45532", + "value": "45532" + } + ], + "query": "45532", + "skipUrlSync": false, + "type": "textbox" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select JSONB_PRETTY(report::jsonb)\nfrom public.device_report\nwhere id = $id;", + "description": null, + "error": null, + "hide": 2, + "includeAll": false, + "label": "content", + "multi": false, + "name": "content", + "options": [], + "query": "select JSONB_PRETTY(report::jsonb)\nfrom public.device_report\nwhere id = $id;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select\ndevice_id\n--report_stamp ts\nfrom public.device_report\nwhere id = $id;", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "Device ID", + "multi": false, + "name": "device_id", + "options": [], + "query": "select\ndevice_id\n--report_stamp ts\nfrom public.device_report\nwhere id = $id;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select\nreport_stamp::TEXT ts\nfrom public.device_report\nwhere id = $id;", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "ts", + "multi": false, + "name": "ts", + "options": [], + "query": "select\nreport_stamp::TEXT ts\nfrom public.device_report\nwhere id = $id;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select device_id\nfrom device.ts_device\nwhere report_id = $id;", + "description": null, + "error": null, + "hide": 2, + "includeAll": false, + "label": "device_serial_id", + "multi": false, + "name": "device_serial_id", + "options": [], + "query": "select device_id\nfrom device.ts_device\nwhere report_id = $id;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Raw Report", + "uid": "L15CkaiGk", + "version": 4 +} \ No newline at end of file diff --git a/dashboard/private/device/device_raw_report_open.json b/dashboard/private/device/device_raw_report_open.json new file mode 100644 index 0000000..1fdfaed --- /dev/null +++ b/dashboard/private/device/device_raw_report_open.json @@ -0,0 +1,257 @@ +{ + "__inputs": [ + { + "name": "DS_POSTGRESQL", + "label": "PostgreSQL", + "description": "", + "type": "datasource", + "pluginId": "postgres", + "pluginName": "PostgreSQL" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.1.2" + }, + { + "type": "datasource", + "id": "postgres", + "name": "PostgreSQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + } + ], + "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": 1646875099568, + "links": [ + { + "icon": "dashboard", + "tags": [], + "title": "Back to all reports", + "tooltip": "", + "type": "link", + "url": "/d/fuE9R-iMz/all-reports?orgId=1&var-device_id=$device_serial_id" + } + ], + "panels": [ + { + "datasource": null, + "gridPos": { + "h": 28, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 4, + "options": { + "content": "
\n  \n    $content\n  \n
", + "mode": "html" + }, + "pluginVersion": "8.1.2", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n $__time(time_column),\n value1\nFROM\n metric_table\nWHERE\n $__timeFilter(time_column)\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Raw Report", + "type": "text" + } + ], + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "187292", + "value": "187292" + }, + "description": null, + "error": null, + "hide": 0, + "label": "Report ID", + "name": "id", + "options": [ + { + "selected": true, + "text": "45532", + "value": "45532" + } + ], + "query": "45532", + "skipUrlSync": false, + "type": "textbox" + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select JSONB_PRETTY(report::jsonb)\nfrom open_device.anon_report\nwhere report_id = $id;", + "description": null, + "error": null, + "hide": 2, + "includeAll": false, + "label": "content", + "multi": false, + "name": "content", + "options": [], + "query": "select JSONB_PRETTY(report::jsonb)\nfrom open_device.anon_report\nwhere report_id = $id;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select\ndevice_id\n--report_stamp ts\nfrom public.device_report\nwhere id = $id;", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "Device ID", + "multi": false, + "name": "device_id", + "options": [], + "query": "select\ndevice_id\n--report_stamp ts\nfrom public.device_report\nwhere id = $id;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select\nreport_stamp::TEXT ts\nfrom public.device_report\nwhere id = $id;", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "ts", + "multi": false, + "name": "ts", + "options": [], + "query": "select\nreport_stamp::TEXT ts\nfrom public.device_report\nwhere id = $id;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_POSTGRESQL}", + "definition": "select device_id\nfrom device.ts_device\nwhere report_id = $id;", + "description": null, + "error": null, + "hide": 2, + "includeAll": false, + "label": "device_serial_id", + "multi": false, + "name": "device_serial_id", + "options": [], + "query": "select device_id\nfrom device.ts_device\nwhere report_id = $id;", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Raw Report -- Open", + "uid": "0td7269Gk", + "version": 4 +} \ No newline at end of file diff --git a/db_create_device.sql b/db_create_device.sql index 94696d9..495edb9 100644 --- a/db_create_device.sql +++ b/db_create_device.sql @@ -162,9 +162,6 @@ CREATE MATERIALIZED VIEW device.weekly_reports_sliding AS device_id, d.ts DESC; --- Run this command as user 'postgres', since user 'telemetry' is not part of 'grafana' role. -ALTER MATERIALIZED VIEW device.weekly_reports_sliding OWNER TO grafana; - GRANT SELECT ON device.weekly_reports_sliding TO grafana_ro; -- Holds (vendor, model) mappings results - for debugging purposes only. diff --git a/db_create_roles.sql b/db_create_roles.sql index 75c0ed9..326f4c1 100644 --- a/db_create_roles.sql +++ b/db_create_roles.sql @@ -1,5 +1,9 @@ --CREATE USER grafana WITH PASSWORD ''; --CREATE USER grafana_ro WITH PASSWORD ''; + +-- This command must be run as user 'postgres', since user 'telemetry' is not part of 'grafana' role +ALTER MATERIALIZED VIEW device.weekly_reports_sliding OWNER TO grafana; + GRANT USAGE ON SCHEMA grafana TO grafana, grafana_ro; GRANT ALL ON ALL TABLES IN SCHEMA grafana TO grafana; -- "ALL TABLES" includes views GRANT ALL ON ALL SEQUENCES IN SCHEMA grafana TO grafana; diff --git a/install/crontab_telemetry b/install/crontab_telemetry new file mode 100644 index 0000000..5063054 --- /dev/null +++ b/install/crontab_telemetry @@ -0,0 +1,4 @@ +40 02 * * * /opt/telemetry/import_crashes.py +00 03 * * * /opt/telemetry/import_clusters.py +20 03 * * * /opt/telemetry/import_devices.py +30 01 * * * /opt/telemetry/compress_raw_reports_telemetry.sh diff --git a/install/docker-compose.yml b/install/docker-compose.yml new file mode 100644 index 0000000..219c15c --- /dev/null +++ b/install/docker-compose.yml @@ -0,0 +1,23 @@ +services: + postgres: + image: postgres + environment: + POSTGRES_PASSWORD: + + volumes: + - :/var/lib/postgresql/data + + ports: + - "5432:5432" + + grafana: + image: grafana/grafana-oss + hostname: + + volumes: + - /opt/telemetry_grafana/var/lib/grafana:/var/lib/grafana + - /opt/telemetry_grafana/etc/grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards + - /opt/telemetry_grafana/etc/grafana_dashboards:/etc/grafana_dashboards + + ports: + - "3000:3000" diff --git a/install/grafana_dashboards_ini.yml b/install/grafana_dashboards_ini.yml new file mode 100644 index 0000000..86359eb --- /dev/null +++ b/install/grafana_dashboards_ini.yml @@ -0,0 +1,9 @@ +apiVersion: 1 + +providers: + - name: dashboards + type: file + updateIntervalSeconds: 60 + options: + path: /etc/grafana_dashboards + foldersFromFilesStructure: true diff --git a/install/telemetry-ssl.conf b/install/telemetry-ssl.conf new file mode 100644 index 0000000..1040fe2 --- /dev/null +++ b/install/telemetry-ssl.conf @@ -0,0 +1,30 @@ + + ServerName telemetry.ceph.com + # For development when connecting to "localhost", you may need to uncomment the ServerAlias + #ServerAlias * + + WSGIDaemonProcess telemetry user=apache group=apache threads=5 + WSGIScriptAlias / /opt/telemetry/server/app.wsgi + + + WSGIProcessGroup telemetry + WSGIApplicationGroup %{GLOBAL} + WSGIScriptReloading On + AllowOverride None + Require all granted + + + ErrorLog /var/log/httpd/error.log + CustomLog /var/log/httpd/access.log combined + + SSLEngine on + SSLCertificateFile /etc/telemetry/ssl/telemetry.crt + SSLCertificateKeyFile /etc/telemetry/ssl/telemetry.key + + DOSSiteCount 500 + DOSPageCount 500 + DOSSiteInterval 1800 + DOSPageInterval 1800 + DOSBlockingPeriod 1800 + # DOSWhitelist 1.2.3.4 +