Test alert
Job details
Name: |
Test alert |
Platform: |
Sqlserver |
Category: |
Availability |
Description: |
Test alert that alerts every ‘X’ minutes. |
Long description: |
Test alert that alerts every ‘X’ minutes. Useful for testing extensions and not intended for use in production environments. |
Version: |
1.0 |
Default schedule: |
5,15,25,35,45,55 * * * |
Requires engine install: |
Yes |
Compatibility tag: |
.[type=‘instance’ & databasetype=‘sqlserver’]/instance[maj_version > ‘2000′ & hasengine=‘YES’ & (engine_edition = ‘Microsoft SQL Server’ |
engine_edition = ‘Azure SQL Managed Instance’)] |
Parameters
Name |
Default value |
Description |
Time between warnings |
180 |
The time in minutes between each alarm message. |
Time between alarms |
360 |
The time in minutes between each alarm message. |
Warning message |
Test WARNING |
The message to send if we send a warning message |
Alarm message |
Test ALARM |
The message to send if we send an alarm message |
Ok message |
Test OK |
The message to send if we send an OK message |
Disable warnings |
NO |
Enables/disables warnings. YES or NO values |
Disable alarms |
NO |
Enables/disables alarms. YES or NO values |
Job Summary
- Purpose: The purpose of this job is to facilitate periodic testing of alert mechanisms within the control center.
- Why: This job is important to ensure the reliability and responsiveness of alert systems, specifically designed to function in environments using SQL Server or Azure SQL Managed Instance. Regularly testing these alerts ensures that actual operational alerts will function correctly when necessary.
- Manual checking: You can manually check the database by issuing these SQL commands:
SELECT histr_date, type_message FROM dbw_test_alert_history ORDER BY histr_date DESC
Job Configuration
- Category: Availability
- Schedule: The default schedule is set to trigger every 5, 10, 15, 25, 35, 45, 55 minutes of each hour.
- Dependencies:
- This job has a dependency on “dbw_test_alert” and “dbw_test_alert_history”, ensuring all necessary components are in place for proper function. The job involves cleanup operations on these components upon failure.
- Acknowledgements: This job does not require acknowledgements after completion.
Implementation Details
- Database Setup:
- A table is created for storing alert history.
- A stored procedure exists to manage the process of sending alerts, warnings, or OK messages based on the time elapsed since the last respective message.
- The procedure also includes error handling if exceptions occur during its execution.
Reporting
- Report Template Version: 2
- Title: Test Alert
- Description: Provides details on the Test alert’s activation and history.
- Schedule: Reports can be generated every hour.
- Content: Displays data concerning:
- Activity history as per alerts, warnings, and OK messages recorded.
- Presentational data drawn from “dbw_test_alert_history” including columns like histr_date and type_message.
- Presentation Elements:
- Title: “Alarm History”
- Table for plotting HISTR_DATE and TYPE_MESSAGE, with no borders configured.
The setup and operations in this job are specifically configured to support non-production environments, where they can help in validating the behavior of alert management systems without impacting actual operation timelines and data security.