Rework Nova Top dashboards

- provide a possibility to watch instances from hosts with no host
  aggregate;
- replace host(s) by host_aggregate(s) in the legend (host(s) is
  not readable in case 10+ computes).
Change-Id: Ib49995b11f831f38695aae2fa28614b41b4239f5
Related-PROD: PROD-34148
diff --git a/nova/files/grafana_dashboards/nova_top_instances_prometheus.json b/nova/files/grafana_dashboards/nova_top_instances_prometheus.json
index 89c5a99..1af4166 100644
--- a/nova/files/grafana_dashboards/nova_top_instances_prometheus.json
+++ b/nova/files/grafana_dashboards/nova_top_instances_prometheus.json
@@ -1795,16 +1795,16 @@
           ]
         },
         "datasource": "prometheus",
-        "definition": "label_values(openstack_nova_aggregate_metadata,name)",
+        "definition": "query_result(avg(openstack_nova_aggregate_metadata or on(name) no_aggregate:openstack_nova_aggregate_metadata) by (name))",
         "hide": 0,
         "includeAll": true,
         "label": "Host Aggregate",
         "multi": true,
         "name": "host_aggregate",
         "options": [],
-        "query": "label_values(openstack_nova_aggregate_metadata,name)",
+        "query": "query_result(avg(openstack_nova_aggregate_metadata or on(name) no_aggregate:openstack_nova_aggregate_metadata) by (name))",
         "refresh": 2,
-        "regex": "",
+        "regex": "/.*{name=\"(.*)\"}.*/",
         "skipUrlSync": false,
         "sort": 1,
         "tagValuesQuery": "",
@@ -1822,16 +1822,16 @@
           ]
         },
         "datasource": "prometheus",
-        "definition": "label_values(openstack_nova_aggregate_metadata{name=~\"$host_aggregate\"},host)",
+        "definition": "query_result(avg(openstack_nova_aggregate_metadata{name=~\"$host_aggregate\"} or on(host) no_aggregate:openstack_nova_aggregate_metadata{name=~\"$host_aggregate\"}) by (host))",
         "hide": 0,
         "includeAll": true,
         "label": "Host",
         "multi": true,
         "name": "host",
         "options": [],
-        "query": "label_values(openstack_nova_aggregate_metadata{name=~\"$host_aggregate\"},host)",
+        "query": "query_result(avg(openstack_nova_aggregate_metadata{name=~\"$host_aggregate\"} or on(host) no_aggregate:openstack_nova_aggregate_metadata{name=~\"$host_aggregate\"}) by (host))",
         "refresh": 2,
-        "regex": "",
+        "regex": "/.*{host=\"(.*)\"}.*/",
         "skipUrlSync": false,
         "sort": 1,
         "tagValuesQuery": "",
diff --git a/nova/files/grafana_dashboards/nova_top_tenants_prometheus.json b/nova/files/grafana_dashboards/nova_top_tenants_prometheus.json
index ed997a5..fdb37a6 100644
--- a/nova/files/grafana_dashboards/nova_top_tenants_prometheus.json
+++ b/nova/files/grafana_dashboards/nova_top_tenants_prometheus.json
@@ -37,7 +37,7 @@
           "dashLength": 10,
           "dashes": false,
           "datasource": null,
-          "description": "Shows Top N tenants those request most CPU in the following format: Host(s) / Tenant Name",
+          "description": "Shows Top N tenants those request most CPU in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -78,7 +78,7 @@
               "format": "time_series",
               "instant": false,
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}}",
               "refId": "A"
             }
           ],
@@ -129,7 +129,7 @@
           "dashLength": 10,
           "dashes": false,
           "datasource": null,
-          "description": "Shows Top N tenants those use most CPU in the following format: Host(s) / Tenant Name",
+          "description": "Shows Top N tenants those use most CPU in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -170,7 +170,7 @@
               "expr": "topk($topx,sum(host_project:libvirt_domain_info_cpu_time_seconds:rate5m{host=~\"$host\",project_name=~\"$project_name\"}) without(host))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}}",
               "refId": "A"
             }
           ],
