Test alert
Job details
Name: |
Test alert |
Platform: |
Oracle |
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. Instance centric, so intended for single instance or each instance in a RAC cluster. |
Version: |
3.0 |
Default schedule: |
5,15,25,35,45,55 * * * |
Requires engine install: |
Yes |
Compatibility tag: |
.[type=‘instance’ & databasetype=‘oracle’]/.[hasengine=‘YES’] |
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 periodically generate test alerts in Oracle instances, primarily designed for testing and validation of monitoring and alerting mechanisms within dbWatch.
- Why: This job is important to validate the functionality and responsiveness of alert systems in a controlled environment. It ensures that when an actual alert condition occurs, the system will respond appropriately.
- Manual checking: You can check this manually in the database by issuing these SQL commands:
SELECT histr_date, type_message FROM dbw_test_alert_history_#instance~id# ORDER BY histr_date DESC;
Key Features
- The job is categorized under “Availability” suggesting it contributes towards understanding system’s alert readiness.
- Specifically oriented towards Oracle database instances.
- Scheduled to alert every ‘X’ minutes as specified in the provided parameters (with default values).
- Includes capability to disable either warnings or alarms conditionally, enhancing test flexibility.
Implementation Details
- A specific SQL procedure (`dbw_test_alert_#instance~id#`) is implemented which:
- Checks the last time warnings or alarms were sent,
- Inserts new messages into the history table if the defined conditions (based on time intervals) are met,
- Manages messages based on whether warnings or alarms are enabled or disabled.
- A history table (`dbw_test_alert_history_#instance~id#`) retains a log of all alerts sent, including the type of message and the date it was sent.
- The SQL job clears entries in the history that are older than 30 days to manage database space.
Dependencies
- This job has a self-dependency to ensure it functions solely on its intended instance.
- Also has dependencies on its historical data, which supports reporting and oversight of alert functionality.
Reporting Framework
Title |
Description |
Data Presented |
Frequency |
Test Alert |
Report for Test Alert |
Details of test alerts including type and occurrence |
Hourly updated |
The report provides insights via a table displaying the historical data from alerts which includes types of message and dates of occurrence.
Additional Notes
- The job should not be used in production environments as emphasized, ensuring that it remains a tool for testing rather than for operational use.
- Ensures only current data within the past month is retained to manage the database size and relevance of the information.
- Whilst error handling is embedded within the SQL procedure to catch and log exceptions, ongoing monitoring of this job is suggested to ensure it continues to meet expected operational standards.