I resolve this using Oracle SQL v2 sensor and Custom Lookups according to this manual on Paessler KB:
- I create the file Custom Sensors\sql\oracle\rmanmonitor.sql on the PRTG installation directory with this content:
SELECT CASE WHEN status = 'RUNNING' THEN 1
WHEN status = 'COMPLETED' THEN 2
WHEN status = 'RUNNING WITH WARNINGS' THEN 3
WHEN status = 'COMPLETED WITH WARNINGS' THEN 4
WHEN status = 'RUNNING WITH ERRORS' THEN 5
WHEN status = 'COMPLETED WITH ERRORS' THEN 6
WHEN status = 'FAILED' THEN 7
ELSE 0
END as status, status as description
FROM v$rman_backup_job_details
WHERE start_time = (SELECT MAX(start_time) FROM v$rman_backup_job_details);
- I then create the file lookups\custom\oid.paessler.oracle.rmanstatus.ovl file on the PRTG installation directory with all the possible RMAN statuses and the status conditions on PRTG:
<?xml version="1.0" encoding="UTF-8"?>
<ValueLookup id="oid.paessler.oracle.rmanstatus" desiredValue="0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PaeValueLookup.xsd">
<Lookups>
<SingleInt state="Warning" value="0">
Unknown
</SingleInt>
<SingleInt state="OK" value="1">
RUNNING
</SingleInt>
<SingleInt state="Ok" value="2">
COMPLETED
</SingleInt>
<SingleInt state="Warning" value="3">
RUNNING WITH WARNINGS
</SingleInt>
<SingleInt state="Warning" value="4">
COMPLETED WITH WARNINGS
</SingleInt>
<SingleInt state="Error" value="5">
RUNNING WITH ERRORS
</SingleInt>
<SingleInt state="Error" value="6">
COMPLETED WITH ERRORS
</SingleInt>
<SingleInt state="Error" value="7">
FAILED
</SingleInt>
</Lookups>
</ValueLookup>
- Then create an Oracle SQL v2 sensor pointing to the .sql file and the .ovl files created previously, as described in the manual.
Note: Remember to reload the defined lookups in the custom folder by clicking the Load Lookups button in the PRTG web interface under Setup | System Administration | Administrative Tools after creating the .ovl file.
Add comment