Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SlapOS Develop
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Eric Zheng
SlapOS Develop
Commits
2053a3ef
Commit
2053a3ef
authored
Aug 11, 2017
by
Hardik Juneja
Committed by
Rafael Monnerat
Aug 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stack/erp5: Accept apachdex parameters as raw text
parent
4c0d4d6f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
16 deletions
+11
-16
stack/erp5/buildout.hash.cfg
stack/erp5/buildout.hash.cfg
+3
-3
stack/erp5/instance-balancer-check-apachedex-result.sh.in
stack/erp5/instance-balancer-check-apachedex-result.sh.in
+3
-3
stack/erp5/instance-balancer.cfg.in
stack/erp5/instance-balancer.cfg.in
+2
-5
stack/erp5/instance-erp5.cfg.in
stack/erp5/instance-erp5.cfg.in
+3
-5
No files found.
stack/erp5/buildout.hash.cfg
View file @
2053a3ef
...
...
@@ -87,7 +87,7 @@ md5sum = d41d8cd98f00b204e9800998ecf8427e
[template-erp5]
filename = instance-erp5.cfg.in
md5sum =
bf28cc3cde65b251cabbeb285a45bdc7
md5sum =
8d9420da8f22dd41d5f076d7506a6620
[template-zeo]
filename = instance-zeo.cfg.in
...
...
@@ -99,11 +99,11 @@ md5sum = a2377d5c53fd2a441ea713b428e4844b
[template-balancer]
filename = instance-balancer.cfg.in
md5sum =
c53f977a9ff5683013d2712e4d11cb28
md5sum =
d14ee7f13e2bd815cc96e28101e59670
[apdex-result-check-script]
filename = instance-balancer-check-apachedex-result.sh.in
md5sum =
cdc5e22560a26e072bade314bd4c506e
md5sum =
421c68c97cadc49911382cd3185288a1
[template-haproxy-cfg]
filename = haproxy.cfg.in
...
...
stack/erp5/instance-balancer-check-apachedex-result.sh.in
View file @
2053a3ef
...
...
@@ -29,12 +29,12 @@ if [ ! -s "$APACHEDEX_FILE" ]; then
else
# Check if the result exists
{
REGEX
=
"
<th>apdex.*?<tr>
<td [^<]*>(.*?)%<
\/
td>"
FILE_CONTENT
=
`
cat
$APACHDEX_FILE
`
REGEX
=
"
Overall<
\/
h2><table .*><tr>[[:space:]]<th>apdex<
\/
th><th>.*?<tr>[[:space:]]
<td [^<]*>(.*?)%<
\/
td>"
FILE_CONTENT
=
`
cat
$APACH
E
DEX_FILE
`
if
[[
$FILE_CONTENT
=
~
$REGEX
]]
then
RESULT
=
${
BASH_REMATCH
[1]
}
RESULT
=
${
THRESHOLD
:-
0
}
RESULT
=
${
RESULT
:-
0
}
if
[[
`
echo
"
$RESULT
>
$DESIRED_THRESHOLD
"
| bc
`
-eq
1
]]
then
echo
"Your score is
$RESULT
%, Thanks for keeping it all clean"
...
...
stack/erp5/instance-balancer.cfg.in
View file @
2053a3ef
...
...
@@ -287,17 +287,14 @@ apachedex = ${monitor-directory:private}/apachedex
[{{ section('monitor-generate-apachedex-report') }}]
recipe = slapos.cookbook:wrapper
wrapper-path = ${monitor-directory:reports}/${:command}
command-line = "{{ parameter_dict['run-apachedex-location'] }}" "{{ parameter_dict['apachedex-location'] }}" "${directory:apachedex}" ${monitor-publish-parameters:monitor-base-url}/private/apachedex --
default "${apachedex-parameters:default}" --apache-log-list "${apachedex-parameters:apache-log-list}" --base-list "${apachedex-parameters:base-list}" --skip-base-list "${apachedex-parameters:skip-base-list}" --erp5-base-list "${apachedex-parameters:erp5-base-list
}"
command-line = "{{ parameter_dict['run-apachedex-location'] }}" "{{ parameter_dict['apachedex-location'] }}" "${directory:apachedex}" ${monitor-publish-parameters:monitor-base-url}/private/apachedex --
apache-log-list "${apachedex-parameters:apache-log-list}" --config "${apachedex-parameters:configuration
}"
command = apachedex_every_3_hour
[apachedex-parameters]
# 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
apache-log-list = ${apache-conf-parameter-dict:access-log}
default = {{ slapparameter_dict['apachedex-default'] }}
base-list = {{ slapparameter_dict['apachedex-base-list'] }}
skip-base-list = {{ slapparameter_dict['apachedex-skip-base-list'] }}
erp5-base-list = {{ slapparameter_dict['apachedex-erp5-base-list'] }}
configuration = {{ slapparameter_dict['apachedex-configuration'] }}
promise-threshold = {{ slapparameter_dict['apachedex-promise-threshold'] }}
[{{ section('monitor-promise-apachedex-result') }}]
...
...
stack/erp5/instance-erp5.cfg.in
View file @
2053a3ef
...
...
@@ -282,11 +282,9 @@ config-caucase-url = ${request-caucase:connection-http-url}
config-crl-update-periodicity = {{ crl_update_period }}
config-backend-path-dict = {{ dumps(zope_backend_path_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)) }}
config-apachedex-promise-threshold = {{ dumps(monitor_dict.get('apachedex-promise-threshold', 70)) }}
config-apachedex-configuration = {{ dumps(monitor_dict.get('apachedex-configuration',
'--erp5-base "/erp5(/|$|/\?)" --skip-user-agent Zabbix --error-detail --js-embed --quiet')) }}
[request-frontend-base]
{% if has_frontend -%}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment