zabora icon indicating copy to clipboard operation
zabora copied to clipboard

Zabora with Container Databases (CDB) and Pluggable Databases (PDB)

Open w00binda opened this issue 3 years ago • 5 comments

Hello Sergio, we've installed Zabora plugin but we have some problem. Version: Zabbix 4.0.3 Linux Version: Oracle Linux Server release 7.4 Zabora 1.5.4

We are using Oracle Container Database (CDB) with Pluggable Databases. If we point to the Container Database, zabora.sh works pretty fine, but we need to monitor the pluggable database. And if we try to point to that the script hangs whitout any result.

Example:

export ORACLE_SID=CONTAINERDB
ksh /etc/zabbix/scripts/agentd/zabora/zabora.sh -o "${ORACLE_SID}" -s db_version -a 1
Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production
export ORACLE_SID=PLUGGABLEDB
ksh /etc/zabbix/scripts/agentd/zabora/zabora.sh -o "${ORACLE_SID}" -s db_version -a 1
hangs with no result

Do you have any idea?

Inside /etc/oratab we have something like: CONTAINERDB:/oracle12c/app/oracle/product/12c:Y

And if we try to change there CONTAINERDB with PLUGGABLEDB, the script doesn't works.

Thanks in advance for any suggestion.

w00binda avatar Mar 11 '21 07:03 w00binda

Hi @w00binda,

Thanks for your information. The script uses the oratab to setup the oracle environment so it is mandatory to have this properly setup. I would recommend to include the PLUGGABLEDB to your oratab with the right ORACLE_HOME. If this is still not working, please include how do you use to use sqlplus with your PLUGGABLEDB and also include the environment variables.

Regards, Sergio

sergiotocalini avatar Mar 11 '21 09:03 sergiotocalini

Hi Sergio and thank you for your answer.

We've tried to add the pluggable DB inside /etc/oratab without success.

# This file is used by ORACLE utilities. It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.

# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third field indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
CONTAINERDB:/oracle12c/app/oracle/product/12c:Y
PLUGGABLEDB:/oracle12c/app/oracle/product/12c:Y

If we try this command:

ksh /etc/zabbix/scripts/agentd/zabora/zabora.sh -o PLUGGABLEDB -s tb_list

We get this is the error:

ERROR: ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist Linux-x86_64 Error: 2: No such file or directory Additional information: 3701 Additional information: 902253311 Process ID: 0 Session ID: 0 Serial number: 0 ERROR: ORA-01017: invalid username/password; logon denied ERROR: ORA-01017: invalid username/password; logon denied SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

Username and password are correct inside zabora.conf

We also tried with zabora.oraenv but we get the same error.

ORACLE_SID=PLUGGABLEDB
ORACLE_HOME=/oracle12c/app/oracle/product/12c
PATH=PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID ORACLE_HOME PATH

If we change the sqlplus command like this inside zabora.sh

sqlplus -s user/[email protected] @${SQL} "${SQL_ARGS}"

The script works correctly, but it's a bit less flexible.

Regards.

w00binda avatar Mar 11 '21 17:03 w00binda

Hi @w00binda,

It seems that your instances is not allowing to login from the sqlplus with localhost. It is not related with the script is an oracle misconfiguration. Please review your configuration on the listeners about this.

Regards, Sergio

sergiotocalini avatar Mar 11 '21 21:03 sergiotocalini

Hi @w00binda,

how do you solve this config ?

Thanks

adoang1919 avatar Oct 12 '21 01:10 adoang1919

Hi @w00binda,

Thanks for opening the issue. Are you facing the same issue? It seems @w00binda found a solution but please feel free to share here the issue you got.

Regards, Sergio

sergiotocalini avatar Jan 11 '22 10:01 sergiotocalini