I have enabled Oracle Database monitoring integration and want to display the list of tablespaces, their size, used space, etc. I am using the below NRQL query:
SELECT entityName, tablespace.spaceReservedInBytes/(10241024) as ‘Size in MB’, tablespace.spaceConsumedInBytes/(10241024) as ‘Used in MB’, tablespace.spaceUsedPercentage as ‘Used Percentage’ FROM OracleTablespaceSample WHERE provider.ec2Tag_Name = ‘WCIS-DB-SIT-EAST-1a’ and entityName like ‘ora-tablespace:SYS%’
I have below problems with the output:
This is showing multiple rows for each tablespace. How can list one row per tablespace? When I add FACET entityName, the query doesn’t show any data.
The tablespace name is displayed as ‘ora-tablespace:SYSTEM’. Is there a way to substring that to show just the tablespace name?
The size info doesn’t seem to be correct. It returns the following:
But, when I look into the DB, the actual size and used space are different. Can you point out to me where I am making mistake in the NRQL query?
- How do I modify the widget size on the dashboard?
I would greatly appreciate the help!!