@@ -234,7 +234,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N tenants those request most RAM in the following format: Host(s) / Tenant Name",
+          "description": "Shows Top N tenants those request most RAM in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -274,7 +274,7 @@
               "expr": "topk($topx,sum(host_project:libvirt_domain_memory_actual_balloon_bytes{host=~\"$host\",project_name=~\"$project_name\"}) without(host))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}}",
               "refId": "A"
             }
           ],
@@ -324,7 +324,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N tenants those use most RAM in the following format: Host(s) / Tenant Name",
+          "description": "Shows Top N tenants those use most RAM in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -364,7 +364,7 @@
               "expr": "topk($topx,sum(host_project:libvirt_domain_memory_rss_bytes{host=~\"$host\",project_name=~\"$project_name\"}) without(host))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}}",
               "refId": "A"
             }
           ],
@@ -428,7 +428,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N tenants those consume most read throughput from file disk devices (libvirt disk type = \"file\") in the following format: Host(s) / Tenant Name",
+          "description": "Shows Top N tenants those consume most read throughput from file disk devices (libvirt disk type = \"file\") in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -469,7 +469,7 @@
               "expr": "topk($topx,sum(host_project:libvirt_domain_block_stats_read_bytes:rate5m{host=~\"$host\",project_name=~\"$project_name\",type=\"file\"}) without(host,source_file,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}}",
               "refId": "A"
             }
           ],
@@ -519,7 +519,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N tenants those consume most write throughput from file disk devices (libvirt disk type = \"file\") in the following format: Host(s) / Tenant Name",
+          "description": "Shows Top N tenants those consume most write throughput from file disk devices (libvirt disk type = \"file\") in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -559,7 +559,7 @@
               "expr": "topk($topx,sum(host_project:libvirt_domain_block_stats_write_bytes:rate5m{host=~\"$host\",project_name=~\"$project_name\",type=\"file\"}) without(host,source_file,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}}",
               "refId": "A"
             }
           ],
@@ -609,7 +609,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N tenants those consume most read throughput from network disk devices (libvirt disk type = \"network\") in the following format: Host(s) / Tenant Name",
+          "description": "Shows Top N tenants those consume most read throughput from network disk devices (libvirt disk type = \"network\") in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -649,7 +649,7 @@
               "expr": "topk($topx,sum(host_project:libvirt_domain_block_stats_read_bytes:rate5m{host=~\"$host\",project_name=~\"$project_name\",type=\"network\"}) without(host,source_file,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}}",
               "refId": "A"
             }
           ],
@@ -699,7 +699,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N tenants those consume most write throughput from network disk devices (libvirt disk type = \"network\") in the following format: Host(s) / Tenant Name",
+          "description": "Shows Top N tenants those consume most write throughput from network disk devices (libvirt disk type = \"network\") in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -739,7 +739,7 @@
               "expr": "topk($topx,sum(host_project:libvirt_domain_block_stats_write_bytes:rate5m{host=~\"$host\",project_name=~\"$project_name\",type=\"network\"}) without(host,source_file,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}}",
               "refId": "A"
             }
           ],
@@ -803,7 +803,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N tenants those consume most read IO from file disk devices (libvirt disk type = \"file\") in the following format: Host(s) / Tenant Name",
+          "description": "Shows Top N tenants those consume most read IO from file disk devices (libvirt disk type = \"file\") in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -844,7 +844,7 @@
               "expr": "topk($topx,sum(host_project:libvirt_domain_block_stats_read_requests:rate5m{host=~\"$host\",project_name=~\"$project_name\",type=\"file\"}) without(host,source_file,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}}",
               "refId": "A"
             }
           ],
@@ -894,7 +894,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N tenants those consume most write IO from file disk devices (libvirt disk type = \"file\") in the following format: Host(s) / Tenant Name",
+          "description": "Shows Top N tenants those consume most write IO from file disk devices (libvirt disk type = \"file\") in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -934,7 +934,7 @@
               "expr": "topk($topx,sum(host_project:libvirt_domain_block_stats_write_requests:rate5m{host=~\"$host\",project_name=~\"$project_name\",type=\"file\"}) without(host,source_file,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}}",
               "refId": "A"
             }
           ],
@@ -984,7 +984,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N tenants those consume most read IO from network disk devices (libvirt disk type = \"network\") in the following format: Host(s) / Tenant Name",
+          "description": "Shows Top N tenants those consume most read IO from network disk devices (libvirt disk type = \"network\") in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -1024,7 +1024,7 @@
               "expr": "topk($topx,sum(host_project:libvirt_domain_block_stats_read_requests:rate5m{host=~\"$host\",project_name=~\"$project_name\",type=\"network\"}) without(host,source_file,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}}",
               "refId": "A"
             }
           ],
@@ -1074,7 +1074,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N tenants those consume most write IO from network disk devices (libvirt disk type = \"network\") in the following format: Host(s) / Tenant Name",
+          "description": "Shows Top N tenants those consume most write IO from network disk devices (libvirt disk type = \"network\") in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -1114,7 +1114,7 @@
               "expr": "topk($topx,sum(host_project:libvirt_domain_block_stats_write_requests:rate5m{host=~\"$host\",project_name=~\"$project_name\",type=\"network\"}) without(host,source_file,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}}",
               "refId": "A"
             }
           ],
@@ -1178,7 +1178,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N tenants those request most space from file disk devices (libvirt disk type = \"file\") in the following format: Host(s) / Tenant Name",
+          "description": "Shows Top N tenants those request most space from file disk devices (libvirt disk type = \"file\") in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -1218,7 +1218,7 @@
               "expr": "topk($topx,sum(host_project:libvirt_domain_block_stats_capacity{host=~\"$host\",project_name=~\"$project_name\",type=\"file\"}) without(host,source_file,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}}",
               "refId": "A"
             }
           ],
@@ -1268,7 +1268,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N tenants those use most space from file disk devices (libvirt disk type = \"file\") in the following format: Host(s) / Tenant Name",
+          "description": "Shows Top N tenants those use most space from file disk devices (libvirt disk type = \"file\") in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -1308,7 +1308,7 @@
               "expr": "topk($topx,sum(host_project:libvirt_domain_block_stats_physical{host=~\"$host\",project_name=~\"$project_name\",type=\"file\"}) without(host,source_file,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}}",
               "refId": "A"
             }
           ],
@@ -1358,7 +1358,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N tenants those request most space from network disk devices (libvirt disk type = \"network\") in the following format: Host(s) / Tenant Name",
+          "description": "Shows Top N tenants those request most space from network disk devices (libvirt disk type = \"network\") in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -1398,7 +1398,7 @@
               "expr": "topk($topx,sum(host_project:libvirt_domain_block_stats_capacity{host=~\"$host\",project_name=~\"$project_name\",type=\"network\"}) without(host,source_file,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}}",
               "refId": "A"
             }
           ],
@@ -1448,7 +1448,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N tenants those use most space from network disk devices (libvirt disk type = \"network\") in the following format: Host(s) / Tenant Name",
+          "description": "Shows Top N tenants those use most space from network disk devices (libvirt disk type = \"network\") in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -1488,7 +1488,7 @@
               "expr": "topk($topx,sum(host_project:libvirt_domain_block_stats_physical{host=~\"$host\",project_name=~\"$project_name\",type=\"network\"}) without(host,source_file,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}}",
               "refId": "A"
             }
           ],
@@ -1552,7 +1552,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N tenants those consume most network receiver bandwidth in the following format: Host(s) / Tenant Name",
+          "description": "Shows Top N tenants those consume most network receiver bandwidth in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -1592,7 +1592,7 @@
               "expr": "topk($topx,sum(host_project:libvirt_domain_interface_stats_receive_bytes:rate5m{host=~\"$host\",project_name=~\"$project_name\"}) without(host,source_bridge,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}}",
               "refId": "A"
             }
           ],
@@ -1642,7 +1642,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N tenants those consume most network transmitter bandwidth in the following format: Host(s) / Tenant Name",
+          "description": "Shows Top N tenants those consume most network transmitter bandwidth in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -1682,7 +1682,7 @@
               "expr": "topk($topx,sum(host_project:libvirt_domain_interface_stats_transmit_bytes:rate5m{host=~\"$host\",project_name=~\"$project_name\"}) without(host,source_bridge,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}}",
               "refId": "A"
             }
           ],
