Aborted connections
Job details
Name: | Aborted connections |
Platform: | Mysql |
Category: | Availability |
Description: | Checks the number of aborted client connections. |
Long description: | Checks the number of aborted client connections. Usually this is because of incorrect password or no matching host for the user. Aborted connections can also be caused by clients trying to connect with invalid or malformed connection strings. |
Version: | 1.2 |
Default schedule: | 9,19,29,39,49,59 * * * |
Requires engine install: | Yes |
Compatibility tag: | .[type=‘instance’ & is_mysql_branch=‘1′]/.[hasengine=‘YES’ & use_global_variables_performance_schema = ‘1′ ] |
Parameters
Name | Default value | Description |
---|---|---|
warning threshold | 20 | The maximum value of aborted connects (over a period of time defined by the [time threshold] parameter) before a warning is triggered. |
alarm threshold | 100 | The maximum value of aborted connects (over a period of time defined by the [time threshold] parameter) before an alarm is triggered. |
threshold (time) | 60 | A period of time (in minutes) which must be passed (combined with the number of aborted connects) before an alarm or a warning is returned by the procedure. |
enable warnings and alarms | NO | If set to “NO” (default), the alert will only collect statistics without returning status warning or alarm. Value “YES“ will activate the alert. |
history threshold | 7 | The maximum number of day to kept statistics for in the historic tables. |
Job Summary
- Purpose: The purpose of this monitoring job is to track and check on the number of aborted client connections on the MySQL database platform.
- Why: Monitoring aborted connections is crucial for maintaining the database’s availability and performance. Aborted connections typically occur due to incorrect credentials or invalid connection strings. If left unchecked, a high number of aborted connections can potentially lead to performance issues or even denial of service.
- Manual Checking: Manual checks can be carried out by querying the ‘performance_schema.global_status’ table of the MySQL database to retrieve the count of ‘ABORTED_CONNECTS‘ as shown in part of the implementation code:
SELECT CAST(VARIABLE_VALUE AS signed) INTO aborted_connects_val FROM performance_schema.global_status WHERE variable_name = 'ABORTED_CONNECTS'
Detailed Information
The job verifies the count of aborted client connections periodically, according to the defined schedule. It tracks this data over specific periods and maintains a history of this data to detect any spikes or abnormal patterns. The job can trigger a warning or an alarm if the count of aborted connections over a period exceeds predefined threshold values. It also provides an implementation for cleaning up (dropping tables and procedures) if necessary.
Report generation
The job includes provisions for generating a report titled ‘Aborted connects’. The report displays a graph showing the number of aborted connections per minute over a historical timeframe. This visual presentation aids in better understanding and analysis of the connection abort pattern.
Features
- The job acknowledges the removal of old data to keep the monitoring and report generation efficient.
- It includes provisions for setting up dependencies, in the form of tables and procedures required for execution.
- There are specific queries defined to select relevant data from the database and process it.
- The job can be forced to install, making it resilient to different environments.
- It’s part of the ‘Availability’ category, meaning it plays a role in ensuring the availability of the database.