Merge "Add prometheus main dashboard"
diff --git a/nginx/files/grafana_dashboards/nginx_prometheus.json b/nginx/files/grafana_dashboards/nginx_prometheus.json
index 16b6f82..7b608c5 100644
--- a/nginx/files/grafana_dashboards/nginx_prometheus.json
+++ b/nginx/files/grafana_dashboards/nginx_prometheus.json
@@ -19,8 +19,8 @@
           "colorValue": true,
           "colors": [
             "rgba(245, 54, 54, 0.9)",
-            "rgba(40, 237, 55, 0.89)",
-            "rgba(255, 0, 0, 0.97)"
+            "rgba(237, 129, 40, 0.89)",
+            "rgba(50, 172, 45, 0.97)"
           ],
           "datasource": "prometheus",
           "format": "none",
@@ -76,7 +76,7 @@
               "step": 20
             }
           ],
-          "thresholds": "1,3",
+          "thresholds": "0.5,0.5",
           "title": "Status",
           "type": "singlestat",
           "valueFontSize": "80%",
diff --git a/nginx/meta/sphinx.yml b/nginx/meta/sphinx.yml
index 72d75ce..20d1056 100644
--- a/nginx/meta/sphinx.yml
+++ b/nginx/meta/sphinx.yml
@@ -13,11 +13,11 @@
           value: {{ server.bind.address }}
       endpoint:
   {%- for site_name, site in server.get('site', {}).iteritems() %}
-  {%- if site.enabled %}
+  {%- if site.get('enabled') %}
         {{ site_name }}_{{ site.type }}:
           name: {{ site_name }}
           type: {{ site.type }}
           address: http{% if site.get('ssl', {}).get('enabled', False) %}s{% endif %}://{{ site.host.name }}:{{ site.host.get('port', '80') }}/
           protocol: http{% if site.get('ssl', {}).get('enabled', False) %}s{% endif %}
   {%- endif %}
-  {%- endfor %}
\ No newline at end of file
+  {%- endfor %}
diff --git a/nginx/server/sites.sls b/nginx/server/sites.sls
index fb35732..5ccf27e 100644
--- a/nginx/server/sites.sls
+++ b/nginx/server/sites.sls
@@ -3,7 +3,7 @@
 {%- set ssl_certificates = {} %}
 
 {%- for site_name, site in server.get('site', {}).iteritems() %}
-{%- if site.enabled %}
+{%- if site.get('enabled') %}
 
 {%- if site.get('ssl', {'enabled': False}).enabled and site.host.name not in ssl_certificates.keys() %}
 {%- set _dummy = ssl_certificates.update({site.host.name: []}) %}