DBMS uptime
Job details
Name: | DBMS uptime |
Platform: | Mariadb |
Category: | Availability |
Description: | Collects uptime statistics for the MariaDB instance. |
Long description: | Collects uptime statistics for the MariaDB instance. |
Version: | 2.5 |
Default schedule: | * * * * |
Requires engine install: | Yes |
Compatibility tag: | .[type=‘instance’ & is_mariadb_branch=‘1′]/.[hasengine=‘YES’ & global_status_information_schema = ‘1′ ] |
Parameters
Name | Default value | Description |
---|
Job Summary
- Purpose: The purpose of this job is to collect and monitor uptime statistics for a MariaDB instance, ensuring reliable tracking of operational intervals versus downtime.
- Why: This job is important to check the continuity and availability of the MariaDB database. Frequent downtimes and restarts can signify potential issues. Monitoring uptime helps in proactive management and enhances service reliability. If sustained interruptions or irregularities in operational periods are found, it can indicate deeper system or network related issues that might affect the overall performance or reliability of the database.
- Manual checking: You can manually check uptime statistics in the database by using the following SQL commands:
SELECT CONCAT(FLOOR(days_up),' days ', FLOOR((days_up*24*60 - FLOOR(days_up)*24*60)/60),' hours ', (FLOOR(days_up*24*60 - FLOOR(days_up)*24*60) - (FLOOR((days_up*24*60 - FLOOR(days_up)*24*60)/60))*60),' min ') as "DBMS uptime" FROM dbv_dbms_monitored, dbv_dbms_up, dbv_dbms_stopped WHERE days_monitored != 0;
Dependencies and Resources
Dependency Object | Description |
---|---|
dbw_dbms_uptime_data | Current statistics table which stores periodic uptime data. |
dbw_dbms_uptime_histr | Table that stores historical uptime data. |
dbv_dbms_uptime_histr | Supports tracking by viewing historical uptime intervals. |
dbv_dbms_monitored | Supporting view for monitored uptime duration. |
dbv_dbms_stopped | Supporting view to track stopped durations. |
dbv_dbms_up_pp | Interim view used for calculating uptime percentages. |
dbv_dbms_up | Consolidated view of uptime periods. |
dbv_dbms_availability | Calculates and presents availability metrics. |
dbv_dbms_uptime_stat | Provides statistical uptime data. |
dbv_dbms_uptime_stat_h | Historical statistical uptime data. |
Cleanup Procedures
The following objects are set for cleanup on failure, ensuring that erroneous or incomplete data does not persist in the system affecting subsequent calculations or cluttering the database.
DROP VIEW dbv_dbms_uptime_histr; DROP VIEW dbv_dbms_monitored; DROP VIEW dbv_dbms_stopped; DROP VIEW dbv_dbms_up; DROP VIEW dbv_dbms_availability; DROP VIEW dbv_dbms_uptime_stat; DROP PROCEDURE dbw_dbms_uptime; DROP TABLE dbw_dbms_uptime_data; DROP TABLE dbw_dbms_uptime_histr;
Reporting and Analysis
The uptime monitoring job is not only critical for operational tracking but also for performance analysis and forecasting. The job summarizes availability with uptime percentages and patterns in downtimes, thus providing actionable intelligence for maintenance planning, system optimization, and reliability assessments.
- Report Template: “DBMS Uptime”
- Availability statistics
- Uptime percentage and detailed breakdown in days, hours, and minutes for uptime, monitored time, and downtime detailed out.
This structured collection and reporting eventually support the goal of achieving high availability and minimizing unplanned downtimes in MariaDB environments.