CMK version: 2.0.0p33 (CRE)
OS version: SLES 15 SP4 64bit
The mk_oracle plugin supplies a check called oracle_jobs. The check checks all jobs listed in Oracles own job mechanism for their status. As far as I can see, the table queried is cdb_scheduler_jobs.
According to the documentation for the oracle_jobs check, it respects the “disabled” state:
"disabled": The state of a job is ignored when this parameter is
True. This is the default behavior.
However, that is not what we are seeing. The state is queried by the SQL of the check, and even disabled checks generate a warning based on having no execution result listed in the table cdb_scheduler_job_run_details which catches the details of the last run.
However, the plugin does offer the option to react to the state of the job: Adding a rule via “parameters for this service” on a Oracle scheduler job type check offers the option Status of service in case of disabled job.
That means that we do have a workaround, but we find that listing disabled jobs with a WARN state because no logging information about their last execution was found seems nonsensical a this would be expected.
We can see multiple ways to improve the situation:
- Not querying disabled jobs (ENABLED field in cdb_scheduler_jobs): There is no expectation of finding out any state of a non-running job
- Having disabled jobs in the state of OK always, when and if there is no information about their last execution available from cdb_scheduler_job_run_details. If the job was executed at least once and has information logged in cdb_scheduler_job_run_details, but is now disabled, react to that information accordingly.
I’m interested in what you think is the way to go, and if this is perceived as a problem in general. If not, I’d be interested in how other Oracle users work around the problem, because a fresh installation of current Oracle versions shows the problem.