Ad Widget

Collapse

Oracle Agent 2 give errors

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • studero
    Member
    • Aug 2023
    • 84

    #1

    Oracle Agent 2 give errors

    Hi,

    Seens some day, the agent Zabbix for Oracle does not work correctly. I use Zabbix 6.4.18 server version.

    I have many item with the following error , in the file /var/log/zabbix/zabbix_server.log :

    "Preprocessing failed for:
    1. Failed: cannot extract value from json by path "$.['Active Parallel Sessions']": invalid object format, expected opening character '{' or '[' at: ''


    Why ? I need help
    Regards
    Olivier
  • kamil1
    Member
    • Aug 2024
    • 40

    #2
    Hi,
    First of all I would try to run manually the “Active Parallel Session” queries on Oracle db. Maybe there is something wrong with the data returned from the database or the query produces the empty response. This is vary likely judging on the log error: expected opening character '{' or '[' at: ‘.
    If the above hypothesis is not correct, you might turn on more verbose logging by setting: DebugLevel=4 in Zabbix server config.

    Kamil

    Comment

    • studero
      Member
      • Aug 2023
      • 84

      #3
      Originally posted by kamil1
      Hi,
      First of all I would try to run manually the “Active Parallel Session” queries on Oracle db. Maybe there is something wrong with the data returned from the database or the query produces the empty response. This is vary likely judging on the log error: expected opening character '{' or '[' at: ‘.
      If the above hypothesis is not correct, you might turn on more verbose logging by setting: DebugLevel=4 in Zabbix server config.

      Kamil
      Hi Kamil,

      I have test the query with using zabbix_get tool. And the result was empty. And this is true, because the Zabbix Oracle Agent 2 does not run the query to the Oracle view in the PDB instance but only on the CDB.

      Regards
      Olivier

      Comment

      • kamil1
        Member
        • Aug 2024
        • 40

        #4
        Could you share the more verbose logging from server as advised above?
        Thanks

        Comment

        • studero
          Member
          • Aug 2023
          • 84

          #5
          Originally posted by kamil1
          Could you share the more verbose logging from server as advised above?
          Thanks
          see output:
          80291:20240827:120700.508 End of DCconfig_get_poller_items():1
          80291:20240827:120700.508 In substitute_key_macros_impl() data:'system.swap.size[,free]'
          80291:20240827:120700.508 End of substitute_key_macros_impl():SUCCEED data:'system.swap.size[,free]'
          80291:20240827:120700.508 In substitute_simple_macros_impl() data:'10050'
          80291:20240827:120700.508 End substitute_simple_macros_impl() data:'10050'
          80291:20240827:120700.508 In get_value() key:'system.swap.size[,free]'
          80255:20240827:120700.508 [2] In pp_execute(): value: type:string
          80255:20240827:120700.509 [2] End of pp_execute(): value:'' type:string
          80291:20240827:120700.509 In get_value_agent() host:'svx-ora-11e' addr:'134.21.50.150' key:'system.swap.size[,free]' conn:'unencrypted'
          80255:20240827:120700.509 End of zbx_ipc_service_recv():2
          80255:20240827:120700.509 In zbx_pp_manager_process_finished()
          80255:20240827:120700.509 End of zbx_pp_manager_process_finished() values_num:1
          80255:20240827:120700.509 In preprocessing_flush_value()
          80255:20240827:120700.509 End of preprocessing_flush_value()
          80255:20240827:120700.509 In zbx_ipc_service_recv() timeout:1.000
          80255:20240827:120700.509 [3] In pp_execute(): value: type:string
          80255:20240827:120700.509 [3] In pp_execute_step() step:12 params:'$.['Rows Per Sort']' value:'' cache:0x563bc4fd3360
          80255:20240827:120700.509 [3] End of pp_execute_step() ret:FAIL value:cannot extract value from json by path "$.['Rows Per Sort']": invalid object format, expected opening character '{' or '[' at: ''
          80255:20240827:120700.509 [3] End of pp_execute(): value:'Preprocessing failed for:
          1. Failed: cannot extract value from json by path "$.['Rows Per Sort']": invalid object format, expected opening character '{' or '[' at: ''' type:error
          80255:20240827:120700.509 End of zbx_ipc_service_recv():2
          80255:20240827:120700.509 In zbx_pp_manager_process_finished()
          80255:20240827:120700.509 End of zbx_pp_manager_process_finished() values_num:1
          80255:20240827:120700.509 In preprocessing_flush_value()
          80255:20240827:120700.509 [2] In pp_execute(): value: type:string
          80255:20240827:120700.509 [2] In pp_execute_step() step:12 params:'$.['Active Parallel Sessions']' value:'' cache:0x563bc4fd3360
          80255:20240827:120700.509 [2] End of pp_execute_step() ret:FAIL value:cannot extract value from json by path "$.['Active Parallel Sessions']": invalid object format, expected opening character '{' or '[' at: ''
          80255:20240827:120700.509 End of preprocessing_flush_value()
          80255:20240827:120700.509 In zbx_ipc_service_recv() timeout:1.000
          80255:20240827:120700.509 [2] End of pp_execute(): value:'Preprocessing failed for:
          1. Failed: cannot extract value from json by path "$.['Active Parallel Sessions']": invalid object format, expected opening character '{' or '[' at: ''' type:error
          80255:20240827:120700.509 [2] In pp_execute(): value: type:string
          80255:20240827:120700.509 [2] In pp_execute_step() step:12 params:'$.['Total Sorts Per User Call']' value:'' cache:0x563bc4fd3360
          80255:20240827:120700.509 [2] End of pp_execute_step() ret:FAIL value:cannot extract value from json by path "$.['Total Sorts Per User Call']": invalid object format, expected opening character '{' or '[' at: ''
          80255:20240827:120700.509 [1] In pp_execute(): value: type:string
          80255:20240827:120700.509 [1] In pp_execute_step() step:12 params:'$.['SQL Service Response Time']' value:'' cache:0x563bc4fd3360
          80255:20240827:120700.509 [1] End of pp_execute_step() ret:FAIL value:cannot extract value from json by path "$.['SQL Service Response Time']": invalid object format, expected opening character '{' or '[' at: ''
          80255:20240827:120700.509 [3] In pp_execute(): value: type:string
          80255:20240827:120700.509 [3] In pp_execute_step() step:12 params:'$.['Shared Pool Free %']' value:'' cache:0x563bc4fd3360
          80255:20240827:120700.509 [3] End of pp_execute_step() ret:FAIL value:cannot extract value from json by path "$.['Shared Pool Free %']": invalid object format, expected opening character '{' or '[' at: ''
          80255:20240827:120700.509 [3] End of pp_execute(): value:'Preprocessing failed for:
          1. Failed: cannot extract value from json by path "$.['Shared Pool Free %']": invalid object format, expected opening character '{' or '[' at: ''' type:error
          80255:20240827:120700.509 [3] In pp_execute(): value: type:string
          80255:20240827:120700.509 [3] In pp_execute_step() step:12 params:'$.['Temp Space Used']' value:'' cache:0x563bc4fd3360

          Comment

          • kamil1
            Member
            • Aug 2024
            • 40

            #6
            Hi Olivier,

            All the preprocessing items that fail are dependent items under this master item:
            oracle.sys.metrics["{$ORACLE.CONNSTRING}","{$ORACLE.USER}","{$ORA CLE. PASSWORD}","{$ORACLE.SERVICE}"]

            Could you please go to this master item and check what is the output (use the Test option). If no output is resturned, verify the above macros.

            Kamil

            Comment

            • studero
              Member
              • Aug 2023
              • 84

              #7
              Originally posted by kamil1
              Hi Olivier,

              All the preprocessing items that fail are dependent items under this master item:
              oracle.sys.metrics["{$ORACLE.CONNSTRING}","{$ORACLE.USER}","{$ORA CLE. PASSWORD}","{$ORACLE.SERVICE}"]

              Could you please go to this master item and check what is the output (use the Test option). If no output is resturned, verify the above macros.

              Kamil
              Hi Kamil,

              If I run the following to access to the CDB, that's work.
              # zabbix_get -s svx-ora-11e -k oracle.sys.metrics["tcp://svx-ora-11e:1521","zabbix","password","cdb "]
              {"Buffer Cache Hit Ratio":82.82,"Memory Sorts Ratio":100,"Redo Allocation Hit Ratio":100,"User Transaction Per Sec":4.092,"Physical Reads Per Sec":210462.637,"Physical Reads Per Txn":51437.761,"Physical Writes Per Sec":5.321,"Physical Writes Per Txn":1.3,"Physical Reads Direct Per Sec":204726.789,"Physical Reads Direct Per Txn":50035.901,"Physical Writes Direct Per Sec":0.017,"Physical Writes Direct Per Txn":0.004,"Physical Reads Direct Lobs Per Sec":2.105,"Physical Reads Direct Lobs Per Txn":0.514,"Physical Writes Direct Lobs Per Sec":0.017,"Physical Writes Direct Lobs Per Txn":0.004,"Redo Generated Per Sec":10866.139,"Redo Generated Per Txn":2655.72,"Logons Per Sec":0.32,"Logons Per Txn":0.078,"Open Cursors Per Sec":95.774,"Open Cursors Per Txn":23.407,"User Commits Per Sec":3.906,"User Commits Percentage":95.473,"User Rollbacks Per Sec":0.185,"User Rollbacks Percentage" ...
              "Total PGA Allocated":1924729856,"Total PGA Used by SQL Workareas":487424,"Run Queue Per Sec":0,"VM in bytes Per Sec":12759.05,"VM out bytes Per Sec":0}
              #

              But I I run the same command on the PDB, the return value is empty .
              # zabbix_get -s svx-ora-11e -k oracle.sys.metrics["tcp://svx-ora-11e:1521","zabbix","password","pdb"]

              #

              This is normal to have an empty result. Because the Zabbix key oracle.sys.metrics return the result of the table v$sysmetrics. But this table does not exist on the PDB. On PDB, the view is v$con_sysmetric.

              See Zabbix ticket : [ZBXNEXT-8408] Insufficient monitoring on Oracle CDB/PDB - ZABBIX SUPPORT

              Zabbix company need to implemented the solution write on the ticket.

              Regards
              Olivier

              Comment

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

                #8
                Originally posted by studero
                And this is true, because the Zabbix Oracle Agent 2 does not run the query to the Oracle view in the PDB instance but only on the CDB.
                If we look on plugin code, then there are handlers for pdb and cdb and for all kind of other things... You can track from there, wha queries are used... I have not used that plugin myself, but are you sure all config is OK...?


                Comment

                Working...