I have several Oracle database where my in-house applications are running. Those applications use both dba_jobs
and dba_scheduler_jobs
.
I want to write monitoring function: check_my_jobs
which will be called periodically by Nagios to check if everything is OK with my jobs. (Are they running? Is it Broken? Is next_run_date delayed? and so on)
Solutions:
Due to the fact that I have to monitor jobs on different databases, there is two way of implementing the solution:
Create monitoring function and configuration tables only on one database which will check jobs on every database using the Database link.
pros: Centralized functionality, easy to maintain.
cons: I have to make a check using the Database link.Create monitoring function and configuration tables in every database where I want to check jobs.
pros: I don't have to use DB link
cons: Duplicated monitoring code on every database
Which solution is better?