Make Heka collect MariaDB logs

Partially implements: blueprint heka
Change-Id: Ib5e740683cee296bcac69228f525594850d62a27
This commit is contained in:
Éric Lemoine
2016-02-03 16:55:45 +01:00
committed by SamYaple
parent 7fb0971fb6
commit 4445c81991
7 changed files with 29 additions and 0 deletions

View File

@@ -23,6 +23,14 @@ if [[ $(stat -c %U:%G /var/lib/mysql) != "mysql:mysql" ]]; then
sudo chown mysql: /var/lib/mysql
fi
# Create log directory, with appropriate permissions
if [[ ! -d "/var/log/kolla/mariadb" ]]; then
mkdir -p /var/log/kolla/mariadb
fi
if [[ $(stat -c %a /var/log/kolla/mariadb) != "755" ]]; then
chmod 755 /var/log/kolla/mariadb
fi
# This catches all cases of the BOOTSTRAP variable being set, including empty
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]] && [[ ! -e /var/lib/mysql/cluster.exists ]]; then
ARGS="--wsrep-new-cluster"