Merge "Add Prometheus alert for API availability"
diff --git a/glance/meta/prometheus.yml b/glance/meta/prometheus.yml
new file mode 100644
index 0000000..4b1f8e1
--- /dev/null
+++ b/glance/meta/prometheus.yml
@@ -0,0 +1,18 @@
+{%- if pillar.glance.server is defined and pillar.glance.server.get('enabled') %}
+{% raw %}
+server:
+  alert:
+    GlanceAPIDown:
+      if: >-
+        max(openstack_api_check_status{service=~"glance.+"}) by (service) == 0
+      for: 2m
+      labels:
+        severity: down
+        service: "{{ $labels.service }}"
+      annotations:
+        summary: "Endpoint check for '{{ $labels.service }}' is down"
+        description: >-
+            Endpoint check for '{{ $labels.service }}' is down for 2 minutes
+{% endraw %}
+{%- endif %}
+
diff --git a/metadata/service/support.yml b/metadata/service/support.yml
index 30f66d4..39ef63a 100644
--- a/metadata/service/support.yml
+++ b/metadata/service/support.yml
@@ -13,3 +13,5 @@
         enabled: true
       grafana:
         enabled: true
+      prometheus:
+        enabled: true