Mk_oracle Locks Login into database failed

Hi all,

I’m trying to check our Oracle instance.

Version Oracle 11.2 on Windows

First i tryied the powershell plugin using the checkmk agent but is not fetching some data like locks, so I’m trying to use the mk_oracle plugin from de checkmk server with oracle instant client.

Windows with powershell:

If I run the ps1 manually I get good return of the script:

PS C:\Users\administrador> C:\Program Files (x86)\checkmk\service\plugins\mk_oracle.ps1
<<<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_old>>>
<<<oracle_tablespaces>>>
<<<oracle_rman>>>
<<<oracle_jobs>>>
<<<oracle_ts_quotas>>>
<<<oracle_resumable>>>
<<<oracle_instance>>>
<<<oracle_asm_diskgroup>>>
<<<oracle_instance:sep(124)>>>
CEUTRA2|11.2.0.4.0|OPEN|ALLOWED|STARTED|772731|2730202728|ARCHIVELOG|PRIMARY|NO|CEUTRA2|021020151423
<<<oracle_sessions:sep(124)>>>
CEUTRA2|124|776|195
<<<oracle_logswitches:sep(124)>>>
CEUTRA2|1
<<<oracle_undostat:sep(124)>>>
CEUTRA2|688|5|1057|277|0
<<<oracle_recovery_area:sep(124)>>>
<<<oracle_processes:sep(124)>>>
CEUTRA2|110|500
<<<oracle_recovery_status:sep(124)>>>
CEUTRA2|ceutra2|PRIMARY|READ WRITE|1|1632985666|2523|ONLINE|NO|YES|14967028794020
CEUTRA2|ceutra2|PRIMARY|READ WRITE|2|1632985666|2523|ONLINE|NO|YES|14967028794020
CEUTRA2|ceutra2|PRIMARY|READ WRITE|3|1632985666|2523|ONLINE|NO|YES|14967028794020
CEUTRA2|ceutra2|PRIMARY|READ WRITE|4|1632985666|2523|ONLINE|NO|YES|14967028794020
CEUTRA2|ceutra2|PRIMARY|READ WRITE|5|1632985666|2523|ONLINE|NO|YES|14967028794020
CEUTRA2|ceutra2|PRIMARY|READ WRITE|6|1632985666|2523|ONLINE|NO|YES|14967028794020
CEUTRA2|ceutra2|PRIMARY|READ WRITE|7|1632985666|2523|ONLINE|NO|YES|14967028794020
CEUTRA2|ceutra2|PRIMARY|READ WRITE|8|1632985666|2523|ONLINE|NO|YES|14967028794020
<<<oracle_longactivesessions:sep(124)>>>
CEUTRA2||||||||
<<<oracle_dataguard_stats:sep(124)>>>
<<<oracle_performance:sep(124)>>>
CEUTRA2|sys_time_model|DB CPU|593195
CEUTRA2|sys_time_model|DB time|2427101
CEUTRA2|buffer_pool_statistics|DEFAULT|3723556350|3654236047|16846550502|3418431582|75350786|0|50485179
CEUTRA2|SGA_info|Fixed SGA Size|2293088
CEUTRA2|SGA_info|Redo Buffers|19492864
CEUTRA2|SGA_info|Buffer Cache Size|4731174912
CEUTRA2|SGA_info|Shared Pool Size|1509949440
CEUTRA2|SGA_info|Large Pool Size|50331648
CEUTRA2|SGA_info|Java Pool Size|33554432
CEUTRA2|SGA_info|Streams Pool Size|16777216
CEUTRA2|SGA_info|Shared IO Pool Size|0
CEUTRA2|SGA_info|Granule Size|16777216
CEUTRA2|SGA_info|Maximum SGA Size|6363574272
CEUTRA2|SGA_info|Startup overhead in Shared Pool|220877616
CEUTRA2|SGA_info|Free SGA Memory Available|0
CEUTRA2|librarycache|SQL AREA|22238954|16911288|1117108936|1101866084|2282595|889023
CEUTRA2|librarycache|TABLE/PROCEDURE|31785785|31036488|198237712|194335850|1976332|0
CEUTRA2|librarycache|BODY|852941|832332|13627576|13540015|54756|933
CEUTRA2|librarycache|TRIGGER|589460|561150|22381741|22218563|131845|0
CEUTRA2|librarycache|INDEX|72836|60806|64032|41121|22|0
CEUTRA2|librarycache|CLUSTER|254815|251849|255770|252804|0|0
CEUTRA2|librarycache|DIRECTORY|10|0|20|0|0|0
CEUTRA2|librarycache|QUEUE|16122|16091|2375338|2373651|1397|0
CEUTRA2|librarycache|JAVA SOURCE|1|0|2|0|0|0
CEUTRA2|librarycache|SUMMARY|2207|1804|1952|1454|99|137
CEUTRA2|librarycache|APP CONTEXT|244|242|37403|37191|210|0
CEUTRA2|librarycache|RULESET|34|25|487|349|125|0
CEUTRA2|librarycache|XML SCHEMA|13|4|18|3|0|0
CEUTRA2|librarycache|SUBSCRIPTION|5183|5173|5183|3835|1338|0
CEUTRA2|librarycache|LOCATION|1398|144|1398|144|0|0
CEUTRA2|librarycache|JAVA DATA|4|1|855|849|0|0
CEUTRA2|librarycache|TRANSFORMATION|1|0|1|0|0|0
CEUTRA2|librarycache|RULE|14|7|14|7|0|0
CEUTRA2|librarycache|XDB CONFIG|1|0|1|0|0|0
CEUTRA2|librarycache|USER AGENT|106|84|53|31|0|0
CEUTRA2|librarycache|TEMPORARY TABLE|5085|3497|5085|0|3497|0
CEUTRA2|librarycache|TEMPORARY INDEX|1906|9|1906|0|9|0
CEUTRA2|librarycache|EDITION|410405|410395|817764|817743|1|0
CEUTRA2|librarycache|DBLINK|7040494|7037766|0|0|0|0
CEUTRA2|librarycache|OBJECT ID|1204|0|0|0|0|0
CEUTRA2|librarycache|SCHEMA|1296284|1292865|0|0|0|0
CEUTRA2|librarycache|DBINSTANCE|1|0|0|0|0|0
CEUTRA2|librarycache|SQL AREA STATS|5253125|912106|5253126|911951|155|0
CEUTRA2|librarycache|ACCOUNT_STATUS|972271|959527|0|0|0|0
CEUTRA2|librarycache|SQL AREA BUILD|5784625|777728|0|0|0|0
<<<oracle_locks:sep(124)>>>
CEUTRA2|||||||||
<<<oracle_tablespaces:sep(124)>>>
CEUTRA2|N:\CEUTRA2\XXXXX_DATOS02.DBF|XXXXX_DATOS|AVAILABLE|YES|393216|4194302|393088|32768|ONLINE|8192|ONLINE|61696|PERMANENT|11.2.0.4.0
CEUTRA2|O:\CEUTRA2\XXXXX_DATOS03.DBF|XXXXXXXVAILABLE|YES|229376|4194302|229248|32768|ONLINE|8192|ONLINE|4736|PERMANENT|11.2.0.4.0
CEUTRA2|M:\CEUTRA2\CEUTRA2_01.DBF|CEUTRA2|AVAILABLE|NO|19200|0|19072|0|ONLINE|8192|ONLINE|19072|PERMANENT|11.2.0.4.0
CEUTRA2|N:\CEUTRA2\CEUTRA2_DATA_02.DBF|CEUTRA2_DATA|AVAILABLE|YES|3200000|2560000|3199872|640|ONLINE|8192|ONLINE|498312|PERMANENT|11.2.0.4.0