@@ -1789,7 +1789,7 @@
         "type": "custom"
       },
       {
-        "allValue": null,
+        "allValue": ".*",
         "current": {
           "text": "All",
           "value": [
@@ -1797,16 +1797,16 @@
           ]
         },
         "datasource": "prometheus",
-        "definition": "label_values(openstack_nova_aggregate_metadata,name)",
+        "definition": "query_result(avg(openstack_nova_aggregate_metadata or on(name) no_aggregate:openstack_nova_aggregate_metadata) by (name))",
         "hide": 0,
         "includeAll": true,
         "label": "Host Aggregate",
         "multi": true,
         "name": "host_aggregate",
         "options": [],
-        "query": "label_values(openstack_nova_aggregate_metadata,name)",
+        "query": "query_result(avg(openstack_nova_aggregate_metadata or on(name) no_aggregate:openstack_nova_aggregate_metadata) by (name))",
         "refresh": 2,
-        "regex": "",
+        "regex": "/.*{name=\"(.*)\"}.*/",
         "skipUrlSync": false,
         "sort": 1,
         "tagValuesQuery": "",
@@ -1816,7 +1816,7 @@
         "useTags": false
       },
       {
-        "allValue": ".*",
+        "allValue": null,
         "current": {
           "text": "All",
           "value": [
@@ -1824,16 +1824,16 @@
           ]
         },
         "datasource": "prometheus",
-        "definition": "label_values(openstack_nova_aggregate_metadata{name=~\"$host_aggregate\"},host)",
+        "definition": "query_result(avg(openstack_nova_aggregate_metadata{name=~\"$host_aggregate\"} or on(host) no_aggregate:openstack_nova_aggregate_metadata{name=~\"$host_aggregate\"}) by (host))",
         "hide": 0,
         "includeAll": true,
         "label": "Host",
         "multi": true,
         "name": "host",
         "options": [],
-        "query": "label_values(openstack_nova_aggregate_metadata{name=~\"$host_aggregate\"},host)",
+        "query": "query_result(avg(openstack_nova_aggregate_metadata{name=~\"$host_aggregate\"} or on(host) no_aggregate:openstack_nova_aggregate_metadata{name=~\"$host_aggregate\"}) by (host))",
         "refresh": 2,
-        "regex": "",
+        "regex": "/.*{host=\"(.*)\"}.*/",
         "skipUrlSync": false,
         "sort": 1,
         "tagValuesQuery": "",
diff --git a/nova/files/grafana_dashboards/nova_top_users_prometheus.json b/nova/files/grafana_dashboards/nova_top_users_prometheus.json
index f35d192..9f127d2 100644
--- a/nova/files/grafana_dashboards/nova_top_users_prometheus.json
+++ b/nova/files/grafana_dashboards/nova_top_users_prometheus.json
@@ -37,7 +37,7 @@
           "dashLength": 10,
           "dashes": false,
           "datasource": null,
-          "description": "Shows Top N users those request most CPU in the following format: Host(s) / Tenant Name / User Name",
+          "description": "Shows Top N users those request most CPU in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name / User Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -78,7 +78,7 @@
               "format": "time_series",
               "instant": false,
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}} / {{user_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}} / {{user_name}}",
               "refId": "A"
             }
           ],
@@ -129,7 +129,7 @@
           "dashLength": 10,
           "dashes": false,
           "datasource": null,
-          "description": "Shows Top N users those use most CPU in the following format: Host(s) / Tenant Name / User Name",
+          "description": "Shows Top N users those use most CPU in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name / User Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -170,7 +170,7 @@
               "expr": "topk($topx,sum(host_user:libvirt_domain_info_cpu_time_seconds:rate5m{host=~\"$host\",project_name=~\"$project_name\",user_name=~\"$user_name\"}) without(host))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}} / {{user_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}} / {{user_name}}",
               "refId": "A"
             }
           ],
@@ -234,7 +234,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N users those request most RAM in the following format: Host(s) / Tenant Name / User Name",
+          "description": "Shows Top N users those request most RAM in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name / User Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -274,7 +274,7 @@
               "expr": "topk($topx,sum(host_user:libvirt_domain_memory_actual_balloon_bytes{host=~\"$host\",project_name=~\"$project_name\",user_name=~\"$user_name\"}) without(host))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}} / {{user_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}} / {{user_name}}",
               "refId": "A"
             }
           ],
@@ -324,7 +324,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N users those use most RAM in the following format: Host(s) / Tenant Name / User Name",
+          "description": "Shows Top N users those use most RAM in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name / User Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -364,7 +364,7 @@
               "expr": "topk($topx,sum(host_user:libvirt_domain_memory_rss_bytes{host=~\"$host\",project_name=~\"$project_name\",user_name=~\"$user_name\"}) without(host))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}} / {{user_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}} / {{user_name}}",
               "refId": "A"
             }
           ],
@@ -428,7 +428,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N users those consume most read throughput from file disk devices (libvirt disk type = \"file\") in the following format: Host(s) / Tenant Name / User Name",
+          "description": "Shows Top N users those consume most read throughput from file disk devices (libvirt disk type = \"file\") in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name / User Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -469,7 +469,7 @@
               "expr": "topk($topx,sum(host_user:libvirt_domain_block_stats_read_bytes:rate5m{host=~\"$host\",project_name=~\"$project_name\",user_name=~\"$user_name\",type=\"file\"}) without(host,source_file,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}} / {{user_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}} / {{user_name}}",
               "refId": "A"
             }
           ],
@@ -519,7 +519,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N users those consume most write throughput from file disk devices (libvirt disk type = \"file\") in the following format: Host(s) / Tenant Name / User Name",
+          "description": "Shows Top N users those consume most write throughput from file disk devices (libvirt disk type = \"file\") in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name / User Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -559,7 +559,7 @@
               "expr": "topk($topx,sum(host_user:libvirt_domain_block_stats_write_bytes:rate5m{host=~\"$host\",project_name=~\"$project_name\",user_name=~\"$user_name\",type=\"file\"}) without(host,source_file,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}} / {{user_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}} / {{user_name}}",
               "refId": "A"
             }
           ],
@@ -609,7 +609,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N users those consume most read throughput from network disk devices (libvirt disk type = \"network\") in the following format: Host(s) / Tenant Name / User Name",
+          "description": "Shows Top N users those consume most read throughput from network disk devices (libvirt disk type = \"network\") in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name / User Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -649,7 +649,7 @@
               "expr": "topk($topx,sum(host_user:libvirt_domain_block_stats_read_bytes:rate5m{host=~\"$host\",project_name=~\"$project_name\",user_name=~\"$user_name\",type=\"network\"}) without(host,source_file,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}} / {{user_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}} / {{user_name}}",
               "refId": "A"
             }
           ],
@@ -699,7 +699,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N users those consume most write throughput from network disk devices (libvirt disk type = \"network\") in the following format: Host(s) / Tenant Name / User Name",
+          "description": "Shows Top N users those consume most write throughput from network disk devices (libvirt disk type = \"network\") in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name / User Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -739,7 +739,7 @@
               "expr": "topk($topx,sum(host_user:libvirt_domain_block_stats_write_bytes:rate5m{host=~\"$host\",project_name=~\"$project_name\",user_name=~\"$user_name\",type=\"network\"}) without(host,source_file,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}} / {{user_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}} / {{user_name}}",
               "refId": "A"
             }
           ],
@@ -803,7 +803,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N users those consume most read IO from file disk devices (libvirt disk type = \"file\") in the following format: Host(s) / Tenant Name / User Name",
+          "description": "Shows Top N users those consume most read IO from file disk devices (libvirt disk type = \"file\") in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name / User Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -844,7 +844,7 @@
               "expr": "topk($topx,sum(host_user:libvirt_domain_block_stats_read_requests:rate5m{host=~\"$host\",project_name=~\"$project_name\",user_name=~\"$user_name\",type=\"file\"}) without(host,source_file,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}} / {{user_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}} / {{user_name}}",
               "refId": "A"
             }
           ],
@@ -894,7 +894,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N users those consume most write IO from file disk devices (libvirt disk type = \"file\") in the following format: Host(s) / Tenant Name / User Name",
+          "description": "Shows Top N users those consume most write IO from file disk devices (libvirt disk type = \"file\") in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name / User Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -934,7 +934,7 @@
               "expr": "topk($topx,sum(host_user:libvirt_domain_block_stats_write_requests:rate5m{host=~\"$host\",project_name=~\"$project_name\",user_name=~\"$user_name\",type=\"file\"}) without(host,source_file,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}} / {{user_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}} / {{user_name}}",
               "refId": "A"
             }
           ],
