Browse Source

Fixes Various Anemometer issue

old-stable
gau1991 10 years ago
parent
commit
0d420a5dbf
  1. 2
      src/lib/ee_lib_import_slow_log.sh
  2. 5
      src/vendor/ee_ven_install_utils.sh

2
src/lib/ee_lib_import_slow_log.sh

@ -16,7 +16,7 @@ function ee_lib_import_slow_log()
pt-query-digest --user=anemometer --password=anemometer_password \ pt-query-digest --user=anemometer --password=anemometer_password \
--review D=slow_query_log,t=global_query_review \ --review D=slow_query_log,t=global_query_review \
--${ee_anemometer_history} D=slow_query_log,t=global_query_review_history \ --${ee_anemometer_history} D=slow_query_log,t=global_query_review_history \
--no-report --limit=0% --filter=" \$event->{Bytes} = length(\$event->{arg}) and \$event->{hostname}=\"$EE_MYSQL_GRANT_HOST\"" /var/log/mysql/mysql-slow.log --no-report --limit=0% --filter=" \$event->{Bytes} = length(\$event->{arg}) and \$event->{hostname}=\"anemometer-mysql\"" /var/log/mysql/mysql-slow.log
else else
ee_lib_echo_fail "Failed to find MySQL slow log file, enable MySQL slow log" ee_lib_echo_fail "Failed to find MySQL slow log file, enable MySQL slow log"
fi fi

5
src/vendor/ee_ven_install_utils.sh

@ -100,6 +100,11 @@ function ee_ven_install_utils()
sed -i "s/root/anemometer/g" /var/www/22222/htdocs/db/anemometer/conf/config.inc.php sed -i "s/root/anemometer/g" /var/www/22222/htdocs/db/anemometer/conf/config.inc.php
sed -i "/password/ s/''/'$ee_anemometer_pass'/g" /var/www/22222/htdocs/db/anemometer/conf/config.inc.php sed -i "/password/ s/''/'$ee_anemometer_pass'/g" /var/www/22222/htdocs/db/anemometer/conf/config.inc.php
sed -i "s/'host' => 'localhost',/'host' => '$EE_MYSQL_HOST',/g" /var/www/22222/htdocs/db/anemometer/conf/config.inc.php
# Chane Anemometer Hostname in ee_lib_import_slow_log
sed -i "s:hostname.*:hostname}=\\\\\"$EE_MYSQL_HOST\\\\\"\" /var/log/mysql/mysql-slow.log:" /usr/local/lib/easyengine/lib/ee_lib_import_slow_log.sh \
|| ee_lib_error "Unable to change Anemometer hostnameme, exit status = " $?
# Change Anemometer password in ee_lib_import_slow_log # Change Anemometer password in ee_lib_import_slow_log
sed -i "s/--password.*/--password=${ee_anemometer_pass} \\\/" /usr/local/lib/easyengine/lib/ee_lib_import_slow_log.sh \ sed -i "s/--password.*/--password=${ee_anemometer_pass} \\\/" /usr/local/lib/easyengine/lib/ee_lib_import_slow_log.sh \

Loading…
Cancel
Save