Database status
Job details
Name: | Database status |
Platform: | Sybase |
Category: | Availability |
Description: | Checks status of all databases defined on the system. The following incidents triggers a warning or an alarm: |
Long description: | |
Version: | 1.1 |
Default schedule: | 2,12,22,32,42,52 * * * |
Requires engine install: | Yes |
Compatibility tag: | .[type=‘instance’ & databasetype=‘sybase’]/instance[maj_version > ‘11′ & hasengine=‘YES’] |
Parameters
Name | Default value | Description |
---|---|---|
ignore databases | model | List over the database (separated by comma) which will be ignored from being checked. |
return status when offline | 1 | Return status value (ALARM – 2, WARNING – 1, or OK – 0) when database is offline. |
return status when needs recovery | 2 | Return status value (ALARM – 2, WARNING – 1, or OK – 0) when database is offline until recovery completes. |
return status when being recovered | 2 | Return status value (ALARM – 2, WARNING – 1, or OK – 0) when database is being recovered. |
return status when suspect pages | 1 | Return status value (ALARM – 2, WARNING – 1, or OK – 0) when database has suspect pages. |
return status when being upgraded | 2 | Return status value (ALARM – 2, WARNING – 1, or OK – 0) when database is in the process of being upgraded. |
Job Summary
- “Purpose”: This monitoring job is designed to check the status of all databases defined on the system for a Sybase database instance.
- “Why”: It is crucial to monitor the database statuses to prevent and mitigate potential issues such as recovery errors, offline status, and database upgrades, which could impact system availability and performance.
- “Manual checking”:
````` SELECT db_name(dbid) “database name”, “status” = CASE WHEN status = 16 THEN ‘Database is offline’ WHEN status = 32 THEN ‘Database is offline until recovery completes’ WHEN status = 64 THEN ‘Internal use – Database is being recovered’ WHEN status = 128 THEN ‘Database has suspect pages’ WHEN status = 512 THEN ‘Database is in the process of being upgraded’ END, status “status control bit” FROM dbw_db_status_tab `````
Job Functionality
- “Database Selection”: The monitoring script only targets Sybase database instances with major versions above 11 that include an engine, as specified by the component query within the job.
- “Database Status Check”: The job checks various critical database conditions and categorizes them into different status levels (OK, WARNING, ALARM) depending on the severity of the issue.
- “Schedule”: Defaults to running every 10 minutes, ensuring frequent updates on the status of the databases and allowing timely actions in case of issues.
Job Parameters Exploration (Descriptions Only)
- “ignore databases”: Specifies databases that should be excluded from checks, enabling customization and focus on relevant databases only.
- “return status when…”: Defines the severity level that should be triggered for specific database issues (offline, needs recovery, being upgraded, etc.), allowing for tailored response strategies.
Dependencies and Cleanup
- “Dependencies”:
- “dbw_db_status_check”: This monitoring script relies on its own procedure and table for executing checks and logging results.
- “Cleanup Process”: If the job fails, specific cleanup instructions include dropping the previously mentioned procedure and table to maintain system hygiene and reliability.
Job Implementation Details
- “Code Execution”:
- The job involves creating necessary tables and procedures if not already present and performing cleanup activities post-execution or in case of failure.
- “Execution Flow”:
Reporting and Alerting
- “Database status report”:
- Constant reporting on database status, providing a detailed look into the operational state of each database, including specific issues and their severity.
- “Alert Handling”: