Fix instance to host mappings

Requires https://github.com/projectcalico/felix/pull/1464 to be merged downstream

Change-Id: Ic9db89ebc30dadee7592b2f84f1d57bfb53f15ae
diff --git a/kubernetes/files/grafana_dashboards/calico_prometheus.json b/kubernetes/files/grafana_dashboards/calico_prometheus.json
index 7d4483c..fc56e25 100644
--- a/kubernetes/files/grafana_dashboards/calico_prometheus.json
+++ b/kubernetes/files/grafana_dashboards/calico_prometheus.json
@@ -961,10 +961,10 @@
           "steppedLine": false,
           "targets": [
             {
-              "expr": "sum (felix_active_local_endpoints) by (instance)",
+              "expr": "sum by (host) (felix_active_local_endpoints * on (job, instance) group_left(host) felix_host)",
               "format": "time_series",
               "intervalFactor": 2,
-              "legendFormat": "-> {{ instance }}",
+              "legendFormat": "-> {{ host }}",
               "refId": "A",
               "step": 20
             }
@@ -1039,10 +1039,10 @@
           "steppedLine": false,
           "targets": [
             {
-              "expr": "sum (felix_active_local_policies) by (instance)",
+              "expr": "sum by (host) (felix_active_local_policies * on (job, instance) group_left(host) felix_host)",
               "format": "time_series",
               "intervalFactor": 2,
-              "legendFormat": "-> {{ instance }}",
+              "legendFormat": "-> {{ host }}",
               "refId": "A",
               "step": 20
             }
@@ -1117,10 +1117,10 @@
           "steppedLine": false,
           "targets": [
             {
-              "expr": "sum (felix_active_local_selectors) by (instance)",
+              "expr": "sum by (host) (felix_active_local_selectors * on (job, instance) group_left(host) felix_host)",
               "format": "time_series",
               "intervalFactor": 2,
-              "legendFormat": "-> {{ instance }}",
+              "legendFormat": "-> {{ host }}",
               "refId": "A",
               "step": 20
             }
@@ -1195,10 +1195,10 @@
           "steppedLine": false,
           "targets": [
             {
-              "expr": "sum (felix_active_local_tags) by (instance)",
+              "expr": "sum by (host) (felix_active_local_tags * on (job, instance) group_left(host) felix_host)",
               "format": "time_series",
               "intervalFactor": 2,
-              "legendFormat": "-> {{ instance }}",
+              "legendFormat": "-> {{ host }}",
               "refId": "A",
               "step": 20
             }
@@ -1273,10 +1273,10 @@
           "steppedLine": false,
           "targets": [
             {
-              "expr": "sum (felix_cluster_num_host_endpoints) by (instance)",
+              "expr": "sum by (host) (felix_cluster_num_host_endpoints * on (job, instance) group_left(host) felix_host)",
               "format": "time_series",
               "intervalFactor": 2,
-              "legendFormat": "-> {{ instance }}",
+              "legendFormat": "-> {{ host }}",
               "refId": "A",
               "step": 20
             }
@@ -1351,10 +1351,10 @@
           "steppedLine": false,
           "targets": [
             {
-              "expr": "sum (felix_cluster_num_workload_endpoints) by (instance)",
+              "expr": "sum by (host) (felix_cluster_num_workload_endpoints * on (job, instance) group_left(host) felix_host)",
               "format": "time_series",
               "intervalFactor": 2,
-              "legendFormat": "-> {{ instance }}",
+              "legendFormat": "-> {{ host }}",
               "refId": "A",
               "step": 20
             }
@@ -1429,10 +1429,10 @@
           "steppedLine": false,
           "targets": [
             {
-              "expr": "sum (felix_cluster_num_hosts) by (instance)",
+              "expr": "sum by (host) (felix_cluster_num_hosts * on (job, instance) group_left(host) felix_host)",
               "format": "time_series",
               "intervalFactor": 2,
-              "legendFormat": "-> {{ instance }}",
+              "legendFormat": "-> {{ host }}",
               "refId": "A",
               "step": 20
             }
@@ -1543,5 +1543,5 @@
   },
   "timezone": "browser",
   "title": "Calico cluster monitoring (via Prometheus)",
-  "version": 3
+  "version": 4
 }{% endraw %}