Oracle_tablespaces plugin showing incorrect output for PDB_TEMP in CheckMK monitoring

CMK version: 2.3.0p41
OS version: Debian 11

Error message: checkmk is showing wrong tablespace data for service ‘ORA 5.ANALYT.PDB_TEMP Tablespace’. It showing as 0% used tablespace in checkmk even though the actual usage is different (screenshots attached for reference).
Need to find out if this is a bug or if there is some valid reason for this discrepancy.

Kindly assist with the issue.

Output of “cmk --debug -vvn hostname”: (If it is a problem with checks or plugins)

OMD[sitename]:~$
OMD[sitename]:~$ cmk --debug -vvn racserver
value store: synchronizing
Trying to acquire lock on /omd/sites/sitename/tmp/check_mk/counters/racserver
Got lock on /omd/sites/sitename/tmp/check_mk/counters/racserver
value store: loading from disk
Releasing lock on /omd/sites/sitename/tmp/check_mk/counters/racserver
Released lock on /omd/sites/sitename/tmp/check_mk/counters/racserver
Checkmk version 2.3.0p41

  • FETCHING DATA
    Source: SourceInfo(hostname=‘racserver’, ipaddress=‘racserver’, ident=‘agent’, fetcher_type=<FetcherType.PROGRAM: 5>, source_type=<SourceType.HOST: 1>)
    [cpu_tracking] Start [7f4eba157d70]
    Read from cache: AgentFileCache(racserver, path_template=/omd/sites/sitename/tmp/check_mk/cache/{hostname}, max_age=MaxAge(checking=0, discovery=360.0, inventory=360.0), simulation=False, use_only_cache=False, file_cache_mode=6)
    Not using cache (Too old. Age is 243 sec, allowed is 0 sec)
    Calling: ssh -T root@racserver
    Get data from program
    Write data to cache file /omd/sites/sitename/tmp/check_mk/cache/racserver
    Trying to acquire lock on /omd/sites/sitename/tmp/check_mk/cache/racserver
    Got lock on /omd/sites/sitename/tmp/check_mk/cache/racserver
    Releasing lock on /omd/sites/sitename/tmp/check_mk/cache/racserver
    Released lock on /omd/sites/sitename/tmp/check_mk/cache/racserver
    [cpu_tracking] Stop [7f4eba157d70 - Snapshot(process=posix.times_result(user=0.020000000000000018, system=0.009999999999999981, children_user=0.03, children_system=0.02, elapsed=12.609999999403954))]
    Source: SourceInfo(hostname=‘racserver’, ipaddress=‘racserver’, ident=‘piggyback’, fetcher_type=<FetcherType.PIGGYBACK: 4>, source_type=<SourceType.HOST: 1>)
    [cpu_tracking] Start [7f4eba194cb0]
    Read from cache: NoCache(racserver, path_template=/dev/null, max_age=MaxAge(checking=0.0, discovery=0.0, inventory=0.0), simulation=False, use_only_cache=False, file_cache_mode=1)
    No piggyback files for ‘racserver’. Skip processing.
    No piggyback files for ‘racserver’. Skip processing.
    Get piggybacked data
    [cpu_tracking] Stop [7f4eba194cb0 - Snapshot(process=posix.times_result(user=0.0, system=0.0, children_user=0.0, children_system=0.0, elapsed=0.0))]
    [cpu_tracking] Start [7f4eba194cb0]
  • PARSE FETCHER RESULTS
    <<<check_mk>>> / Transition NOOPParser → HostSectionParser
    <<<checkmk_agent_plugins_lnx:sep(0)>>> / Transition HostSectionParser → HostSectionParser
    <<labels:sep(0)>> / Transition HostSectionParser → HostSectionParser
    <<<df_v2>>> / Transition HostSectionParser → HostSectionParser
    <<<df_v2>>> / Transition HostSectionParser → HostSectionParser
    <<<systemd_units>>> / Transition HostSectionParser → HostSectionParser
    <<<nfsmounts_v2:sep(0)>>> / Transition HostSectionParser → HostSectionParser
    <<>> / Transition HostSectionParser → HostSectionParser
    <<>> / Transition HostSectionParser → HostSectionParser
    <<<ps_lnx>>> / Transition HostSectionParser → HostSectionParser
    <<>> / Transition HostSectionParser → HostSectionParser
    <<>> / Transition HostSectionParser → HostSectionParser
    <<>> / Transition HostSectionParser → HostSectionParser
    <<<lnx_if>>> / Transition HostSectionParser → HostSectionParser
    <<<lnx_if:sep(58)>>> / Transition HostSectionParser → HostSectionParser
    <<<lnx_bonding:sep(58)>>> / Transition HostSectionParser → HostSectionParser
    <<<tcp_conn_stats>>> / Transition HostSectionParser → HostSectionParser
    <<>> / Transition HostSectionParser → HostSectionParser
    <<>> / Transition HostSectionParser → HostSectionParser
    <<>> / Transition HostSectionParser → HostSectionParser
    <<>> / Transition HostSectionParser → HostSectionParser
    <<<vbox_guest>>> / Transition HostSectionParser → HostSectionParser
    <<<postfix_mailq>>> / Transition HostSectionParser → HostSectionParser
    <<<postfix_mailq_status:sep(58)>>> / Transition HostSectionParser → HostSectionParser
    <<>> / Transition HostSectionParser → HostSectionParser
    <<<lnx_thermal:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<chrony:cached(1773059479,120)>> / Transition HostSectionParser → HostSectionParser
    <<local:sep(0)>> / Transition HostSectionParser → HostSectionParser
    <<>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_instance>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_performance>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_systemparameter>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_processes>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_sessions>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_longactivesessions>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_logswitches>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_undostat>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_recovery_area>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_recovery_status>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_dataguard_stats>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_locks>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_tablespaces>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_rman>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_jobs>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_resumable>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_instance>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_processes>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_asm_diskgroup>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_instance:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_processes:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_asm_diskgroup:cached(1773059407,600):sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_instance:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_performance:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_systemparameter:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_processes:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_sessions:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_longactivesessions:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_logswitches:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_undostat:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_recovery_area:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_recovery_status:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_dataguard_stats:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_locks:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_tablespaces:cached(1773058868,600):sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_rman:cached(1773058868,600):sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_jobs:cached(1773058868,600):sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_resumable:cached(1773058868,600):sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_instance:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_performance:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_systemparameter:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_processes:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_sessions:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_longactivesessions:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_logswitches:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_undostat:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_recovery_area:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_recovery_status:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_dataguard_stats:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_locks:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_tablespaces:cached(1773058904,600):sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_rman:cached(1773058904,600):sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_jobs:cached(1773058904,600):sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_resumable:cached(1773058904,600):sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_instance:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_performance:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_systemparameter:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_processes:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_sessions:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_longactivesessions:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_logswitches:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_undostat:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_recovery_area:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_recovery_status:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_dataguard_stats:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_locks:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_tablespaces:cached(1773059040,600):sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_rman:cached(1773059040,600):sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_jobs:cached(1773059040,600):sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_resumable:cached(1773059040,600):sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_instance:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_performance:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_systemparameter:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_processes:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_sessions:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_longactivesessions:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_logswitches:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_undostat:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_recovery_area:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_recovery_status:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_dataguard_stats:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_locks:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_tablespaces:cached(1773059518,600):sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_rman:cached(1773059518,600):sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_jobs:cached(1773059518,600):sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_resumable:cached(1773059518,600):sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_instance:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_performance:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_systemparameter:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_processes:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_sessions:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_longactivesessions:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_logswitches:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_undostat:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_recovery_area:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_recovery_status:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_dataguard_stats:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_locks:sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_tablespaces:cached(1773058918,600):sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_rman:cached(1773058918,600):sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_jobs:cached(1773058918,600):sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<oracle_resumable:cached(1773058918,600):sep(124)>>> / Transition HostSectionParser → HostSectionParser
    <<<cmk_update_agent_status:cached(1773055921,3600):sep(0)>>> / Transition HostSectionParser → HostSectionParser
    HostKey(hostname=‘racserver’, source_type=<SourceType.HOST: 1>) → Add sections: [‘check_mk’, ‘checkmk_agent_plugins_lnx’, ‘chrony’, ‘cifsmounts’, ‘cmk_update_agent_status’, ‘cpu’, ‘df_v2’, ‘diskstat’, ‘job’, ‘kernel’, ‘labels’, ‘lnx_bonding’, ‘lnx_if’, ‘lnx_thermal’, ‘local’, ‘logwatch’, ‘md’, ‘mem’, ‘mounts’, ‘multipath’, ‘nfsmounts_v2’, ‘oracle_asm_diskgroup’, ‘oracle_dataguard_stats’, ‘oracle_instance’, ‘oracle_jobs’, ‘oracle_locks’, ‘oracle_logswitches’, ‘oracle_longactivesessions’, ‘oracle_performance’, ‘oracle_processes’, ‘oracle_recovery_area’, ‘oracle_recovery_status’, ‘oracle_resumable’, ‘oracle_rman’, ‘oracle_sessions’, ‘oracle_systemparameter’, ‘oracle_tablespaces’, ‘oracle_undostat’, ‘postfix_mailq’, ‘postfix_mailq_status’, ‘ps_lnx’, ‘systemd_units’, ‘tcp_conn_stats’, ‘uptime’, ‘vbox_guest’]
    HostKey(hostname=‘racserver’, source_type=<SourceType.HOST: 1>) → Add sections:
    Received no piggyback data
    ORA 5.ANALYT.PDB_TEMP Tablespace ONLINE (TEMPORARY), Size: 700 GiB, 0% used (0 B of max. 700 GiB), Free: 700 GiB, autoextend, 22 data files (22 avail, 22 autoext)
    ORA 7.CAMLIN.PDB_TEMP Tablespace ONLINE (TEMPORARY), Size: 96.0 GiB, 0% used (0 B of max. 96.0 GiB), Free: 96.0 GiB, autoextend, 3 data files (3 avail, 3 autoext)
    ORA 7.STARGATE.PDB_TEMP Tablespace ONLINE (TEMPORARY), Size: 4.22 GiB, 0% used (0 B of max. 32.0 GiB), Free: 32.0 GiB, autoextend
    ORA 7.SITEDBPROD.PDB_TEMP Tablespace ONLINE (TEMPORARY), Size: 128 GiB, 0% used (0 B of max. 128 GiB), Free: 128 GiB, autoextend, 4 data files (4 avail, 4 autoext)
    ORA 7.SITEPROD.PDB_TEMP Tablespace ONLINE (TEMPORARY), Size: 128 GiB, 0% used (0 B of max. 128 GiB), Free: 128 GiB, autoextend, 4 data files (4 avail, 4 autoext)
    ORA 8.MANDB.PDB_TEMP Tablespace ONLINE (TEMPORARY), Size: 256 GiB, 0% used (0 B of max. 256 GiB), Free: 256 GiB, autoextend, 8 data files (8 avail, 8 autoext)
    ORA 8.PLLPROD.PDB_TEMP Tablespace ONLINE (TEMPORARY), Size: 32.0 GiB, 0% used (0 B of max. 32.0 GiB), Free: 32.0 GiB, autoextend
    ORA P7.NONPROD.PDB_TEMP Tablespace ONLINE (TEMPORARY), Size: 2.00 GiB, 0% used (0 B of max. 32.0 GiB), Free: 32.0 GiB, autoextend
    ORA 9.PDB_TEMP Tablespace ONLINE (TEMPORARY), Size: 128 GiB, 0% used (0 B of max. 128 GiB), Free: 128 GiB, autoextend, 4 data files (4 avail, 4 autoext)
    OMD[sitename]:~$

