Add Prometheus alert for API availability
Change-Id: I6ed2707d19c3d475741affb94940628c6c76b4c5
diff --git a/keystone/meta/prometheus.yml b/keystone/meta/prometheus.yml
new file mode 100644
index 0000000..24186df
--- /dev/null
+++ b/keystone/meta/prometheus.yml
@@ -0,0 +1,18 @@
+{%- if pillar.keystone.server is defined and pillar.keystone.server.get('enabled') %}
+{% raw %}
+server:
+ alert:
+ KeystoneAPIDown:
+ if: >-
+ max(openstack_api_check_status{service=~"keystone.+"}) 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 25c2402..413387b 100644
--- a/metadata/service/support.yml
+++ b/metadata/service/support.yml
@@ -15,3 +15,5 @@
enabled: true
telegraf:
enabled: true
+ prometheus:
+ enabled: true