Maximum connections alert
Job details
Name: | Maximum connections alert |
Platform: | Mysql |
Category: | Availability |
Description: | Collects uptime statistics for the MySQL instance. |
Long description: | |
Version: | 1.21 |
Default schedule: | 10m |
Requires engine install: | No |
Compatibility tag: | .[type=‘instance’ & is_mysql_branch=‘1′] |
Parameters
Name | Default value | Description |
---|---|---|
used_alarm_threshold | 95 | Connections used out off max connections percent for triggering alarm |
used_warning_threshold | 90 | Connections used out off max connections percent for triggering warning |
Job Summary
- Purpose: The purpose of this monitoring job is to inspect if the MySQL system is nearing its potential for maximum connections.
- Why: The job is essential to ensure that the MySQL system doesn’t exceed its connection limit. If the connection percentage surpasses the specified thresholds (%95 for alarm, %90 for warning), it triggers either an alarm or a warning. Overloading connections could result in denial of service, slow performance, or potential failures in the database system.
- Manual checking: Manually checking for this involves running SQL commands that shows the current connections out of maximum and their percentage use.
Job Details
The job is named ‘MySQL max connections’ and uses the ‘mysql_noschema_max_connection’ artifact from the company dbwatch.com. It belongs to the ‘Availability’ category and is capable of express installation.
A default schedule of ‘10m’ (10 minutes) is assigned for this job, and it is compatible with instances in MySQL.
This job uses both ‘fdl’ and ‘javascript’ engines for implementation. The script in javascript evaluates the current percentage of connections in use, compares it with the threshold values and subsequently sets the status and messages depending on the condition fulfilled.
Reporting
The job includes a report template with a title and description as ‘MySQL max connections’. The report gives a detailed overview of the connection status in the form of a table. The table presents the ‘Details’ derived from the results of the job run.
Error Handling
In the event of a script error during the job execution, the job returns a status of ‘2′ and displays the error message.