Ad Widget

Collapse

Zabbix Agent 2 Oracle monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nioh
    Junior Member
    • Dec 2020
    • 15

    #1

    Zabbix Agent 2 Oracle monitoring

    Hi!

    I have configured Zabbix Agent 2 for Oracle monitoring.
    It works ok with default items. However when i configure custom querys the result value is always a string, and contains the result heading, not only the value.
    Is this something that i can change in the configuration?

    I attchaed an image of an example of the value i get from the custom query.

    I would like to get a Numeric or Float value, not a text string

    Seems like this custom query functionality is quite useless if all i get back is a string.

    Thanks!
    Attached Files
  • lbjensen
    Junior Member
    Zabbix Certified Specialist
    • Apr 2013
    • 16

    #2
    Hi
    You could put in
    set heading off
    set feedback off
    in your script for onlu returning the result

    You could also do preprocessing after the item is in Zabbix with the regex

    I have a question for you.
    How dod you configure the plugin for Oracle?
    I have a database server and the zabbix-agent2 running, but I get 0 values and only the error
    "Connection failed: ORA-00000: DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file"

    Cheers
    Lars

    Comment

    • nioh
      Junior Member
      • Dec 2020
      • 15

      #3
      Originally posted by cyber
      oracle.custom.query items? But it is returning json, so your results are normal

      oracle.custom.query[<connString>,<user>,<password>,<service>, queryName, <args…>]
      Result of a custom query. JSON object
      Oooh i see. Obivously its json, heh.

      How would i go ahead to convert it into a single digit? Zabbix triggers dont really like strings

      Comment

      • nioh
        Junior Member
        • Dec 2020
        • 15

        #4
        Originally posted by lbjensen
        Hi
        You could put in
        set heading off
        set feedback off
        in your script for onlu returning the result

        You could also do preprocessing after the item is in Zabbix with the regex

        I have a question for you.
        How dod you configure the plugin for Oracle?
        I have a database server and the zabbix-agent2 running, but I get 0 values and only the error
        "Connection failed: ORA-00000: DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file"

        Cheers
        Lars
        Do you have oracle instantclient installed on your zabbix server?

        Comment

        • nioh
          Junior Member
          • Dec 2020
          • 15

          #5
          Originally posted by cyber

          Preprocessing....JSONpath etc...
          I see, thanks! Will do some reading about it.
          Or do you have an example as well on how to solve my example in image above?

          Comment

          • Pfeifer8714
            Junior Member
            • Dec 2020
            • 1

            #6
            Thanks for the information keep sharing and helping people PrepaidCardStatus
            Last edited by Pfeifer8714; 09-12-2020, 11:16.

            Comment

            • djbelotto
              Junior Member
              • Mar 2021
              • 1

              #7
              Hello dears,
              I have a database server and the zabbix-agent2 running, but I get 0 values and only the error
              "Connection failed: ORA-00000: DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file"

              I tried to configure the LD_LIBRARY in every files as: /etc/bashrc /home/zabbix/.bash_profile /etc/sysconfig/zabbix-server ... etc.. and zabbix could not load this libclntsh lib...
              I am using CENTOS 8 and ZABBIX 5.4

              Could someone help me, please?
              Or could someone recommend me an other plugin to oracle monitoring..?

              Comment

              • olivierm
                Junior Member
                • Mar 2021
                • 2

                #8
                good pm,
                i have the exact same problem.
                dont understand. the lib is there and i put all oracle ENV.
                it's like the zabbix agent doesn't care about ENV.
                Did someone solve the problem ? (centos 8 and zabbix 5.4)

                Comment

                • olivierm
                  Junior Member
                  • Mar 2021
                  • 2

                  #9
                  it's resolve by using only IP adress in agent config file (/etc/zabbix/) instead of FQDN. dont know why
                  And/Or adding file /etc/sysconfig/zabbix-agent2 with

                  ORACLE_HOME=/opt/oracle/product/18c/dbhomeXE
                  ORACLE_SID=XE
                  LD_LIBRARY_PATH=/opt/oracle/product/18c/dbhomeXE/lib
                  PATH="/bin:/opt/oracle/product/18c/dbhomeXE/bin:/opt/oracle/product/18c/dbhomeXE/lib"

                  export ORACLE_HOME
                  export LD_LIBRARY_PATH
                  export ORACLE_SID
                  export PATH

                  Comment

                  • cyber
                    Senior Member
                    Zabbix Certified SpecialistZabbix Certified Professional
                    • Dec 2006
                    • 4807

                    #10
                    oracle.custom.query items? But it is returning json, so your results are normal

                    oracle.custom.query[<connString>,<user>,<password>,<service>, queryName, <args…>]
                    Result of a custom query. JSON object

                    Comment

                    • cyber
                      Senior Member
                      Zabbix Certified SpecialistZabbix Certified Professional
                      • Dec 2006
                      • 4807

                      #11
                      Originally posted by nioh

                      How would i go ahead to convert it into a single digit? Zabbix triggers dont really like strings
                      Preprocessing....JSONpath etc...

                      Comment

                      • adoang
                        Junior Member
                        • Sep 2021
                        • 7

                        #12
                        Hi,

                        I am facing issue when load asm. zabbix_server (Zabbix) 5.0.15. Please advise

                        Cannot create item: item with the same key "oracle.asm_free_size["{#DG_NAME}"]" already exists.
                        Cannot create item: item with the same key "oracle.asm_free_size["{#DG_NAME}"]" already exists.
                        Cannot create item: item with the same key "oracle.asm_free_size["{#DG_NAME}"]" already exists.
                        Cannot create item: item with the same key "oracle.asm_free_size["{#DG_NAME}"]" already exists.
                        Cannot create item: item with the same key "oracle.asm_free_size["{#DG_NAME}"]" already exists.

                        Comment


                        • lptarik
                          lptarik commented
                          Editing a comment
                          Change the DB_NAME to DBNAME , you will get asm but i still don't get data for items
                          Last edited by lptarik; 16-11-2021, 17:00.
                      Working...