DBMS uptime
Job details
Name: | DBMS uptime |
Platform: | Mysql |
Category: | Availability |
Description: | Collects uptime statistics for the MySQL instance. |
Long description: | Collects uptime statistics for the MySQL instance. |
Version: | 2.4 |
Default schedule: | * * * * |
Requires engine install: | Yes |
Compatibility tag: | .[type=‘instance’ & is_mysql_branch=‘1′]/.[hasengine=‘YES’ & use_global_variables_information_schema = ‘1′ & maj_version < ‘5.6′] |
Parameters
Name | Default value | Description |
---|
Job Summary
- Purpose: The purpose of this job is to collect uptime statistics for the MySQL instance. It monitors the uptime and duration for which a database instance has been up and running.
- Why: This job is important to check the uptime of the MySQL platform. Frequent downtimes could suggest performance issues or bugs within the application or platform. Continual tracking of these metrics can help to avoid potential downtimes and maintain smooth operations.
- Manual checking: You can check this manually in the database by issuing the SQL commands included in the job description.
Implementation
The job collects information by creating and working with tables, views, and procedures that track the uptime of the MySQL database. If an error occurs during the procedure, the job will return an exception string detailing the MySQL error number, SQL state, and error message.
Dependencies
Several objects related to tracking uptime are created and used in this job, including:
- dbw_dbms_uptime_data: A table that contains current statistics.
- dbw_dbms_uptime: The main procedure that manipulates uptime data.
- dbv_dbms_uptime_histr: A supporting view that provides access to uptime history.
- dbv_dbms_availability: A base view that provides availability statistics.
- Several other supporting views and base views that provide more granular information about database uptime.
Report
The job includes a report template that generates reports on database uptime, specifying the periods of time the database was up, and percentage uptime.
Upgrade
The job includes an upgrade implementation from an earlier version that updates how the job creates its procedure to monitor and report on database uptime. The update reflects modifications taken from cache during the database session, not necessarily reflecting actual insertions to the table.