Ad Widget

Collapse

How to proceed with "no data matches the specified path"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JSERRAHIMA
    Junior Member
    • May 2021
    • 16

    #1

    How to proceed with "no data matches the specified path"

    Hi,

    I'm starting with zabbix and now i'm getting a bit general idea of all that things but still missing some knowlage. I read about LLD and Macros, but I don't know how to deal with this kind of error.

    Code:
    Preprocessing failed for: [{"METRIC":"DATAFILE::Count","VALUE":"1"},{"METRIC ":"PGA::Aggregate Pga Auto Target","VALUE":"0"...
    1. Failed: cannot extract value from json by path "$[?(@.METRIC=='SYS::Average Active Sessions')].VALUE.first()": no data matches the specified path
    Reading server logs it says the same and agent sais nothing.

    Is it a JSON construction error? Is a DB privilege error? Looking arround the template i can't see any query asociated to this particular monitor (i start thinking i'm not looking on the rigth place).

    Best regards.
  • JSERRAHIMA
    Junior Member
    • May 2021
    • 16

    #2
    Hello Cyber,

    This monitor belongs to the "Template DB Oracle by ODBC: Oracle: Get system metrics(1)". Looking into i found this SQL query

    Code:
    SELECT 'SYS::' || METRIC_NAME AS METRIC, ROUND(VALUE,3) AS VALUE
    FROM V$SYSMETRIC WHERE GROUP_ID = 2
    UNION
    SELECT 'SYSPARAM::' || INITCAP(NAME), to_number(VALUE)
    FROM V$SYSTEM_PARAMETER WHERE NAME IN ('sessions', 'processes', 'db_files')
    UNION
    SELECT 'SESSION::Long time locked' ,count(*) FROM V$SESSION s WHERE s.BLOCKING_SESSION IS NOT NULL AND s.BLOCKING_SESSION_STATUS='VALID' AND s.SECONDS_IN_WAIT > 600
    UNION
    SELECT 'SESSION::Lock rate' ,(cnt_block / cnt_all)* 100 pct
    FROM ( SELECT COUNT(*) cnt_block FROM v$session WHERE blocking_session IS NOT NULL), ( SELECT COUNT(*) cnt_all FROM v$session)
    UNION
    SELECT 'SESSION::Total', COUNT(*) FROM V$SESSION
    UNION
    SELECT 'SESSION::' || INITCAP(STATUS)|| ' ' || INITCAP(TYPE), COUNT(*) FROM V$SESSION GROUP BY STATUS, TYPE
    UNION
    SELECT 'SESSION::Concurrency rate', NVL(ROUND(SUM(duty_act.cnt*100 / num_cores.val)), 0)
    FROM
    ( SELECT DECODE(session_state, 'ON CPU', 'CPU', wait_class) wait_class, ROUND(COUNT(*)/(60 * 15), 1) cnt
    FROM v$active_session_history sh
    WHERE sh.sample_time >= SYSDATE - 15 / 1440 AND DECODE(session_state, 'ON CPU', 'CPU', wait_class) IN('Concurrency')
    GROUP BY DECODE(session_state, 'ON CPU', 'CPU', wait_class)) duty_act,
    ( SELECT SUM(value) val FROM v$osstat WHERE stat_name = 'NUM_CPU_CORES') num_cores
    UNION
    SELECT 'PGA::' || INITCAP(NAME), VALUE FROM V$PGASTAT
    UNION
    SELECT 'PROC::Procnum', COUNT(*) FROM v$process
    UNION
    SELECT 'DATAFILE::Count', COUNT(*) FROM v$datafile;
    But this query does not return any value for "SYS::Average Active Sessions"

    Regards.

    Comment

    • JSERRAHIMA
      Junior Member
      • May 2021
      • 16

      #3
      Yes, i was wondering why and i think problem came from DB. Is an Oracle Apex DB and "V$SYSMETRIC" is empty.

      I found APEX_WORKSPACE_SESSIONS table but info is not exactly the same so i think modifying sql could be an approach ...

      Thank you so much for your patience Cyber.

      Best regards!

      Comment

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

        #4
        It means, that it cannot find what you instructed it to find. So, I guess its problem with your jsonpath expression...

        Comment

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

          #5
          First line.. "SELECT 'SYS::' || METRIC_NAME AS METRIC, ROUND(VALUE,3) AS VALUE ...
          And then it does some other things, subqueries etc... I guess that is where it should come from...
          Can you run this query directly and get output for testing your preprocessing? I guess that is the point where you should start...

          Comment

          Working...