Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-19617

Zabbix-Agent2 oracle Plugin / oracle.ts.stats

    XMLWordPrintable

Details

    Description

      Hello,

      there are two problems with zabbix-agent2 Oracle Plugin: oracle.ts.stats Module.

      In the Logfile of zabbix-agent2 on Oracle DB Server I found following error messages:

      2021/06/30 12:27:58.218117 [Oracle] Cannot fetch data: dpiStmt_execute: ORA-01031: insufficient privileges.
      2021/06/30 12:28:01.166956 [Oracle] Cannot fetch data: dpiStmt_execute: ORA-00942: table or view does not exist.
      2021/06/30 12:28:12.204910 [Oracle] Cannot fetch data: dpiStmt_execute: ORA-00942: table or view does not exist.
      2021/06/30 12:28:58.284318 [Oracle] Cannot fetch data: dpiStmt_execute: ORA-01031: insufficient privileges.
      2021/06/30 12:29:01.231361 [Oracle] Cannot fetch data: dpiStmt_execute: ORA-00942: table or view does not exist.
      2021/06/30 12:29:12.263698 [Oracle] Cannot fetch data: dpiStmt_execute: ORA-00942: table or view does not exist.

      After analysing it, I figured out, that the messages are from oracle.ts.stats module of zabbix-agent2 (The SQL Statement is attached).

       

      The reason ist, that some grants are missing to the zabbix_mon User.

      From the documentation I shoud create Oracle Account with following grants:

      CREATE USER zabbix_mon IDENTIFIED BY <PASSWORD>; – Grant access to the zabbix_mon user. 
      GRANT CONNECT, CREATE SESSION TO zabbix_mon; 
      GRANT SELECT ON DBA_TABLESPACE_USAGE_METRICS TO zabbix_mon; 
      GRANT SELECT ON DBA_TABLESPACES TO zabbix_mon; 
      GRANT SELECT ON DBA_USERS TO zabbix_mon; 
      GRANT SELECT ON SYS.DBA_DATA_FILES TO zabbix_mon; 
      GRANT SELECT ON V$ACTIVE_SESSION_HISTORY TO zabbix_mon; 
      GRANT SELECT ON V$ARCHIVE_DEST TO zabbix_mon; 
      GRANT SELECT ON V$ASM_DISKGROUP TO zabbix_mon; 
      GRANT SELECT ON V$DATABASE TO zabbix_mon; 
      GRANT SELECT ON V$DATAFILE TO zabbix_mon; 
      GRANT SELECT ON V$INSTANCE TO zabbix_mon; 
      GRANT SELECT ON V$LOG TO zabbix_mon; 
      GRANT SELECT ON V$OSSTAT TO zabbix_mon; 
      GRANT SELECT ON V$PGASTAT TO zabbix_mon; 
      GRANT SELECT ON V$PROCESS TO zabbix_mon; 
      GRANT SELECT ON V$RECOVERY_FILE_DEST TO zabbix_mon; 
      GRANT SELECT ON V$RESTORE_POINT TO zabbix_mon; 
      GRANT SELECT ON V$SESSION TO zabbix_mon; 
      GRANT SELECT ON V$SGASTAT TO zabbix_mon; 
      GRANT SELECT ON V$SYSMETRIC TO zabbix_mon; 
      GRANT SELECT ON V$SYSTEM_PARAMETER TO zabbix_mon;

      Following additional Grants are required for oracle.ts.stats to start working without errors:

      grant select on sys.DBA_DATA_FILES to zabbix_mon;
      grant select on sys.DBA_FREE_SPACE to zabbix_mon;
      grant select on sys.DBA_TEMP_FILES to zabbix_mon;
      grant select on v_$parameter to zabbix_mon;
      grant select on GV_$SORT_SEGMENT to zabbix_mon;

      After granting of missing grants, oracle.ts.stats starts to work, but there is another problem with it:

      It takes a lot of CPU resources and it starts endless immediately again after finishing. Without sleep time between checks. It is allways "on CPU" - again and again and again.

      For this moment it is not possible to use it in our environment, because we have to monitor over 20 DBs on same server and oracle.ts.stats takes 1/4 of CPU resources.

      Is there a possibility to configure sleep time between checks ?

      Thank you for investigation.

       

      Best regards

      Attachments

        Activity

          People

            ArtursL Arturs Lontons
            igor77 Igor
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: