Time ago I’ve added two Items:
- DBFileSize
- DBSize
Those two items are calculated with those following query
DBSize
SELECT sum( NVL(a.bytes/1024/1024/10 – NVL(f.bytes/1024/1024/10, 0), 0)) retvalue
FROM sys.dba_tablespaces d,
(SELECT tablespace_name, sum(bytes) bytes
FROM dba_data_files
GROUP BY tablespace_name) a,
(SELECT tablespace_name, sum(bytes) bytes
FROM dba_free_space
GROUP BY tablespace_name) f
WHERE d.tablespace_name = a.tablespace_name(+)
AND d.tablespace_name = f.tablespace_name(+)
AND NOT (d.extent_management like ‘LOCAL’ AND d.contents like ‘TEMPORARY’);
and DBFileSize
select sum(bytes/1024/1024/10) retvalue
FROM dba_data_files;
There is a lack on export of items on template of mine so you can download now the 1.0.4 release of Orabbix
or add those two Items:
- dbsize
- dbfilesize
inside oracle template on zabbix as numeric