Notes on using WGCLOUD to monitor the size of the oracle table space

Because the project wants to monitor the size of the oralce table space, it is best to view the historical growth record chart

So I chose WGCLOUD to monitor the size of the oracle table space. It has very powerful functions, supports custom sql to extract data, and also supports alarm notifications.

Not much to say, just go to the picture above to explain, you can go to the official website to download, and the official website also has installation instructions, it is quite simple

First of all, we need to add a data source, click [Data Source Management] on the left menu

 Click the Add button, as follows, after entering the corresponding oralce database information, click Save

WGCLOUD supports mysql, oracle, sql server, maridb, postgresql and other database monitoring

 After adding the data source, we can add a data table to monitor the table space, click on the left menu [Data Table Management]

Click [Add], select the Oracle data source just added, and fill in a table alias

Then we need to write sql. This sql is the sql to extract the size of the table space. The query result needs to be one row. If there are multiple rows, the system will extract the first row of data by default. Then we enter the column name, which is the column name of the query result. You can refer to the screenshot below

SELECT t.tablespace_name, round(SUM(bytes / (1024 * 1024)), 0) ts_size 
FROM dba_tablespaces t, dba_data_files d 
WHERE t.tablespace_name = d.tablespace_name and t.tablespace_name='USERS'
GROUP BY t.tablespace_name

Alarm expression, I want to notify me when the table space is larger than 100M, it is written as result>100 , and result represents the amount of data extracted by sql

ok , we save , wait

Because WGCLOUD monitors the data every 1 hour by default, there may be no data just after the addition is completed, and the data will not be available until the next cycle

In general, WGCLOUD has a low learning cost, is easy to deploy and use, and is relatively lightweight and convenient

Finally, it will also save the data of each monitoring as a trend chart, as shown in the figure below

Guess you like

Origin blog.csdn.net/jiangnanfengyue/article/details/126385825
Recommended