Hey @NishV :waving_hand:

this is a known quirk and not something broken on your end. Here’s what’s going on and how to fix it:

Why you’re seeing 0%

Temporary tablespaces in Oracle work differently from permanent ones. Space is pre-allocated and reused by sessions, so views like V$TEMP_SPACE_HEADER will always show them as “full” — but actual active usage (sort segments etc.) is only visible through V$SORT_SEGMENT and V$TEMPSEG_USAGE. The mk_oracle plugin queries v$sort_segment for used_blocks, but when it runs from the CDB$ROOT context, it simply can’t see active temp segments belonging to individual PDBs. Hence: 0%.

Here are three things worth trying, in order:


Fix 1 — Connect directly to each PDB

The cleanest solution is to give mk_oracle a dedicated connection per PDB in your mk_oracle.cfg:

DBUSER_SID_PDBNAME='user:password::host:port'

Replace SID with your CDB name and PDBNAME with the actual PDB name (e.g. ANALYT, CAMLIN, etc.). The plugin will then query each PDB in the correct container context and report real temp usage. After updating the config, don’t forget to re-run service discovery.

More on this approach here: Mk_oracle PDB Tablespaces


Fix 2 — Check your monitoring user’s grants

If you’re using a CDB-level user (like c##checkmk), make sure it has the right privileges with CONTAINER=ALL:

GRANT SELECT ON v_$sort_segment TO c##checkmk CONTAINER=ALL;
GRANT SELECT ON v_$tempseg_usage TO c##checkmk CONTAINER=ALL;

Missing grants are a sneaky cause of this — the plugin just silently gets no rows back. See also: Mk_oracle PDB Tablespaces (reply #3)


Fix 3 — Reconsider what you actually want to monitor

This one’s more of a mindset shift: TEMP tablespace “usage” at any given moment is inherently snapshot-based — if no sort/hash operations are running right now, v$sort_segment will return 0 active blocks, and that’s actually correct behaviour. What you probably want to alert on is the allocated size vs. the configured max, or watch for ORA-01652 errors in your alert log.

Checkmk ignores temp tablespaces by default for this exact reason. You can opt into monitoring them via the oracle_tablespaces rule (temptablespace parameter), but be aware the numbers will only be non-zero during active workloads. Background on Oracle temp space behaviour: Monitoring Oracle's Temp Usage | Database Journal


Hope that clears it up! Fix 1 is the most reliable path if you genuinely need per-PDB temp visibility.

Greetz Bernd

Hi Bernd,

Thanks you for your quick response of this query.
But as I checked in the bakery rule to apply fix 1, i cannot find any option to make the custom modification as suggested.
It would be helpful if you can guide on this as well.

Hi @NishV,

good question — and I owe you a correction on my own post, sorry about that.

On the Bakery: there is no direct option for this

The Agent Bakery rule ORACLE databases (Linux, Solaris, AIX, Windows)
(Setup > Agents > Windows, Linux, Solaris, AIX > Agent rules) does not
expose per-PDB connection settings. As the Checkmk docs note explicitly:

“Nevertheless, you cannot configure all functions of the agent plug-in
with the Agent Bakery”

So Fix 1 requires editing mk_oracle.cfg manually on the host — or using
REMOTE_INSTANCE entries, which are configurable in the Bakery.

Correction to my earlier post

I incorrectly wrote DBUSER_SID_PDBNAME
The correct options are:

  • DBUSER_<SID> — overrides credentials for a specific CDB instance
  • REMOTE_INSTANCE_<id> — connects to a remote/specific instance via
    host:port:SID, which is the right approach for per-PDB connections

For a direct PDB connection, the correct mk_oracle.cfg syntax is:


REMOTE_INSTANCE_ANALYT='checkmk:password::localhost:1521:racserver:ANALYT:19' REMOTE_INSTANCE_CAMLIN='checkmk:password::localhost:1521:racserver:CAMLIN:19'

The format is user:password:role:host:port:piggybackhost:SID:version.
Leave piggybackhost as your main host name so the data lands on the
right host in Checkmk.

In the Bakery (2.3/2.4): use “Remote instances”

In the Bakery rule, scroll down to “Remote instances” — you can add
REMOTE_INSTANCE entries there. This is the closest you’ll get to per-PDB
connections via the Bakery UI. After baking and deploying, run a new
service discovery.

Docs: Monitoring Oracle databases

Greetz Bernd

one more thing on the “why” behind all this — the Oracle side of the explanation.

V$SORT_SEGMENT is defined in Oracle’s own reference as showing data for a
“given instance” only, with no cross-container scope:

The deeper reason is that V$ views are “container data objects” in Oracle
Multitenant. Oracle’s documentation states:

“Container data objects include V$, GV$, CDB_, and some DBA_HIST* views.
A common user’s CONTAINER_DATA attribute determines which containers are
visible in container data objects.”

In other words: when mk_oracle connects to CDB$ROOT, the monitoring user’s
CONTAINER_DATA defaults to CDB$ROOT only. Rows from PDB temp segments are
simply not returned — silently, with no error. So Fix 2 needs one extra step
beyond the GRANTs:

-- As SYSDBA in CDB$ROOT:
ALTER USER c##checkmk SET CONTAINER_DATA=ALL CONTAINER=CURRENT;

More detail on CONTAINER_DATA mechanics:

Greetz Bernd