--- # # Performance checks specific to controller hosts # - name: Check max_connections on the database shell: mysql -e "show variables like 'max_connections';" | grep max_connections | awk '{print $2}' register: bz1266253 changed_when: no failed_when: bz1266253.stdout|int < mariadb_max_connections ignore_errors: yes - name: Suggested buffer_pool_size shell: mysql -Bse "SELECT CEILING(Total_InnoDB_Bytes*1.6/POWER(1024,2)) RIBPS FROM (SELECT SUM(data_length+index_length) Total_InnoDB_Bytes FROM information_schema.tables WHERE engine='InnoDB') A;" register: suggested_buffer_pool_size changed_when: no ignore_errors: yes - name : Current buffer_pool_size shell: echo $(mysql -Bse " select @@innodb_buffer_pool_size")/1024/1024 | bc register: buffer_pool_size failed_when: buffer_pool_size.stdout|int < suggested_buffer_pool_size.stdout|int changed_when: no ignore_errors: yes - name : File descriptors for the mysql process shell: cat /proc/$(pgrep mysqld_safe)/limits | grep "open files" | awk '{print $4}' register: mysqld_safe_soft_fd failed_when: mysqld_safe_soft_fd.stdout|int < mysqld_soft_fd changed_when: no ignore_errors: yes - name : Check rabbitmq file descriptors shell: rabbitmqctl status | grep total_limit | awk -F',' '{print $2}' | sed 's/.$//' register: bz1282491 changed_when: no failed_when: bz1282491.stdout|int < rabbitmq_fd ignore_errors: yes - name: Run MySQL Tuner script script: mysqltuner.pl --nocolor register: mysql_out ignore_errors: yes