Fix grains generation
diff --git a/nginx/meta/sensu.yml b/nginx/meta/sensu.yml
index d9417c3..421f4b3 100644
--- a/nginx/meta/sensu.yml
+++ b/nginx/meta/sensu.yml
@@ -1,25 +1,26 @@
{%- from "nginx/map.jinja" import server with context -%}
-local_nginx_server_proc:
- command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -C nginx -u root -c 1:1"
- interval: 60
- occurrences: 1
- subscribers:
- - local-nginx-server
-local_nginx_server_worker_procs:
- command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -C nginx -u www-data -c 1:20"
- interval: 60
- occurrences: 1
- subscribers:
- - local-nginx-server
-{%- for site_name, site in server.get('site', {}).iteritems() %}
-{%- if site.enabled %}
-{%- if site.get('check', True) %}
-remote_nginx_server_http_{{ site.host.name }}_{{ site.host.get('port', '80') }}:
- command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_http -H {{ site.host.name }} -p {{ site.host.get('port', '80') }} -w 5 -c 10 -f follow{% if site.get('ssl', {}).get('enabled', False) %} -S{% endif %}"
- interval: 60
- occurrences: 2
- subscribers:
- - remote-network
-{%- endif %}
-{%- endif %}
-{%- endfor %}
\ No newline at end of file
+check:
+ local_nginx_server_proc:
+ command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -C nginx -u root -c 1:1"
+ interval: 60
+ occurrences: 1
+ subscribers:
+ - local-nginx-server
+ local_nginx_server_worker_procs:
+ command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -C nginx -u www-data -c 1:20"
+ interval: 60
+ occurrences: 1
+ subscribers:
+ - local-nginx-server
+ {%- for site_name, site in server.get('site', {}).iteritems() %}
+ {%- if site.enabled %}
+ {%- if site.get('check', True) %}
+ remote_nginx_server_http_{{ site.host.name }}_{{ site.host.get('port', '80') }}:
+ command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_http -H {{ site.host.name }} -p {{ site.host.get('port', '80') }} -w 5 -c 10 -f follow{% if site.get('ssl', {}).get('enabled', False) %} -S{% endif %}"
+ interval: 60
+ occurrences: 2
+ subscribers:
+ - remote-network
+ {%- endif %}
+ {%- endif %}
+ {%- endfor %}
\ No newline at end of file
diff --git a/nginx/meta/sphinx.yml b/nginx/meta/sphinx.yml
index f3e5214..14eab14 100644
--- a/nginx/meta/sphinx.yml
+++ b/nginx/meta/sphinx.yml
@@ -1,22 +1,23 @@
{%- from "nginx/map.jinja" import server with context -%}
-name: Nginx
-description: Nginx is an open source reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer, HTTP cache, and a web server (origin server). The nginx project started with a strong focus on high concurrency, high performance and low memory usage.
-role:
- server:
- name: Server
- param:
- version:
- value: "{{ salt['cmd.run']('nginx -v')|replace("nginx version: ", '') }}"
- bind_host:
- name: Bind host
- value: {{ server.bind.address }}
- endpoint:
-{%- for site_name, site in server.get('site', {}).iteritems() %}
-{%- if site.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
+doc:
+ name: Nginx
+ description: Nginx is an open source reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer, HTTP cache, and a web server (origin server). The nginx project started with a strong focus on high concurrency, high performance and low memory usage.
+ role:
+ server:
+ name: Server
+ param:
+ version:
+ value: "{{ salt['cmd.run']('nginx -v')|replace("nginx version: ", '') }}"
+ bind_host:
+ name: Bind host
+ value: {{ server.bind.address }}
+ endpoint:
+ {%- for site_name, site in server.get('site', {}).iteritems() %}
+ {%- if site.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