Oracle Version 19.11 is not detected directly from v2 P17

I am using Checkmk version 2.0.0p17 on Oracle Linux Server release 8.5. I have installed agent on a CentOS release 7.9 (Maipo) machine running Oracle 19c , version 19.11. Agent scans perfectly OS and hardware, but Oracle is not detected at all. Is there any way how to resolve this issue?

Regards,
Olsi

Hi @olulani,

can you run the plugin directly from the commandline via MK_CONFDIR=/etc/check_mk /usr/lib/check_mk_agent/plugins/mk_oracle -t and see if the instances are dedected and login is possible (be warned, the output contains sensible data)?
Can you also please run sqlplus -V | grep ^SQL | cut -d" " -f3 | cut -d"." -f-2 as oracle user with environment?

Hi,
mk_oracle was missing in destination folder. After copying it there from server, it executed with following output:

/usr/lib/check_mk_agent/plugins] ./mk_oracle -t
<<<oracle_instance>>>
<<<oracle_sessions>>>
<<<oracle_logswitches>>>
<<<oracle_undostat>>>
<<<oracle_recovery_area>>>
<<<oracle_processes>>>
<<<oracle_recovery_status>>>
<<<oracle_longactivesessions>>>
<<<oracle_dataguard_stats>>>
<<<oracle_performance>>>
<<<oracle_locks>>>
<<<oracle_systemparameter>>>
<<<oracle_tablespaces>>>
<<<oracle_rman>>>
<<<oracle_jobs>>>
<<<oracle_resumable>>>
<<<oracle_iostats>>>
<<<oracle_instance>>>
<<<oracle_processes>>>
<<<oracle_asm_diskgroup>>>

Nothing seem to be detected. While Oracle version is below:

sqlplus -V | grep ^SQL | cut -d" " -f3 | cut -d"." -f-2
19.0

Hi,
I made some tests. Actually agent seems to run as root, where it has no access to Oracle. Executing plugin as oracle linux user output is as below:

[oracle:/usr/lib/check_mk_agent/plugins] ./mk_oracle -t
<<<oracle_instance>>>
<<<oracle_sessions>>>
<<<oracle_logswitches>>>
<<<oracle_undostat>>>
<<<oracle_recovery_area>>>
<<<oracle_processes>>>
<<<oracle_recovery_status>>>
<<<oracle_longactivesessions>>>
<<<oracle_dataguard_stats>>>
<<<oracle_performance>>>
<<<oracle_locks>>>
<<<oracle_systemparameter>>>
<<<oracle_tablespaces>>>
<<<oracle_rman>>>
<<<oracle_jobs>>>
<<<oracle_resumable>>>
<<<oracle_iostats>>>
<<<oracle_instance>>>
<<<oracle_processes>>>
<<<oracle_asm_diskgroup>>>

—login----------------------------------------------------------------
Operating System: Linux
ORACLE_HOME (GI): /u01/app/grid/product/19.0.0/grid_1
Logincheck to Instance: +ASM
Version: 19.0
Logindetails: /@localhost:1521/+ASM
Error Message: +ASM|FAILURE|ERROR: ORA-15000: command disallowed by current instance type SP2-0751: Unable to con
SYNC_SECTIONS: instance processes
ASYNC_SECTIONS: asm_diskgroup

—login----------------------------------------------------------------
Operating System: Linux
ORACLE_HOME (GI): /u01/app/oracle/product/19.0.0/db_1
Logincheck to Instance: INST001
Version: 19.0
Logindetails: /@INST001
Error Message: INST001|FAILURE|ERROR: ORA-01017: invalid username/password; logon denied SP2-0751: Unable to con
SYNC_SECTIONS: instance sessions logswitches undostat recovery_area processes recovery_status longactivesessions dataguard_stats performance locks systemparameter
ASYNC_SECTIONS: tablespaces rman jobs resumable iostats

I hope this helps to point to right direction.

Regards,
Olsi

You have to create the config file in /etc/check_mk and tell the plugin the location with

MK_CONFDIR=/etc/check_mk /usr/lib/check_mk_agent/plugins/mk_oracle -t

as @tosch wrote.

