Merge "Allow Travis CI to run parallel tests"
diff --git a/glance/map.jinja b/glance/map.jinja
index d011473..0125457 100644
--- a/glance/map.jinja
+++ b/glance/map.jinja
@@ -32,3 +32,9 @@
         'pkgs': ['python-glanceclient']
     },
 }, merge=pillar.glance.get('client', {})) %}
+
+{% set monitoring = salt['grains.filter_by']({
+    'default': {
+        'error_log_rate': 0.2,
+    },
+}, grain='os_family', merge=salt['pillar.get']('glance:monitoring')) %}
diff --git a/glance/meta/prometheus.yml b/glance/meta/prometheus.yml
index 7085f59..b72cbbc 100644
--- a/glance/meta/prometheus.yml
+++ b/glance/meta/prometheus.yml
@@ -1,4 +1,5 @@
 {%- if pillar.glance.server is defined and pillar.glance.server.get('enabled') %}
+{%- from "glance/map.jinja" import monitoring with context %}
 {% raw %}
 server:
   alert:
@@ -15,9 +16,9 @@
             Endpoint check for '{{ $labels.service }}' is down for 2 minutes
     GlanceErrorLogsTooHigh:
 {%- endraw %}
-      {%- set log_threshold = prometheus_server.get('alert', {}).get('GlanceErrorLogsTooHigh', {}).get('var', {}).get('threshold', 0.2 ) %}
+      {%- set log_threshold = monitoring.error_log_rate|float %}
       if: >-
-        sum(rate(log_messages{service="cinder",level=~"error|emergency|fatal"}[5m])) without (level) > {{ log_threshold }}
+        sum(rate(log_messages{service="glance",level=~"error|emergency|fatal"}[5m])) without (level) > {{ log_threshold }}
 {%- raw %}
       labels:
         severity: warning