Change openstack metrics label

Change metrics label service:
  neutron -> neutron-${programname}

To distinguish Neutron API from meta servers
on gateways and computes.

Change-Id: I0d2da542da58380e2af9b7d7a8e322c51146d86a
Related-bug: PROD-26252 (PROD:26252)
diff --git a/neutron/files/grafana_dashboards/neutron_openvswitch_prometheus_fluentd.json b/neutron/files/grafana_dashboards/neutron_openvswitch_prometheus_fluentd.json
index 1ad40d7..5c0dc64 100755
--- a/neutron/files/grafana_dashboards/neutron_openvswitch_prometheus_fluentd.json
+++ b/neutron/files/grafana_dashboards/neutron_openvswitch_prometheus_fluentd.json
@@ -664,7 +664,7 @@
       "targets": [
         {
           "$$hashKey": "object:2247",
-          "expr": "sum(rate(openstack_http_response_times_count{service=\"neutron\",host=~\"$host\"}[$rate_interval])) by (http_status)",
+          "expr": "sum(rate(openstack_http_response_times_count{service=\"neutron-server\",host=~\"$host\"}[$rate_interval])) by (http_status)",
           "format": "time_series",
           "hide": false,
           "intervalFactor": 2,
@@ -757,7 +757,7 @@
       "steppedLine": false,
       "targets": [
         {
-          "expr": "avg(openstack_http_response_times{service=\"neutron\",quantile=\"0.9\",host=~\"^$host$\",http_status=~\"2..\"}) by (http_method)",
+          "expr": "avg(openstack_http_response_times{service=\"neutron-server\",quantile=\"0.9\",host=~\"^$host$\",http_status=~\"2..\"}) by (http_method)",
           "format": "time_series",
           "intervalFactor": 2,
           "legendFormat": "{{http_method}}",
@@ -1822,7 +1822,7 @@
         "multi": true,
         "name": "host",
         "options": [],
-        "query": "label_values(openstack_http_response_times{service=\"neutron\"},host)",
+        "query": "label_values(openstack_http_response_times{service=\"neutron-server\"},host)",
         "refresh": 1,
         "regex": "",
         "sort": 1,
diff --git a/neutron/files/grafana_dashboards/neutron_prometheus_fluentd.json b/neutron/files/grafana_dashboards/neutron_prometheus_fluentd.json
index b9be028..6c18b4f 100755
--- a/neutron/files/grafana_dashboards/neutron_prometheus_fluentd.json
+++ b/neutron/files/grafana_dashboards/neutron_prometheus_fluentd.json
@@ -679,7 +679,7 @@
       "targets": [
         {
           "$$hashKey": "object:28939",
-          "expr": "sum(rate(openstack_http_response_times_count{service=\"neutron\",host=~\"$host\"}[$rate_interval])) by (http_status)",
+          "expr": "sum(rate(openstack_http_response_times_count{service=\"neutron-server\",host=~\"$host\"}[$rate_interval])) by (http_status)",
           "format": "time_series",
           "hide": false,
           "intervalFactor": 2,
@@ -772,7 +772,7 @@
       "steppedLine": false,
       "targets": [
         {
-          "expr": "avg(openstack_http_response_times{service=\"neutron\",quantile=\"0.9\",host=~\"^$host$\",http_status=~\"2..\"}) by (http_method)",
+          "expr": "avg(openstack_http_response_times{service=\"neutron-server\",quantile=\"0.9\",host=~\"^$host$\",http_status=~\"2..\"}) by (http_method)",
           "format": "time_series",
           "intervalFactor": 2,
           "legendFormat": "{{http_method}}",
@@ -1379,7 +1379,7 @@
         "multi": true,
         "name": "host",
         "options": [],
-        "query": "label_values(openstack_http_response_times{service=\"neutron\"},host)",
+        "query": "label_values(openstack_http_response_times{service=\"neutron-server\"},host)",
         "refresh": 1,
         "regex": "",
         "sort": 1,
diff --git a/neutron/meta/fluentd.yml b/neutron/meta/fluentd.yml
index 39adee7..92ef2eb 100644
--- a/neutron/meta/fluentd.yml
+++ b/neutron/meta/fluentd.yml
@@ -83,7 +83,7 @@
                 desc: Total number of log lines by severity
             label:
               - name: service
-                value: neutron
+                value: ${programname}
               - name: level
                 value: ${severity_label}
               - name: host
@@ -104,7 +104,7 @@
               - name: http_status
                 value: ${http_status}
               - name: service
-                value: neutron
+                value: ${programname}
               - name: host
                 value: ${Hostname}
 {% endif %}
diff --git a/neutron/meta/prometheus.yml b/neutron/meta/prometheus.yml
index d6ff28e..be9d05b 100644
--- a/neutron/meta/prometheus.yml
+++ b/neutron/meta/prometheus.yml
@@ -100,14 +100,14 @@
     NeutronErrorLogsTooHigh:
       {%- set log_threshold = monitoring.error_log_rate|float %}
       if: >-
-        sum(rate(log_messages{service="neutron",level=~"(?i:(error|emergency|fatal))"}[5m])) without (level) > {{ log_threshold }}
+        sum(rate(log_messages{service=~"neutron.*",level=~"(?i:(error|emergency|fatal))"}[5m])) without (level) > {{ log_threshold }}
 {%- raw %}
       labels:
         severity: warning
         service: neutron
       annotations:
-        summary: "High number of errors in Neutron logs"
-        description: "The average per-second rate of errors in Neutron logs on the {{ $labels.host }} node is {{ $value }} (as measured over the last 5 minutes)."
+        summary: "High number of errors in {{ $labels.service }} logs"
+        description: "The average per-second rate of errors in {{ $labels.service }} logs on the {{ $labels.host }} node is {{ $value }} (as measured over the last 5 minutes)."
 {%- endraw %}
 {%- endif %}
 {%- endif %}