Hi,
I did create files but it still does not detect Oracle. I have another Oracle install based on 18c and everything is detected properly. Also there is no info if I should leave plugin as root:root or need to make them owned by oracle:oinstall.
Running plugin as root reports nothing, while running plugin as oracle reports:
[ TT085PRD ] ./mk_oracle -t
<<<oracle_instance>>>
<<<oracle_sessions>>>
<<<oracle_logswitches>>>
<<<oracle_undostat>>>
<<<oracle_recovery_area>>>
<<<oracle_processes>>>
<<<oracle_recovery_status>>>
<<<oracle_longactivesessions>>>
<<<oracle_dataguard_stats>>>
<<<oracle_performance>>>
<<<oracle_locks>>>
<<<oracle_systemparameter>>>
<<<oracle_tablespaces>>>
<<<oracle_rman>>>
<<<oracle_jobs>>>
<<<oracle_resumable>>>
<<<oracle_iostats>>>
<<<oracle_instance>>>
<<<oracle_processes>>>
<<<oracle_asm_diskgroup>>>

—login----------------------------------------------------------------
Operating System: Linux
ORACLE_HOME (GI): /u01/app/grid/product/19.0.0/grid_1
Logincheck to Instance: +ASM1
Version: 19.0
Logindetails: /@localhost:1521/+ASM1
Error Message: +ASM1|FAILURE|ERROR: ORA-12541: TNS:no listener SP2-0751: Unable to connect to Oracle. Exiting SQ
SYNC_SECTIONS: instance processes
ASYNC_SECTIONS: asm_diskgroup

./mk_oracle: line 613: : No such file or directory

Regards
Olsi

You always need to push the checkmk config directory if you run the plugin standalone:
MK_CONFDIR=/etc/check_mk/ /usr/lib/check_mk_agent/plugins/mk_oracle -t
(Please always run this command exactly as above, any other execution won’t work)

This is the only way how checkmk can find your installation and can set the environment to work as root.

Seems like your listener is not running?

Seems like you have defined a wrong connection in your config file?

it should be look something like

DBUSER='<user>:<password>:<role>:<dbhost>:<listenerport>'
ASMUSER='<user>:<password>:<role>:<dbhost>:<listenerport>'

For ASM you probably need to connect as SYSDBA role. Keep in mind in default installation you only can query your ASM instance from the local node if you are running a cluster.

Please always use the preformatted text option of the forum to preserve the special characters and give as a bit more readable text boxes.

Hi,
I was doing some checking and reading. It seems from root mk_oracle plugin does not report anything. Only when executed from oracle user it reports that ASM error. I check with DBA and there are 3 listeners active, port 1521 - default local listener, 1537 global listener and 1545 scan listener. I have following setup in mk_oracle.cfg:
DBUSER=‘checkmk:::localhost:1545’

But it does not detect Oracle at all.

Regards,
Olsi

I had some limited success. I added ASM user as well as some explicit variables in mk_oracle.cfg.
More precisely:

export TNS_ADMIN=/u01/app/oracle/product/19.0.0/db_1/network/admin
export ORACLE_SID=TT085PRD
export ORACLE_HOME=/u01/app/oracle/product/19.0.0/db_1

Now I can scan ASM but I hit following error:

/usr/lib/check_mk_agent/plugins/mk_oracle: line 613: : No such file or directory . It seems output of following command is blank:

/u01/app/grid/product/19.0.0/grid_1/bin/crsctl stat res -p -w ‘((TYPE = ora.database.type) and (GEN_USR_ORA_INST_NAME = TT085PRD))’

I am stuck how to debug this error.

Regards,
Olsi

Can you please read the manual carefully and follow our advice? Don’t put something at the cfg-file you think it should be there.

The mk_oracle plugin gathers all needed information about the oracle environment on it’s own if the really needed information are correctly configured inside the /etc/check_mk/mk_oracle.cfg.
As i wrote earlier, the minimum information needed are the following (from which some could be empty):

DBUSER='<user>:<password>:<role>:<dbhost>:<listenerport>'
ASMUSER='<user>:<password>:<role>:<dbhost>:<listenerport>'
1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.