[ZBXNEXT-8408] Insufficient monitoring on Oracle CDB/PDB Created: 2023 Apr 19 Updated: 2024 Aug 27 |
|
Status: | Open |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Change Request | Priority: | Medium |
Reporter: | Martins Orinskis | Assignee: | Unassigned |
Resolution: | Unresolved | Votes: | 3 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() ![]() |
Description |
Scope: Use case: Pain point: Requirement: Solution:
|
Comments |
Comment by Wang Xiao Dong [ 2024 Apr 06 ] |
An alternative solution: We can add two host for the CDB and the PDB each other within the same agent2. We need set the monitor user for the CDB and the PDB and set the macroes.
Because the v$sysmetic on PBD return nothing, there are 26 not supported items for the PDB. I have try to use the the v$con_sysmetic on PDB, but because the v$sysmetic on CDB and the v$con_sysmetic on PDB have diffirent results, there are some not supported items until Oracle make the v$sysmetic on CDB and the v$con_sysmetic on PDB have the same results. zabbix-5.0.41/src/go/plugins/oracle/handler_sysmetrics.go //代码占位符 row, err := conn.QueryRow(ctx, ` SELECT COUNT(*) FROM V$SYSMETRIC `) if err != nil { return nil, zbxerr.ErrorCannotFetchData.Wrap(err) } row.Scan(&cn) if cn == 0 { // for PDB row, err := conn.QueryRow(ctx, ` SELECT JSON_OBJECTAGG(METRIC_NAME VALUE ROUND(VALUE, 3) RETURNING CLOB) FROM V$CON_SYSMETRIC `) if err != nil { return nil, zbxerr.ErrorCannotFetchData.Wrap(err) } err = row.Scan(&sysmetrics) if err != nil { return nil, zbxerr.ErrorCannotFetchData.Wrap(err) } } else { // for CDB row, err := conn.QueryRow(ctx, ` SELECT JSON_OBJECTAGG(METRIC_NAME VALUE ROUND(VALUE, 3) RETURNING CLOB) FROM V$SYSMETRIC WHERE GROUP_ID = :1 `, groupID) if err != nil { return nil, zbxerr.ErrorCannotFetchData.Wrap(err) } err = row.Scan(&sysmetrics) if err != nil { return nil, zbxerr.ErrorCannotFetchData.Wrap(err) } }
|
Comment by Studer Olivier [ 2024 Aug 27 ] |
Hi Dong, I'm interesting about your solution to modify the handler_sysmetrics.go file for Oracle. I use the package Zabbix server 6.4.18 version on RedHat. So, I need help to implement your solution. Regards Olivier |