Release 10.3.0 #120

Manually merged
jlecour merged 51 commits from unstable into stable 2020-12-21 16:12:23 +01:00
2 changed files with 11 additions and 0 deletions
Showing only changes of commit 18ac1e7279 - Show all commits

View file

@ -18,6 +18,7 @@ The **patch** part changes incrementally at each release.
* mysql: install save_mysql_processlist script
* nextcloud: New role to setup a nextcloud instance
* redis: variable to force use of port 6379 in instances mode
* redis: check maxmemory in NRPE check
* lxc-php: Allow php containers to contact local MySQL with localhost
### Changed

View file

@ -30,11 +30,21 @@ check_server() {
host=$(config_var "bind" "${conf_file}")
port=$(config_var "port" "${conf_file}")
pass=$(config_var "requirepass" "${conf_file}")
maxmemory=$(config_var "maxmemory" "${conf_file}")
maxmemory_policy=$(config_var "maxmemory-policy" "${conf_file}")
cmd="${check_bin} -H ${host} -p ${port}"
# If "requirepass" is set we add the password to the check
if [ -n "${pass}" ]; then
cmd="${cmd} -x ${pass}"
fi
# If "maxmemory" is set and "maxmemory-policy" is missing or set to "noeviction"
# then we enforce the "maxmemory" limit
if [ -n "${maxmemory}" ]; then
if [ -z "${maxmemory_policy}" ] || [ "${maxmemory_policy}" = "noeviction" ]; then
cmd="${cmd} --total_memory ${maxmemory} --memory_utilization 80,90"
fi
fi
result=$($cmd)
ret="${?}"
if [ "${ret}" -ge 2 ]; then