Quantcast
Channel: VMware Communities : Popular Discussions - Hyperic User Forums
Viewing all articles
Browse latest Browse all 52618

Oracle tablespace monitoring

$
0
0
Hi everybody,

Let me start by saying that Hyperic is doing a great job at my company. We use it all the time, and thinking on moving to the enterprise edition (my wife would love the maintenance feature, so my phone stop buzzing at 4am :p).

Right now, I'm struggling with the monitoring of my databases in Hyperic.We use Oracle 10g and standard tablespace with datafiles that extend by chunk of 100MB.

However, it seems that the query used in hyperic 4.5 measures the free extends and free space against the current size of the datafile. so if the datafile is 5GB large, but can grow up to 32GB, the free extend/space will show it as full when the size reaches 4.99GB.

It makes it difficult to configure alerts. And I would like to change this behavior.

Can you confirm this and maybe point me to a workaround ?


I checked the source, and particularly OracleMeasurementPlugin.java. I could probably rewrite the queries and change the following. I would greatly appreciate some pointers on the proper way to rebuild this module. Do I need to rebuild the entire hyperic environment ?

314         // non-temp Tablespace metrics
315         genericQueries.put("TSFreeSpace",
316                            "SELECT SUM(bytes) FROM DBA_FREE_SPACE " +
317                            "WHERE TABLESPACE_NAME='%tablespace%'");
318         genericQueries.put("TSUsedDiskSpace",
319                            "SELECT SUM(bytes) FROM DBA_DATA_FILES " +
320                            "WHERE TABLESPACE_NAME='%tablespace%'");
321         genericQueries.put("TSFreeExtents",
322                            "SELECT SUM(bytes/initial_extent) " +
323                            "FROM DBA_TABLESPACES ts, DBA_FREE_SPACE fs " +
324                            "WHERE ts.tablespace_name = fs.tablespace_name " +
325                            "AND ts.tablespace_name='%tablespace%'");
326         genericQueries.put("TSNumDataFiles",
327                            "SELECT COUNT(*) FROM DBA_DATA_FILES " +
328                            "WHERE TABLESPACE_NAME='%tablespace%'");
329         genericQueries.put("TSSpaceUsedPercent",
330                            "SELECT 1-(SELECT sum(bytes)/1024" +
331                            " FROM sys.dba_free_space" +
332                            " WHERE tablespace_name = '%tablespace%') /" +
333                            " (SELECT sum(bytes/1024) from sys.dba_data_files" +
334                            " WHERE tablespace_name = '%tablespace%')"+
335                            " AS percent_used" +
336                            " FROM dual");


Thanks a lot,

Julien

Viewing all articles
Browse latest Browse all 52618

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>