Aborted connections
Job details
Name: | Aborted connections |
Platform: | Mariadb |
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_mariadb_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 job is to monitor and check the number of aborted client connections in a MariaDB environment.
- Why: This job is important because it helps identify issues with client connections that could potentially indicate security concerns, misconfigurations, or faulty client operations. Monitoring aborted connections is crucial for maintaining the reliability and security of the database server.
- Manual checking: You can manually check aborted connections in your database using the following SQL command:
SELECT VARIABLE_VALUE FROM performance_schema.global_status WHERE variable_name = 'ABORTED_CONNECTS';
Description of Operation
This job operates by:
- Tracking aborted connect attempts to the database which might occur due to various reasons such as incorrect password or no matching host for the user.
- Creating and updating historical records of aborted connections to analyze trends over time.
- Checking if the number of aborted connections exceeds predefined thresholds which could trigger warnings or alarms to the system administrators.
Tables and Procedures
The following components are integral to the job:
- Creation of tables:
- dbw_aborted_connects_histr — Stores historical data of aborted connections.
- dbw_aborted_connects_last — Keeps the record of the last aborted connection attempts updated.
- Implementation of procedures:
- dbw_aborted_connects — Main procedure that calculates and evaluates aborted connection data against thresholds and prepares execution details.
- Cleanup statements are executed to drop tables and procedures if a failure occurs during their creation or update.
Configuration Parameters
- Warning Threshold: Maximum number of aborted connects over a specific timeframe that would trigger a warning.
- Alarm Threshold: Maximum number of aborted connects over a specific timeframe that would trigger an alarm.
- Threshold (time): Duration in minutes to monitor for crossing thresholds.
- Enable Warnings and Alarms: Toggles whether alerts and warnings should be active.
- History Threshold: Specifies the number of days to keep historical data.
Dependencies
- Main procedure: dbw_aborted_connects—responsible for main computational logic.
- Dependency tables: dbw_aborted_connects_histr and dbw_aborted_connects_last—used for storing historical data and the most recent data snapshot respectively.
Monitoring Outputs
The monitoring setup includes visualization and reporting tools:
- The graphical presentation of aborted connections over time aid in easy comprehension of data and trends.
- The report lists and graphs the number of aborted connections per minute, highlighting any anomalies or constant issues in connection attempts.
Conclusion
By monitoring aborted connections, the dbWatch job provides crucial insights into potentially disruptive issues affecting database connectivity. It assists system administrators in proactive maintenance and security measures to ensure the continuous, secure, and efficient operation of MariaDB servers.