Ad Widget

Collapse

Zabbix 5.4 fails to monitor Oracle

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Joseph3158
    Junior Member
    • Jan 2022
    • 8

    #1

    Zabbix 5.4 fails to monitor Oracle

    Hi All,


    I monitor Oracle through zabbix 5.4, but the zabbix agent fails to fetch, and the agent message is as follows:
    Oracle: Failed to fetch info data (or no data for 30m)


    The settings are as follows:
    {$ORACLE.CONNSTRING} = tcp://10.1.5.52:1521
    {$ORACLE.PASSWORD} = zabbix
    {$ORACLE.SERVICE} = TGLAB
    {$ORACLE.USER} = zabbix_mon

    cat /etc/odbc.ini
    [TGLAB]
    Driver= Oracle19gdriver
    DSN = TGLAB
    ServerName= //uat-scan:1521/tglab
    UserID= zabbix_mon
    Password= zabbix


    isql testare as follows:
    root@ZABBIX_T:~# isql -v TGLAB
    +---------------------------------------+
    | Connected! |
    | |
    | sql-statement |
    | help [tablename] |
    | quit |
    | |
    +---------------------------------------+
    SQL>

    help Me, Please
  • Mbar
    Junior Member
    • Jan 2022
    • 10

    #2
    What is your Linux Zabbix agent version?

    Comment

    • Joseph3158
      Junior Member
      • Jan 2022
      • 8

      #3
      Zabbix agent version is 5.4.9

      Comment

      • Mbar
        Junior Member
        • Jan 2022
        • 10

        #4
        Originally posted by Joseph3158
        Zabbix agent version is 5.4.9
        That is the server version.

        If you are running v1 of the agent that doesn't come with the Oracle module.

        Agent v2 has the Oracle module.

        The agent is the software installed on all the computers you want to monitor from the Server or proxy.
        Last edited by Mbar; 13-01-2022, 05:32.

        Comment

        • Joseph3158
          Junior Member
          • Jan 2022
          • 8

          #5
          Hi,

          My Oracle by Zabbix agent 2 settings are as follows:
          {$ORACLE.CONNSTRING}=tcp://10.1.5.52:1521
          {$ORACLE.PASSWORD}=zabbix
          {$ORACLE.SERVICE}=TGLAB
          {$ORACLE.USER}=zabbix_mon

          but agent message is:
          Oracle: Failed to fetch info data (or no data for 30m)

          help Me, Please

          Comment

          • Mbar
            Junior Member
            • Jan 2022
            • 10

            #6
            The Zabbix Oracle module wants the environment variable LD_LIBRARY_PATH configured to point to the Oracle client library.

            Check the environment variable is set. Add that in your .profile
            Eg:
            export LD_LIBRARY_PATH=/usr/lib/instantclient_18_5

            Depending on what you want to do - the configured used needs privileged access to the DB since it is accessing the tablespaces, DB sessions data, etc.

            Can the user log in as sysdba?
            Last edited by Mbar; 13-01-2022, 06:06.

            Comment

            • Joseph3158
              Junior Member
              • Jan 2022
              • 8

              #7
              Hi,

              LD_LIBRARY_PATH=/u1/instantclient_21_4

              Can the user log in as sysdba?

              root@ZABBIX_T:~# sqlplus sys@TGLAB as sysdba

              SQL*Plus: Release 21.0.0.0.0 - Production on Thu Jan 13 12:09:02 2022
              Version 21.4.0.0.0

              Copyright (c) 1982, 2021, Oracle. All rights reserved.

              Enter password:

              Connected to:
              Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
              Version 19.10.0.0.0

              SQL>

              Comment

              • Mbar
                Junior Member
                • Jan 2022
                • 10

                #8
                Originally posted by Joseph3158
                Hi,

                LD_LIBRARY_PATH=/u1/instantclient_21_4

                Can the user log in as sysdba?

                root@ZABBIX_T:~# sqlplus sys@TGLAB as sysdba

                Here you are logging in as "sys"

                The zabbix user is: zabbix_mon

                Comment

                • Joseph3158
                  Junior Member
                  • Jan 2022
                  • 8

                  #9
                  Hi,

                  root@ZABBIX_T:~# sqlplus zabbix_mon@TGLAB

                  SQL*Plus: Release 21.0.0.0.0 - Production on Thu Jan 13 12:12:09 2022
                  Version 21.4.0.0.0

                  Copyright (c) 1982, 2021, Oracle. All rights reserved.

                  Enter password:
                  Last Successful login time: Thu Jan 13 2022 11:52:06 +08:00

                  Connected to:
                  Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
                  Version 19.10.0.0.0

                  SQL>

                  zabbix_mon need sysdba?

                  Comment

                  • Mbar
                    Junior Member
                    • Jan 2022
                    • 10

                    #10
                    Yes, I believe a large chunk of the autodiscovery items needs dba privileges to monitor the database.

                    I haven't got a list of tables/views that the module needs to access, though a simple db user will not be able to view db statistics and see all the databases.

                    That might be why you are getting no useful data.

                    Comment

                    • Joseph3158
                      Junior Member
                      • Jan 2022
                      • 8

                      #11
                      Hi,

                      root@ZABBIX_T:~# sqlplus zabbix_mon@TGLAB as sysdba

                      SQL*Plus: Release 21.0.0.0.0 - Production on Thu Jan 13 12:21:56 2022
                      Version 21.4.0.0.0

                      Copyright (c) 1982, 2021, Oracle. All rights reserved.

                      Enter password:

                      Connected to:
                      Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
                      Version 19.10.0.0.0

                      SQL>

                      Try.

                      Comment

                      • Mbar
                        Junior Member
                        • Jan 2022
                        • 10

                        #12
                        Did it work?

                        Comment

                        • Joseph3158
                          Junior Member
                          • Jan 2022
                          • 8

                          #13
                          Hi,

                          No...

                          Comment

                          Working...