Commit d7006e43 authored by Tristan Cavelier's avatar Tristan Cavelier

monitor: add configuration for monitor httpd promise

parent 693c0dc4
......@@ -89,7 +89,7 @@ recipe = slapos.recipe.template:jinja2
filename = template-monitor.cfg
template = ${:_profile_base_location_}/instance-monitor.cfg.jinja2.in
rendered = ${buildout:directory}/template-monitor.cfg
md5sum = 794e7fd74bca86ea5e74a29cde21b836
md5sum = 4110e1857c328a9fba7e47c3e72d02b2
context =
key apache_location apache:location
key gzip_location gzip:location
......@@ -104,9 +104,9 @@ context =
raw dash_executable_location ${dash:location}/bin/dash
raw dcron_executable_location ${dcron:location}/sbin/crond
raw logrotate_executable_location ${logrotate:location}/usr/sbin/logrotate
raw monitor_httpd_promise_conf ${monitor-httpd-promise-conf:location}/${monitor-httpd-promise-conf:filename}
raw monitor_httpd_template ${monitor-httpd-conf:location}/${monitor-httpd-conf:filename}
raw monitor_service_run ${monitor-service-template-run:location}/${monitor-service-template-run:filename}
raw monitor_service_template_conf ${monitor-service-template-conf:location}/${monitor-service-template-conf:filename}
raw openssl_executable_location ${openssl:location}/bin/openssl
raw python_executable ${buildout:executable}
raw promise_executor_py ${run-promise-py:location}/${run-promise-py:filename}
......@@ -120,13 +120,11 @@ md5sum = 5be55c3918daa9cc9f8425bfc40e70b1
filename = monitor-httpd.conf.in
mode = 0644
[monitor-service-template-conf]
recipe = hexagonit.recipe.download
[monitor-httpd-promise-conf]
<= monitor-download-base
url = ${:_profile_base_location_}/templates/${:filename}
download-only = true
md5sum = 24885347932935fac93e8bc2a80ec7a2
filename = monitor-service.conf.in
mode = 0644
filename = monitor-httpd-promise.conf.in
md5sum = 5913d2a0096b50537f394a49b762b3e5
[monitor-service-template-run]
recipe = hexagonit.recipe.download
......
......@@ -231,12 +231,29 @@ context =
[monitor-httpd-promise]
recipe = slapos.cookbook:check_url_available
path = ${directory:promises}/monitor-httpd-listening-on-tcp
path = ${directory:promises}/${:filename}
filename = monitor-httpd-listening-on-tcp
url = ${monitor-httpd-conf-parameter:url}
check-secure = 1
dash_path = {{ dash_executable_location }}
curl_path = {{ curl_executable_location }}
[monitor-httpd-promise-conf]
recipe = slapos.recipe.template:jinja2
rendered = ${monitor-directory:services-conf}/monitor-httpd-promise.conf
template = {{ monitor_httpd_promise_conf }}
context = section parameter_dict monitor-httpd-promise-conf-parameter
[monitor-httpd-promise-conf-parameter]
title = Monitor httpd listening
name = ${monitor-httpd-promise:filename}
# frequency minute hour day mounth weekday
frequency = * * * * *
#promise-path =
#interface-path =
public-path-list = ${monitor-httpd-conf-parameter:access-log} ${monitor-httpd-conf-parameter:error-log}
#private-path-list =
[monitor-publish]
recipe = slapos.cookbook:publish
monitor_url_v6 = ${monitor-httpd-conf-parameter:url}
......@@ -256,5 +273,5 @@ parts =
monitor-conf
start-monitor
ca-httpd
monitor-httpd-promise
monitor-httpd-promise-conf
monitor-publish
[service]
{% for key, value in parameter_dict.items() -%}
{{ key }} = {{ value.strip().replace("\n", "\n ") }}
{% endfor -%}
[service]
name = {{ name }}
title = {{ title }}
frequency = {{ frequency }}
script-path = {{ script_path }}
public-path-list =
{{ public_path_list.split() | join('\n ') }}
private-path-list =
{{ private_path_list.split() | join('\n ') }}
[parameter]
{% for key, value in parameters.iteritems() -%}
{{ key }} = {{ value }}
{% endfor -%}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment