Werk #19843: mk_oracle: avoid Oracle alert log parse errors on MOUNTED Data Guard standbys
| Component | Checks & agents | ||||||
| Title | mk_oracle: avoid Oracle alert log parse errors on MOUNTED Data Guard standbys | ||||||
| Date | Apr 22, 2026 | ||||||
| Level | Trivial Change | ||||||
| Class | Bug Fix | ||||||
| Compatibility | Compatible - no manual interaction needed | ||||||
| Checkmk versions & editions |
|
On a standard Data Guard standby the database stays in MOUNTED mode, which
means queries against non-fixed data-dictionary views (cdb_* / dba_*) cannot
be parsed and Oracle raises ORA-01219 - database not open: queries allowed on
fixed tables/views only.
The mk_oracle agent plugin issued such queries unconditionally for several
sections, causing parse errors to accumulate in the Oracle alert log on every
agent cycle even though the outer EXCEPTION handler swallowed the error for
the agent output. Disabling sections via the "Sections - data to collect"
ruleset was a global, all-or-nothing switch and therefore not a workable
mitigation when only some monitored databases are standbys.
The following sections now consult v$database.open_mode before submitting
their dynamic SQL, and run the query only when the database is open as a
primary (READ WRITE) or as Active Data Guard (READ ONLY WITH APPLY):
oracle_tablespacesoracle_ts_quotasoracle_jobsoracle_resumableoracle_locks(legacy query path)
Standard Data Guard standbys (MOUNTED) and plain read-only standbys
(READ ONLY) no longer emit these queries and therefore no longer trigger
ORA-01219 in the alert log. Behaviour on primaries and Active Data Guard
instances is unchanged.
This affects both agents/plugins/mk_oracle (Linux/Unix) and
agents/windows/plugins/mk_oracle.ps1 (Windows).