Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions monit/files/monitrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
set daemon {{ daemon_check }}

{% if http_access.ssl is defined %}
set httpd port {{ http_access.port }}
with ssl {
{%- for k,v in http_access.ssl.items() %}
{{ k }}: {{ v }}
{%- endfor %}
}
use address {{ http_access.bind }}
{%- else -%}
set httpd port {{ http_access.port }} and
use address {{ http_access.bind }}
{%- endif -%}
{%- for host in http_access.allowed.hosts %}
allow {{ host }}
{%- endfor %}
Expand Down
3 changes: 3 additions & 0 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ monit:
http_access:
port: 2812
bind: 127.0.0.1
ssl:
pemchain: /etc/monit/chain.pem
pemkey: /etc/monit/key.pem
allowed:
users:
- ['user1', 'pass1']
Expand Down