diff options
author | Andrew Biba <andrew.biba@zabbix.com> | 2022-01-10 15:51:49 +0300 |
---|---|---|
committer | Andrew Biba <andrew.biba@zabbix.com> | 2022-01-10 15:51:49 +0300 |
commit | 52fc80433f6fbb26270fba2cfe9f9eea5c604b1f (patch) | |
tree | 004bbfde1625378f8c3bd83525d4660bbf69b184 /src | |
parent | 7fd6f7bee5c5187aeff58b1bb8dd630623b21a70 (diff) | |
parent | bf66538a64ef29c76921d280958ff2dfd9dbbd5b (diff) |
...G.....T [ZBX-19185] fixed free bytes calculation for temporary tablespace in Oracle by ODBC and by agent2 template
* commit 'bf66538a64ef29c76921d280958ff2dfd9dbbd5b':
...G.....T [ZBX-19185] fixed commit message
.........T [ZBX-19185] fixed free bytes calculation for temporary tablespace in Oracle by ODBC and by agent2 template
Diffstat (limited to 'src')
-rw-r--r-- | src/go/plugins/oracle/handler_tablespaces.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/go/plugins/oracle/handler_tablespaces.go b/src/go/plugins/oracle/handler_tablespaces.go index 8d2721a6a5f..6f11b694215 100644 --- a/src/go/plugins/oracle/handler_tablespaces.go +++ b/src/go/plugins/oracle/handler_tablespaces.go @@ -94,9 +94,9 @@ func tablespacesHandler(ctx context.Context, conn OraClient, params map[string]s NVL(SUM(Y.BYTES), 0) AS FILE_BYTES, NVL(SUM(Y.MAX_BYTES), 0) AS MAX_BYTES, NVL(MAX(NVL(Y.FREE_BYTES, 0)), 0) AS FREE, - SUM(Y.BYTES)-SUM(Y.FREE_BYTES) AS USED_BYTES, + SUM(Y.BYTES)-MAX(Y.FREE_BYTES) AS USED_BYTES, ROUND(DECODE(SUM(Y.MAX_BYTES), 0, 0, (SUM(Y.BYTES) / SUM(Y.MAX_BYTES) * 100)), 2) AS USED_PCT_MAX, - ROUND(DECODE(SUM(Y.BYTES), 0, 0, (SUM(Y.BYTES)-SUM(Y.FREE_BYTES)) / SUM(Y.BYTES)* 100), 2) AS USED_FILE_PCT, + ROUND(DECODE(SUM(Y.BYTES), 0, 0, (SUM(Y.BYTES)-MAX(Y.FREE_BYTES)) / SUM(Y.BYTES)* 100), 2) AS USED_FILE_PCT, DECODE(Y.TBS_STATUS, 'ONLINE', 1, 'OFFLINE', 2, 'READ ONLY', 3, 0) AS STATUS FROM ( |