[ZBX-20110] Zabbix agent2: plugin oracle -> handler_tablespaces.go Created: 2021 Oct 21  Updated: 2024 Aug 06  Resolved: 2023 Feb 08

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent2 plugin (G)
Affects Version/s: None
Fix Version/s: 5.0.31rc2, 6.0.13rc1, 6.2.7rc1, 6.4.0beta6, 6.4 (plan)

Type: Problem report Priority: Major
Reporter: Dmitry Krupornitsky Assignee: Eriks Sneiders
Resolution: Fixed Votes: 4
Labels: database, performance
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by ZBXNEXT-7961 Bigger call timeout for Agent 2 Oracl... Closed
is duplicated by ZBX-19998 Zabbix-Agent2 oracle plugin Cannot fe... Closed
is duplicated by ZBX-21319 Agent2 HIGH CPU usage (70% per core):... Closed
Sub-task
Sub-Tasks:
Key
Summary
Type
Status
Assignee
ZBX-21540 Oracle Template update Sub-task Closed Kristaps Naglis  
Team: Team INT
Sprint: Sprint 89 (Jun 2022), Sprint 90 (Jul 2022), Sprint 91 (Aug 2022), Sprint 92 (Sep 2022), Sprint 93 (Oct 2022), Sprint 94 (Nov 2022), Sprint 95 (Dec 2022)
Story Points: 1

 Description   

One of our customers wrote:

Hi guys,

No rush on this request, it’s just something we noticed and not sure about.

Currently i am performing consultancy services at a company specialised in DBA services, and they are working with Oracle DBs.
So we use Zabbix agent2, the oracle plugin and get the monitoring perfect. At the same time, in the official template (https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/oracle_agent2) there is a tablespace discovery.

This customer is running databases with massive amounts of tablespaces and after the discovery we see performance issues combined with ‘hanging’ sessions on the database. After checking the source code of the agent2 plagin( https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/oracle/handler_tablespaces.go) it seems the agent is opening 1 sessies, but executing per discovered table space various queries. As a result, eventually timeouts occur from the agent perspective and the sessions remain open, causing overhead/load on the DB. This is of course combined with the update interval of just 1 minute of the master item.

Are you aware of these issues, was there some extensive testing done on bigger oracle DBs and any guidance for me?
Again, no rush, it’s an observation where I am not 100% sure about which party (zabbix or the db) is doing some strange stuffs.

Thanks in advance

---------------------------- SOME EXTRA INFO FROM THE CUSTOMER ------------------------------

Today (28/10/21) I had another session at this customer, and we went over the SQL queries that are present in the source of the plugin. It seems are more functions are having problems.

For example: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/oracle/handler_sessions.go

In this function there are quite a few SELECT <whatever> FROM V$SESSION followed by an UNION statement. This can (and should) be optimaized as much as possible, as this is causing issues in databases with as low as 75 table spaces. Let alone this is done on 200-300 table space databases...

Same thing with:
https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/oracle/handler_fra.go
https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/oracle/handler_sga.go
etc etc



 Comments   
Comment by Kristaps Naglis [ 2022 Dec 27 ]

Template updates implemented in ZBX-21540

Comment by Eriks Sneiders [ 2023 Jan 24 ]

Fixed in 

Comment by Arturs Dancis [ 2023 Jan 31 ]

Thank you for reporting! Documentation updated:

Generated at Thu Apr 03 21:16:58 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.