Commit 4c0d4d6f authored by Hardik Juneja's avatar Hardik Juneja Committed by Rafael Monnerat

erp5: Added slap parameters neded by apachedex and mariadb

parent bbd02230
...@@ -27,7 +27,7 @@ md5sum = 356e0e2db1da0e8b479908fb739e5cc0 ...@@ -27,7 +27,7 @@ md5sum = 356e0e2db1da0e8b479908fb739e5cc0
[template-mariadb] [template-mariadb]
filename = instance-mariadb.cfg.in filename = instance-mariadb.cfg.in
md5sum = aac99b03aa10b60e2b17d6882513b5bd md5sum = 7ee2e801dda1181d1b42281e6466fc4d
[template-kumofs] [template-kumofs]
filename = instance-kumofs.cfg.in filename = instance-kumofs.cfg.in
...@@ -87,7 +87,7 @@ md5sum = d41d8cd98f00b204e9800998ecf8427e ...@@ -87,7 +87,7 @@ md5sum = d41d8cd98f00b204e9800998ecf8427e
[template-erp5] [template-erp5]
filename = instance-erp5.cfg.in filename = instance-erp5.cfg.in
md5sum = 52ac560be07f254618631b84d2d58f41 md5sum = bf28cc3cde65b251cabbeb285a45bdc7
[template-zeo] [template-zeo]
filename = instance-zeo.cfg.in filename = instance-zeo.cfg.in
...@@ -99,7 +99,7 @@ md5sum = a2377d5c53fd2a441ea713b428e4844b ...@@ -99,7 +99,7 @@ md5sum = a2377d5c53fd2a441ea713b428e4844b
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
md5sum = 79fc39f7fbf13b1788adb5c33150dd80 md5sum = c53f977a9ff5683013d2712e4d11cb28
[apdex-result-check-script] [apdex-result-check-script]
filename = instance-balancer-check-apachedex-result.sh.in filename = instance-balancer-check-apachedex-result.sh.in
......
...@@ -291,15 +291,14 @@ command-line = "{{ parameter_dict['run-apachedex-location'] }}" "{{ parameter_di ...@@ -291,15 +291,14 @@ command-line = "{{ parameter_dict['run-apachedex-location'] }}" "{{ parameter_di
command = apachedex_every_3_hour command = apachedex_every_3_hour
[apachedex-parameters] [apachedex-parameters]
default_parameter =
# XXX - Sample log file with curent date: apache_access.log-%(date)s.gz # XXX - Sample log file with curent date: apache_access.log-%(date)s.gz
# which will be equivalent to apache_access.log-20150112.gz if the date is 2015-01-12 # which will be equivalent to apache_access.log-20150112.gz if the date is 2015-01-12
apache-log-list = ${apache-conf-parameter-dict:access-log} apache-log-list = ${apache-conf-parameter-dict:access-log}
default = ${monitor-directory:etc}/apdex_default default = {{ slapparameter_dict['apachedex-default'] }}
base-list = ${monitor-directory:etc}/apdex_base_list base-list = {{ slapparameter_dict['apachedex-base-list'] }}
skip-base-list = ${monitor-directory:etc}/apdex_skip_base_list skip-base-list = {{ slapparameter_dict['apachedex-skip-base-list'] }}
erp5-base-list = ${monitor-directory:etc}/apdex_erp5_base_list erp5-base-list = {{ slapparameter_dict['apachedex-erp5-base-list'] }}
apdex-promise-threshold = ${monitor-directory:etc}/apdex-promise-threshold promise-threshold = {{ slapparameter_dict['apachedex-promise-threshold'] }}
[{{ section('monitor-promise-apachedex-result') }}] [{{ section('monitor-promise-apachedex-result') }}]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
...@@ -307,23 +306,16 @@ template = {{ parameter_dict['apdex-result-check-script'] }} ...@@ -307,23 +306,16 @@ template = {{ parameter_dict['apdex-result-check-script'] }}
rendered = ${monitor-directory:promises}/check-apachedex-result rendered = ${monitor-directory:promises}/check-apachedex-result
status-file = ${monitor-directory:private}/apachedex.report.json status-file = ${monitor-directory:private}/apachedex.report.json
context = context =
raw default_threshold 0.7
raw bash {{ parameter_dict['bash'] }}/bin/bash raw bash {{ parameter_dict['bash'] }}/bin/bash
raw user_threshold ${apachedex-parameters:promise-threshold}
key apdex_file directory:apachedex key apdex_file directory:apachedex
key apdex_status_file :status-file key apdex_status_file :status-file
key user_threshold apachedex-parameters:apdex-promise-threshold
[monitor-instance-parameter] [monitor-instance-parameter]
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }} monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-port = {{ next_port() }} monitor-httpd-port = {{ next_port() }}
monitor-title = {{ slapparameter_dict['name'] }} monitor-title = {{ slapparameter_dict['name'] }}
password = {{ slapparameter_dict['monitor-passwd'] }} password = {{ slapparameter_dict['monitor-passwd'] }}
instance-configuration =
file apachedex-default ${apachedex-parameters:default}
file apachedex-base-list ${apachedex-parameters:base-list}
file apachedex-skip-base-list ${apachedex-parameters:skip-base-list}
file apachedex-erp5-base-list ${apachedex-parameters:erp5-base-list}
file apachedex-erp5-promise-threshold ${apachedex-parameters:apdex-promise-threshold}
[buildout] [buildout]
extends = extends =
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
{% set jupyter_zope_family = jupyter_dict.get('zope-family', '') -%} {% set jupyter_zope_family = jupyter_dict.get('zope-family', '') -%}
{% set monitor_base_url_dict = {} -%} {% set monitor_base_url_dict = {} -%}
{% set caucase_url = slapparameter_dict.get('caucase', {}).pop('url', '') -%} {% set caucase_url = slapparameter_dict.get('caucase', {}).pop('url', '') -%}
{% set monitor_dict = slapparameter_dict.get('monitor', {}) %}
{% set crl_update_period = slapparameter_dict.get('caucase', {}).pop('crl-update-periodicity', 'daily') -%} {% set crl_update_period = slapparameter_dict.get('caucase', {}).pop('crl-update-periodicity', 'daily') -%}
[request-common] [request-common]
<= request-common-base <= request-common-base
...@@ -44,7 +45,7 @@ config-name = {{ name }} ...@@ -44,7 +45,7 @@ config-name = {{ name }}
{{ request('memcached-persistent', 'kumofs', 'kumofs', {'tcpv4-port': 2000}, {'url': True, 'monitor-base-url': False}, key_config={'monitor-passwd': 'monitor-htpasswd:passwd'}) }} {{ request('memcached-persistent', 'kumofs', 'kumofs', {'tcpv4-port': 2000}, {'url': True, 'monitor-base-url': False}, key_config={'monitor-passwd': 'monitor-htpasswd:passwd'}) }}
{{ request('memcached-volatile', 'kumofs', 'memcached', {'tcpv4-port': 2010, 'ram-storage-size': 64}, {'url': True, 'monitor-base-url': False}, key_config={'monitor-passwd': 'monitor-htpasswd:passwd'}) }} {{ request('memcached-volatile', 'kumofs', 'memcached', {'tcpv4-port': 2010, 'ram-storage-size': 64}, {'url': True, 'monitor-base-url': False}, key_config={'monitor-passwd': 'monitor-htpasswd:passwd'}) }}
{{ request('cloudooo', 'cloudooo', 'cloudooo', {'tcpv4-port': 2020}, {'url': True, 'monitor-base-url': False}, key_config={'monitor-passwd': 'monitor-htpasswd:passwd'}) }} {{ request('cloudooo', 'cloudooo', 'cloudooo', {'tcpv4-port': 2020}, {'url': True, 'monitor-base-url': False}, key_config={'monitor-passwd': 'monitor-htpasswd:passwd'}) }}
{{ request('mariadb', 'mariadb', 'mariadb', {'tcpv4-port': 2099}, {'database-list': True, 'test-database-list': True, 'monitor-base-url': False}, key_config={'monitor-passwd': 'monitor-htpasswd:passwd'}) }} {{ request('mariadb', 'mariadb', 'mariadb', {'tcpv4-port': 2099, 'max-slowqueries-threshold': monitor_dict.get('max-slowqueries-threshold', 1000), 'slowest-query-threshold': monitor_dict.get('slowest-query-threshold', '') }, {'database-list': True, 'test-database-list': True, 'monitor-base-url': False}, key_config={'monitor-passwd': 'monitor-htpasswd:passwd'}) }}
{% if has_posftix -%} {% if has_posftix -%}
{{ request('smtp', 'postfix', 'smtp', {'tcpv4-port': 2025, 'smtpd-sasl-user': 'erp5@nowhere'}, key_config={'smtpd-sasl-password': 'publish-early:smtpd-sasl-password'}) }} {{ request('smtp', 'postfix', 'smtp', {'tcpv4-port': 2025, 'smtpd-sasl-user': 'erp5@nowhere'}, key_config={'smtpd-sasl-password': 'publish-early:smtpd-sasl-password'}) }}
{%- else %} {%- else %}
...@@ -281,6 +282,11 @@ config-caucase-url = ${request-caucase:connection-http-url} ...@@ -281,6 +282,11 @@ config-caucase-url = ${request-caucase:connection-http-url}
config-crl-update-periodicity = {{ crl_update_period }} config-crl-update-periodicity = {{ crl_update_period }}
config-backend-path-dict = {{ dumps(zope_backend_path_dict) }} config-backend-path-dict = {{ dumps(zope_backend_path_dict) }}
config-ssl-authentication-dict = {{ dumps(ssl_authentication_dict) }} config-ssl-authentication-dict = {{ dumps(ssl_authentication_dict) }}
config-apachedex-default = {{ dumps(monitor_dict.get('apachedex-default', '')) }}
config-apachedex-base-list = {{ dumps(monitor_dict.get('apachedex-base-list', '')) }}
config-apachedex-erp5-base-list = {{ dumps(monitor_dict.get('apachedex-erp5-base-list', '')) }}
config-apachedex-skip-base-list = {{ dumps(monitor_dict.get('apachedex-skip-base-list', '')) }}
config-apachedex-promise-threshold = {{ dumps(monitor_dict.get('apachedex-promise-threshold', 0.5)) }}
[request-frontend-base] [request-frontend-base]
{% if has_frontend -%} {% if has_frontend -%}
......
...@@ -290,9 +290,9 @@ context = ...@@ -290,9 +290,9 @@ context =
raw dash {{ parameter_dict['dash-location'] }}/bin/dash raw dash {{ parameter_dict['dash-location'] }}/bin/dash
key output_folder monitor-directory:private key output_folder monitor-directory:private
[slowquery-parameters] [slow-query-digest-parameters]
max-queries-threshold = ${monitor-directory:etc}/max-slowqueries-threshold max_queries_threshold = {{ slapparameter_dict['max-slowqueries-threshold'] }}
slowest-queries-threshold = ${monitor-directory:etc}/slowest-queries-threshold slowest_queries_threshold = {{ slapparameter_dict['slowest-query-threshold'] }}
[{{ section('monitor-promise-slowquery-result') }}] [{{ section('monitor-promise-slowquery-result') }}]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
...@@ -304,8 +304,8 @@ context = ...@@ -304,8 +304,8 @@ context =
raw bash {{ parameter_dict['bash'] }}/bin/bash raw bash {{ parameter_dict['bash'] }}/bin/bash
key slow_query_digest monitor-directory:private key slow_query_digest monitor-directory:private
key slow_query_status :status-file key slow_query_status :status-file
key max_queries_threshold slowquery-parameters:max-queries-threshold key max_queries_threshold slow-query-digest-parameters:max_queries_threshold
key slowest_queries_threshold slowquery-parameters:slowest-queries-threshold key slowest_queries_threshold slow-query-digest-parameters:slowest_queries_threshold
[{{ section('promise') }}] [{{ section('promise') }}]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
...@@ -318,9 +318,6 @@ monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }} ...@@ -318,9 +318,6 @@ monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-port = {{ port + 1 }} monitor-httpd-port = {{ port + 1 }}
monitor-title = {{ slapparameter_dict['name'] }} monitor-title = {{ slapparameter_dict['name'] }}
password = {{ slapparameter_dict['monitor-passwd'] }} password = {{ slapparameter_dict['monitor-passwd'] }}
instance-configuration =
file max-queries-threshold ${slowquery-parameters:max-queries-threshold}
file slowest-queries-threshold ${slowquery-parameters:slowest-queries-threshold}
[buildout] [buildout]
extends = extends =
......
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