Openstack API check improvements

- show public endpoint on the dasboard;
- switch from "name" to "service_name" label.
- replace component alerts by generic OpenstackServiceEndpointDown.

Related-PROD: PROD-35549
Change-Id: Idddbc08b3fa355062a621d9f11e2a1db04d4801c
diff --git a/glance/files/grafana_dashboards/glance_prometheus.json b/glance/files/grafana_dashboards/glance_prometheus.json
index 0ff8930..824d7e9 100755
--- a/glance/files/grafana_dashboards/glance_prometheus.json
+++ b/glance/files/grafana_dashboards/glance_prometheus.json
@@ -72,16 +72,15 @@
           "tableColumn": "",
           "targets": [
             {
-              "expr": "min(openstack_api_check_status{service=~\"glance.*\"})",
+              "expr": "openstack_api_check_status{interface=\"public\",service_name=\"glance\"}",
               "format": "time_series",
               "intervalFactor": 2,
-              "legendFormat": "{{ service }}",
               "refId": "A",
               "step": 60
             }
           ],
           "thresholds": "0.5,1.5",
-          "title": "API Availability",
+          "title": "Public VIP API Availability",
           "type": "singlestat",
           "valueFontSize": "80%",
           "valueMaps": [
diff --git a/glance/files/grafana_dashboards/glance_prometheus_fluentd.json b/glance/files/grafana_dashboards/glance_prometheus_fluentd.json
index 2dd3609..9028a6c 100755
--- a/glance/files/grafana_dashboards/glance_prometheus_fluentd.json
+++ b/glance/files/grafana_dashboards/glance_prometheus_fluentd.json
@@ -97,14 +97,14 @@
       "tableColumn": "",
       "targets": [
         {
-          "expr": "min(openstack_api_check_status{name=\"glance\"})",
+          "expr": "openstack_api_check_status{interface=\"public\",service_name=\"glance\"}",
           "format": "time_series",
           "intervalFactor": 2,
           "refId": "A"
         }
       ],
       "thresholds": "0.5,0.5",
-      "title": "VIP API availability",
+      "title": "Public VIP API Availability",
       "type": "singlestat",
       "valueFontSize": "80%",
       "valueMaps": [
diff --git a/glance/meta/grafana.yml b/glance/meta/grafana.yml
index 511d2a0..dcc3472 100644
--- a/glance/meta/grafana.yml
+++ b/glance/meta/grafana.yml
@@ -44,4 +44,4 @@
               type: dashboard
             target:
               cluster_status:
-                expr: avg(openstack_api_check_status{service=~"glance.*"})
+                expr: openstack_api_check_status{interface="public",service_name="glance"}
diff --git a/glance/meta/prometheus.yml b/glance/meta/prometheus.yml
index 077999c..ed15da1 100644
--- a/glance/meta/prometheus.yml
+++ b/glance/meta/prometheus.yml
@@ -4,26 +4,6 @@
 {% raw %}
 server:
   alert:
-    GlanceApiOutage:
-      if: >-
-        openstack_api_check_status{name="glance"} == 0
-      labels:
-        severity: critical
-        service: glance
-      annotations:
-        summary: "Glance API outage"
-        description: >-
-          Glance API is not accessible for the Glance endpoint in the OpenStack service catalog.
-    GlareApiOutage:
-      if: >-
-        openstack_api_check_status{name="glare"} == 0
-      labels:
-        severity: critical
-        service: glance
-      annotations:
-        summary: "Glare API outage"
-        description: >-
-          Glare API is not accessible for the Glare endpoint in the OpenStack service catalog.
     GlanceApiEndpointDown:
       if: >-
         http_response_status{name=~"glance.*"} == 0