Use max function for openstack_* related metrics
If we use an aggregate func like max, we will avoid the
'multiple series' error, which can happen if for the specific
time period there will be >1 instance of remote agent returned
by the metric.
Change-Id: Ia82518ecfe4c96bca18595a12d5763ff1bd00721
Partial-Bug: PROD-17878
diff --git a/nova/files/grafana_dashboards/nova_prometheus.json b/nova/files/grafana_dashboards/nova_prometheus.json
index 0b6c26a..76e45d6 100644
--- a/nova/files/grafana_dashboards/nova_prometheus.json
+++ b/nova/files/grafana_dashboards/nova_prometheus.json
@@ -2783,7 +2783,7 @@
"tableColumn": "",
"targets": [
{
- "expr": "openstack_nova_total_used_vcpus",
+ "expr": "max(openstack_nova_total_used_vcpus)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "",
@@ -2861,7 +2861,7 @@
"tableColumn": "",
"targets": [
{
- "expr": "openstack_nova_total_used_disk",
+ "expr": "max(openstack_nova_total_used_disk)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "",
@@ -2939,7 +2939,7 @@
"tableColumn": "",
"targets": [
{
- "expr": "openstack_nova_total_used_ram",
+ "expr": "max(openstack_nova_total_used_ram)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "",
@@ -3017,7 +3017,7 @@
"tableColumn": "",
"targets": [
{
- "expr": "openstack_nova_total_free_vcpus",
+ "expr": "max(openstack_nova_total_free_vcpus)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "",
@@ -3095,7 +3095,7 @@
"tableColumn": "",
"targets": [
{
- "expr": "openstack_nova_total_free_disk",
+ "expr": "max(openstack_nova_total_free_disk)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "",
@@ -3173,7 +3173,7 @@
"tableColumn": "",
"targets": [
{
- "expr": "openstack_nova_total_free_ram",
+ "expr": "max(openstack_nova_total_free_ram)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "",
diff --git a/nova/files/grafana_dashboards/nova_prometheus_fluentd.json b/nova/files/grafana_dashboards/nova_prometheus_fluentd.json
index 6eaf31d..ce5257b 100644
--- a/nova/files/grafana_dashboards/nova_prometheus_fluentd.json
+++ b/nova/files/grafana_dashboards/nova_prometheus_fluentd.json
@@ -2607,7 +2607,7 @@
"tableColumn": "",
"targets": [
{
- "expr": "openstack_nova_total_used_vcpus",
+ "expr": "max(openstack_nova_total_used_vcpus)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "",
@@ -2685,7 +2685,7 @@
"tableColumn": "",
"targets": [
{
- "expr": "openstack_nova_total_used_disk",
+ "expr": "max(openstack_nova_total_used_disk)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "",
@@ -2763,7 +2763,7 @@
"tableColumn": "",
"targets": [
{
- "expr": "openstack_nova_total_used_ram",
+ "expr": "max(openstack_nova_total_used_ram)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "",
@@ -2841,7 +2841,7 @@
"tableColumn": "",
"targets": [
{
- "expr": "openstack_nova_total_free_vcpus",
+ "expr": "max(openstack_nova_total_free_vcpus)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "",
@@ -2919,7 +2919,7 @@
"tableColumn": "",
"targets": [
{
- "expr": "openstack_nova_total_free_disk",
+ "expr": "max(openstack_nova_total_free_disk)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "",
@@ -2997,7 +2997,7 @@
"tableColumn": "",
"targets": [
{
- "expr": "openstack_nova_total_free_ram",
+ "expr": "max(openstack_nova_total_free_ram)",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "",