Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.12.3 available

The official documentation can be found on https://wiki.ocsinventory-ng.org. Read it before asking your question.

Oracle module does not work

Hi Team,

Kindly ask you advice how to correctly configure OCS module for collect information about installed Oracle DB.

I`ve installed Unix Agent 2.3 on CentOS 7.

Oracle DB has been installed from Oracle user.

Added  use Ocsinventory::Agent::Modules::Databases::Oracle;

to /etc/ocsinventory/modules.conf.

 run agent ( from root and oracle user) but I did not get ORACLE_INSTANCE tag in log.

 ocsinventory-agent --debug --local /tmp/test/

I`ve tried Uptime module and got correct result in XML.

Could you please help?

in OCS Inventory NG agent for Unix by (400 points)

10 Answers

0 votes
Hi,

Post ocsinventory-agent.log file content.

Regards

Frank
by (90.2k points)
0 votes
by (400 points)
0 votes
<ORACLE_INSTANCE>
      <AUTOSTART>0</AUTOSTART>
      <BUNDLE>N/A</BUNDLE>
      <NAME>orcl</NAME>
      <VERSION>12.2.0.1.0</VERSION>
</ORACLE_INSTANCE>

I found this block in ocsinventory-agent.log file. The block must be also present in the xml file. As I can see you have some errors that have been corrected with the last version. Update your agent to latest version if your server has 2.4 version.

Regards

Frank

by (90.2k points)
0 votes

Dear Frank,

Thanks!  But I am not able to get Bungle verison.

root user can read file from : $ORACLE_HOME/inventory/Components21/oracle.server/*/context.xml

Version of Oracle produce is empty <BUNDLE>N/A</BUNDLE>

I am looking for test Enterprise DB.

# cat $ORACLE_HOME/inventory/Components21/oracle.server/*/context.xml | grep EE
      <VAR NAME="sl_dbCharSet" TYPE="StringList" DESC_RES_ID="sl_dbCharSet_DESC"                                                                                         SECURE="F" VAL="Unicode standard UTF-8 AL32UTF8,West European WE8ISO8859P15,Wes                                                                                        t European WE8MSWIN1252,East European EE8ISO8859P2,East European EE8MSWIN1250,No                                                                                        rth European NE8ISO8859P10,Baltic NEE8ISO8859P4,Baltic BLT8MSWIN1257,Baltic BLT8                                                                                        ISO8859P13,Cyrillic CL8ISO8859P5,Cyrillic CL8MSWIN1251,Arabic AR8ISO8859P6,Arabi                                                                                        c AR8MSWIN1256,Greek EL8ISO8859P7,Greek EL8MSWIN1253,Hebrew IW8ISO8859P8,Hebrew                                                                                         IW8MSWIN1255,Japanese JA16EUC,Japanese JA16EUCTILDE,Japanese JA16SJIS,Japanese J                                                                                        A16SJISTILDE,Korean KO16MSWIN949,Simplified Chinese ZHS16GBK,Thai TH8TISASCII,Tr                                                                                        aditional Chinese ZHT32EUC,Traditional Chinese ZHT16MSWIN950,Traditional Chinese                                                                                         ZHT16HKSCS,Turkish WE8ISO8859P9,Turkish TR8MSWIN1254,Vietnamese VN8MSWIN1258" A                                                                                        DV="F" CLONABLE="T" USER_INPUT="CALC"/>
      <CONST NAME="cs_eastChSet2" PLAT_SP="F" TYPE="String" TRANS="F" VAL="EE8MS                                                                                        WIN1250"/>
      <CONST NAME="cs_eastChSet1" PLAT_SP="F" TYPE="String" TRANS="F" VAL="EE8IS                                                                                        O8859P2"/>
      <CONST NAME="EE_DESC" PLAT_SP="F" TYPE="String" TRANS="T" VAL="EE_DESC_ALL                                                                                        "/>
      <CONST NAME="cs_balticChSet1" PLAT_SP="F" TYPE="String" TRANS="F" VAL="NE                                                                                         8ISO8859P4"/>
      <CONST NAME="EE" PLAT_SP="F" TYPE="String" TRANS="T" VAL="EE_ALL"/>

by (400 points)
0 votes
Is $ORACLE_HOME correctly configured? The plugin has not retrieved this variable, this is why bundle is set to N/A.

Regards

Frank
by (90.2k points)
0 votes

Frank, i did.

[root@ws-4386-virt2 ~]# pwd
/root
[root@ws-4386-virt2 ~]# vim .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/12.2.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/lib64; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

.....

[root@ws-4386-virt2 log]# ls $ORACLE_HOME
addnode     cdata        ctx     dc_ocm       dv       instantclient  jlib  mgw      olap         ord    owm      R         schagent.conf  sqlpatch  ucp
apex        cfgtoollogs  cv      deinstall    env.ora  inventory      ldap  network  OPatch       ordim  perl     racg      scheduler      sqlplus   usm
assistants  clone        data    demo         has      javavm         lib   nls      opmn         ords   plsql    rdbms     slax           srvm      utl
bin         crs          dbjava  diagnostics  hs       jdbc           log   oc4j     oracore      oss    precomp  relnotes  sqldeveloper   suptools  wwg
ccr         css          dbs     dmu          install  jdk            md    odbc     oraInst.loc  oui    QOpatch  root.sh   sqlj           sysman    xdk
[root@ws-4386-virt2 log]# pwd
/var/log
[root@ws-4386-virt2 log]# echo $ORACLE_HOME
/u01/app/oracle/product/12.2.0/dbhome_1
[root@ws-4386-virt2 log]# cat u01/app/oracle/product/12.2.0/dbhome_1/inventory/Components21/oracle.server/*/context.xml | grep EE                                            <VAR NAME="sl_dbCharSet" TYPE="StringList" DESC_RES_ID="sl_dbCharSet_DESC" SECURE="F" VAL="Unicode standard UTF-8 AL32UTF8,West European WE8ISO8859P15,West European WE8MSWIN1252,East European EE8ISO8859P2,East European EE8MSWIN1250,North European NE8ISO8859P10,Baltic NEE8ISO8859P4,Baltic BLT8MSWIN1257,Baltic BLT8ISO8859P13,Cyrillic CL8ISO8859P5,Cyrillic CL8MSWIN1251,Arabic AR8ISO8859P6,Arabic AR8MSWIN1256,Greek EL8ISO8859P7,Greek EL8MSWIN1253,Hebrew IW8ISO8859P8,Hebrew IW8MSWIN1255,Japanese JA16EUC,Japanese JA16EUCTILDE,Japanese JA16SJIS,Japanese JA16SJISTILDE,Korean KO16MSWIN949,Simplified Chinese ZHS16GBK,Thai TH8TISASCII,Traditional Chinese ZHT32EUC,Traditional Chinese ZHT16MSWIN950,Traditional Chinese ZHT16HKSCS,Turkish WE8ISO8859P9,Turkish TR8MSWIN1254,Vietnamese VN8MSWIN1258" ADV="F" CLONABLE="T" USER_INPUT="CALC"/>
      <CONST NAME="cs_eastChSet2" PLAT_SP="F" TYPE="String" TRANS="F" VAL="EE8MSWIN1250"/>
      <CONST NAME="cs_eastChSet1" PLAT_SP="F" TYPE="String" TRANS="F" VAL="EE8ISO8859P2"/>
      <CONST NAME="EE_DESC" PLAT_SP="F" TYPE="String" TRANS="T" VAL="EE_DESC_ALL"/>
      <CONST NAME="cs_balticChSet1" PLAT_SP="F" TYPE="String" TRANS="F" VAL="NEE8ISO8859P4"/>
      <CONST NAME="EE" PLAT_SP="F" TYPE="String" TRANS="T" VAL="EE_ALL"/>
[root@ws-4386-virt2 log]#

and got some result in log:

  <ORACLE_INSTANCE>
      <AUTOSTART>0</AUTOSTART>
      <BUNDLE>N/A</BUNDLE>
      <NAME>orcl</NAME>
      <VERSION>12.2.0.1.0</VERSION>
    </ORACLE_INSTANCE>

by (400 points)
0 votes
Could you post /etc/oratab file content, please?

Regards

Frank
by (90.2k points)
0 votes

Dear Frank,

[root@ws-4386-virt2 oracle]# cat /etc/oratab
#

# 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.
#
#
orcl:/u01/app/oracle/product/12.2.0/dbhome_1:N

by (400 points)
0 votes
Dear Frank,

Kindly ask your advice.

Best regards,
by (400 points)
0 votes
Hi Nikolay

Please post content of Context.xml file where "s_serverInstallType" can be found.

Regards

Frank
by (90.2k points)
 
Powered by Question2Answer
...