<<<oracle_rman:sep(124)>>>
CEUTRA2|COMPLETED|2020-07-26_09:32:10|2020-07-26_09:32:10|DB_INCR|0|620538|0
CEUTRA2|COMPLETED||2021-07-05_17:07:43|CONTROLFILE||124722|0
<<<oracle_jobs:sep(124)>>>
CEUTRA2|LOGIFRIODIANA|JOB_SINCRONIZAR_DATOS_SENDA|SCHEDULED|42|438577|TRUE|30-SEP-21 01.53.55.000000 AM AMERICA/SANTIAGO|-|FAILED
CEUTRA2|EXFSYS|RLM$SCHDNEGACTION|SCHEDULED|0|54675|TRUE|30-SEP-21 08.07.17.000000 AM +02:00|-|SUCCEEDED
CEUTRA2|MORFEO|ACTUALIZA_BALANCE_DIA|SCHEDULED|0|629241|TRUE|30-SEP-21 07.50.10.000000 AM +02:00|-|SUCCEEDED
CEUTRA2|PADUA_PRO|JOB_AGRUPACION_DIA|SCHEDULED|398|419|TRUE|01-OCT-21 03.00.00.000000 AM +02:00|-|SUCCEEDED
<<<oracle_ts_quotas:sep(124)>>>
CEUTRA2|||
<<<oracle_resumable:sep(124)>>>
CEUTRA2|||||||||


PS C:\Users\administrador> 

Is not discovering locks for example.

I have also tried using checkmk server with oracle instant client and mk_oracle plugin but is not working too.

/etc/check_mk/mk_oracle.cfg

DBUSER=‘checkmk:XXX:SYSDBA:HOST:1521’

REMOTE_INSTANCE_1=‘check_mk:XXXX::HOST:1521:piggyhostt:CEUTRA2:11.2’
REMOTE_ORACLE_HOME=‘L:\oracle\product\11.2.0’

ASYNC_SECTIONS=‘jobs locks resumable rman tablespaces ts_quotas’

root@srvmonitoring:~# /usr/lib/check_mk_agent/plugins/mk_oracle -t
root@srvmonitoring:~#

Many thanks for your help!