A MySQL database is integral to the operation of OpenStack infrastructure services. Metrics for MySQL performance are available in real-time charts and Alarms. Mulitple MySql clusters can be configured to be monitored.
The availability of MySQL nodes for each of the configured MySQL clusters is recorded periodically. The user can view both the current status, as well as the historical status over a specified period of time by selecting "All Services" > "MySQL" from the context menu at the top and, then "Dashboard" from the left navigation panel.
Each MySQL cluster has a dashboard displaying real-time usage metrics for each of its nodes.
From the context menu at the top, select "All Services" > "SQL". Choose "Charts" view from the left navigation.
An Alarm may be configured for any of the MySQL metrics collected. In the Alarm panel, select the "Service Alarms" module. Then select "mysql" from the Service dropdown. MySQL alarms can be created for one or more MySQL nodes. Additionally, notifications can also be configured for MySQL alarms.
In order for AppFormix to monitor MySQL metrics, there must exist a MySQL user with remote, read-permission. In this guide, we will create a new user with read-only access to the database. Alternately, an existing user account may be used.
Create a read-only user account 'appformix' that can access the MySQL database from any host:
$ mysql -u root -p mysql> grant SELECT on *.* to 'appformix'@'%' identified by 'mypassword'; mysql> flush privileges;
You SHOULD change 'mypassword' to a strong password. Optionally, you may restrict the 'appformix' account to only be able to connect from a specific IP address or hostname by replacing
'%'with the host on which AppFormix Controller runs.
Next, configure the MySQL connection details in AppFormix. From the Settings menu in the upper-left, select Service Settings. Then, select the MySQL tab.
Enter the host and port on which MySQL runs. The default port for MySQL is 3306. Enter the username and password from Step 1. Finally, click the "Setup" button. On success, the button will change to "Submitted".