This alert will check the status of RMAN backups by looking at the V$RMAN_BACKUP_JOB_DETAILS tables and return any row from the last hour (based on frequency of the alert) where the status is 'COMPLETED WITH WARNINGS', 'COMPLETED WITH ERRORS', 'FAILED'.
ALERT DEFINITION
To create this alert, click on Alerts > Manage Alerts tab and create a Custom SQL Alert with Multiple Numeric Return type. Configure the alert similar to below:
Alert Name: RMAN Backups Failed
Execution Interval: 1 Hour
Notification Text: The following RMAN backup jobs failed within the last hour.
SQL Statement:
select 'Backup: ' || input_type || ' failed with status: ' || status, 1
from v$rman_backup_job_details
where end_time >= current_timestamp - #FREQUENCY#
and status in ('COMPLETED WITH WARNINGS', 'COMPLETED WITH ERRORS', 'FAILED')
Execute Against: Monitored Instance
Units: <blank>
High Threshold: MIN 1, MAX empty
Medium Threshold: <none>
There seems to be a problem with the math (Version 9.2.110)
%FREQUENCY% appears to be in minutes. The above code is subtracting 60 (1 hour) from the current timestamp which means in the last 60 days.
Something like:
where end_time >= current_timestamp - (1/(24*60) * #FREQUENCY#)
should convert it to minutes and work as expected.
If that works, great. This alert was intended to be used with the DPA application and we *should* be converting the value used for interval for the #frequency# (it gets parsed by the java code and should be in the same increment as how the interval is defined for the alert). Let me know if that's not quite clear...
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 150,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.