@@ -984,7 +984,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N users those consume most read IO from network disk devices (libvirt disk type = \"network\") in the following format: Host(s) / Tenant Name / User Name",
+          "description": "Shows Top N users those consume most read IO from network disk devices (libvirt disk type = \"network\") in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name / User Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -1024,7 +1024,7 @@
               "expr": "topk($topx,sum(host_user:libvirt_domain_block_stats_read_requests:rate5m{host=~\"$host\",project_name=~\"$project_name\",user_name=~\"$user_name\",type=\"network\"}) without(host,source_file,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}} / {{user_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}} / {{user_name}}",
               "refId": "A"
             }
           ],
@@ -1074,7 +1074,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N users those consume most write IO from network disk devices (libvirt disk type = \"network\") in the following format: Host(s) / Tenant Name / User Name",
+          "description": "Shows Top N users those consume most write IO from network disk devices (libvirt disk type = \"network\") in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name / User Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -1114,7 +1114,7 @@
               "expr": "topk($topx,sum(host_user:libvirt_domain_block_stats_write_requests:rate5m{host=~\"$host\",project_name=~\"$project_name\",user_name=~\"$user_name\",type=\"network\"}) without(host,source_file,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}} / {{user_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}} / {{user_name}}",
               "refId": "A"
             }
           ],
@@ -1178,7 +1178,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N users those request most space from file disk devices (libvirt disk type = \"file\") in the following format: Host(s) / Tenant Name / User Name",
+          "description": "Shows Top N users those request most space from file disk devices (libvirt disk type = \"file\") in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name / User Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -1218,7 +1218,7 @@
               "expr": "topk($topx,sum(host_user:libvirt_domain_block_stats_capacity{host=~\"$host\",project_name=~\"$project_name\",user_name=~\"$user_name\",type=\"file\"}) without(host,source_file,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}} / {{user_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}} / {{user_name}}",
               "refId": "A"
             }
           ],
@@ -1268,7 +1268,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N users those use most space from file disk devices (libvirt disk type = \"file\") in the following format: Host(s) / Tenant Name / User Name",
+          "description": "Shows Top N users those use most space from file disk devices (libvirt disk type = \"file\") in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name / User Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -1308,7 +1308,7 @@
               "expr": "topk($topx,sum(host_user:libvirt_domain_block_stats_physical{host=~\"$host\",project_name=~\"$project_name\",user_name=~\"$user_name\",type=\"file\"}) without(host,source_file,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}} / {{user_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}} / {{user_name}}",
               "refId": "A"
             }
           ],
@@ -1358,7 +1358,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N users those request most space from network disk devices (libvirt disk type = \"network\") in the following format: Host(s) / Tenant Name / User Name",
+          "description": "Shows Top N users those request most space from network disk devices (libvirt disk type = \"network\") in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name / User Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -1398,7 +1398,7 @@
               "expr": "topk($topx,sum(host_user:libvirt_domain_block_stats_capacity{host=~\"$host\",project_name=~\"$project_name\",user_name=~\"$user_name\",type=\"network\"}) without(host,source_file,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}} / {{user_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}} / {{user_name}}",
               "refId": "A"
             }
           ],
@@ -1448,7 +1448,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N users those use most space from network disk devices (libvirt disk type = \"network\") in the following format: Host(s) / Tenant Name / User Name",
+          "description": "Shows Top N users those use most space from network disk devices (libvirt disk type = \"network\") in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name / User Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -1488,7 +1488,7 @@
               "expr": "topk($topx,sum(host_user:libvirt_domain_block_stats_physical{host=~\"$host\",project_name=~\"$project_name\",user_name=~\"$user_name\",type=\"network\"}) without(host,source_file,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}} / {{user_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}} / {{user_name}}",
               "refId": "A"
             }
           ],
@@ -1552,7 +1552,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N users those consume most network receiver bandwidth in the following format: Host(s) / Tenant Name / User Name",
+          "description": "Shows Top N users those consume most network receiver bandwidth in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name / User Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -1592,7 +1592,7 @@
               "expr": "topk($topx,sum(host_user:libvirt_domain_interface_stats_receive_bytes:rate5m{host=~\"$host\",project_name=~\"$project_name\",user_name=~\"$user_name\"}) without(host,source_bridge,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}} / {{user_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}} / {{user_name}}",
               "refId": "A"
             }
           ],
@@ -1642,7 +1642,7 @@
           "bars": false,
           "dashLength": 10,
           "dashes": false,
-          "description": "Shows Top N users those consume most network transmitter bandwidth in the following format: Host(s) / Tenant Name / User Name",
+          "description": "Shows Top N users those consume most network transmitter bandwidth in the following format: Host Aggregate(s) (across selected Host(s)) / Tenant Name / User Name",
           "fill": 1,
           "gridPos": {
             "h": 7,
@@ -1682,7 +1682,7 @@
               "expr": "topk($topx,sum(host_user:libvirt_domain_interface_stats_transmit_bytes:rate5m{host=~\"$host\",project_name=~\"$project_name\",user_name=~\"$user_name\"}) without(host,source_bridge,target_device))",
               "format": "time_series",
               "intervalFactor": 1,
-              "legendFormat": "${host:csv} / {{project_name}} / {{user_name}}",
+              "legendFormat": "${host_aggregate:csv} / {{project_name}} / {{user_name}}",
               "refId": "A"
             }
           ],
@@ -1789,7 +1789,7 @@
         "type": "custom"
       },
       {
-        "allValue": null,
+        "allValue": ".*",
         "current": {
           "text": "All",
           "value": [
@@ -1797,16 +1797,16 @@
           ]
         },
         "datasource": "prometheus",
-        "definition": "label_values(openstack_nova_aggregate_metadata,name)",
+        "definition": "query_result(avg(openstack_nova_aggregate_metadata or on(name) no_aggregate:openstack_nova_aggregate_metadata) by (name))",
         "hide": 0,
         "includeAll": true,
         "label": "Host Aggregate",
         "multi": true,
         "name": "host_aggregate",
         "options": [],
-        "query": "label_values(openstack_nova_aggregate_metadata,name)",
+        "query": "query_result(avg(openstack_nova_aggregate_metadata or on(name) no_aggregate:openstack_nova_aggregate_metadata) by (name))",
         "refresh": 2,
-        "regex": "",
+        "regex": "/.*{name=\"(.*)\"}.*/",
         "skipUrlSync": false,
         "sort": 1,
         "tagValuesQuery": "",
@@ -1816,7 +1816,7 @@
         "useTags": false
       },
       {
-        "allValue": ".*",
+        "allValue": null,
         "current": {
           "text": "All",
           "value": [
@@ -1824,16 +1824,16 @@
           ]
         },
         "datasource": "prometheus",
-        "definition": "label_values(openstack_nova_aggregate_metadata{name=~\"$host_aggregate\"},host)",
+        "definition": "query_result(avg(openstack_nova_aggregate_metadata{name=~\"$host_aggregate\"} or on(host) no_aggregate:openstack_nova_aggregate_metadata{name=~\"$host_aggregate\"}) by (host))",
         "hide": 0,
         "includeAll": true,
         "label": "Host",
         "multi": true,
         "name": "host",
         "options": [],
-        "query": "label_values(openstack_nova_aggregate_metadata{name=~\"$host_aggregate\"},host)",
+        "query": "query_result(avg(openstack_nova_aggregate_metadata{name=~\"$host_aggregate\"} or on(host) no_aggregate:openstack_nova_aggregate_metadata{name=~\"$host_aggregate\"}) by (host))",
         "refresh": 2,
-        "regex": "",
+        "regex": "/.*{host=\"(.*)\"}.*/",
         "skipUrlSync": false,
         "sort": 1,
         "tagValuesQuery": "",
diff --git a/nova/meta/prometheus.yml b/nova/meta/prometheus.yml
index 9b7293f..323ec01 100644
--- a/nova/meta/prometheus.yml
+++ b/nova/meta/prometheus.yml
@@ -35,6 +35,10 @@
       query: >-
         count(openstack_nova_instance_status == 2) without (id,name)
 
+    no_aggregate:openstack_nova_aggregate_metadata:
+      query: >-
+        label_replace(count(label_replace(openstack_nova_running_instances,"host","$1","hostname","(.*)") unless on(host) openstack_nova_aggregate_metadata) without(hostname),"name","_no_host_aggregate","",".*")
+
     host_user:libvirt_domain_info_virtual_cpus:
       query: >-
         sum(libvirt_domain_info_virtual_cpus) by (host,project_name,project_uuid,user_name,user_uuid)