In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is about how to monitor Oracle database tablespaces in Zabbix. Xiaobian thinks it is very practical, so share it with everyone to learn. I hope you can gain something after reading this article. Let's not say much. Let's take a look at it with Xiaobian.
Oracle Tablespace Monitoring
The core database 10.100.0.20 and 21 tablespaces have been modified, and the usage and size can be monitored normally, and alarm notifications can be sent by mail.
Modifying Oracle Database Tablespace Monitoring
Create Tablespace Information Collection Script:
vim /home/oracle/scripts/check_tablespace.sh
The script reads as follows:
#!/ bin/bash # tablespace usagep check source ~/.bash_profile function check { sqlplus -S "/ as sysdba" /dev/null
Grant execution authority
chmod +x /home/oracle/scripts/check_tablespace.sh
Configure scheduled tasks (oracle user)
*/5 * * * * /home/oracle/scripts/check_tablespace.sh
Manually execute scripts and view results
Tablespace script execution results
The autodiscovery script reads as follows:
# cat discovery_oracle_tablespace.sh #!/ bin/bash #zabbix discovery oracle tablespace table_spaces=(`cat /tmp/ora_tablespace.txt | sed -e "1,3d" -e "/^$/d" -e "/selected/d" | awk '{print $1}'`) length=${#table_spaces[@]} printf "{\n" printf '\t'"\"data\":[" for ((i=0;i/dev/null;then echo 1 else echo 0 fi } case $CEHCK_TYPE in pre) usagepre ;; fre) available ;; check) check ;; *) echo -e "Usage: $0 [pre|fre|check] [TABLESPACE_NAME]" esac
Agent parameter configuration:
# cat /etc/zabbix/zabbix_agentd.d/oracle_tablespace.conf UserParameter=discovery.oracle.tablespace,/etc/zabbix/scripts/discovery_oracle_tablespace.sh UserParameter=tablespace.check[*],/etc/zabbix/scripts/tablespace_check.sh $1 $2 Restart zabbix-agent
Host Add Template
Add AutoDiscovery Template
Wait for a moment to check the monitoring results:
Data for Tablespace Monitoring
Graphical display of monitoring indicators:
I won't simulate this alarm, because it's all in production environment. The following figure is a screenshot of TEMP tablespace alarm mail in April:
Mail Notification Tablespace Alert
The above is how to monitor Oracle database tablespaces in Zabbix. Xiaobian believes that some knowledge points may be seen or used in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.