In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces how to monitor oracle in zabbix, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand.
My zabbix version is 2.0.6 and the oracle is 11g.
The following is a partial effect picture
1 、 Oracle/Active user count
2 、 Oracle/Bytes sent and received via SQL*Net to Client
3 、 Oracle/Database CPU Time Ratio
4 、 Oracle/Database Wait Time Ratio
5 、 Oracle/Deadlocks
6 、 Oracle/Disk sorts ratio
7 、 Oracle/Hard parse ratio
8 、 Oracle/Query
9 、 Oracle/Size of all datafiles
10. Oracle/Size of user data (without temp)
11 、 Oracle/Table scan rows gotten
12 、 Oracle/Tablespace Use On SYSTEM
13 、 Oracle/Uptime
14 、 Oracle/User Transaction Per Sec
15 、 Oracle listen 1521 port
In terms of alarm:
1. Whether port 1521 of oracle is listening.
2. Tablespace utilization
3. Whether Oracle is restarted
4. Whether there is any query lock
5. Query session is greater than 250,
6. Asm utilization
How to achieve:
I. client
1. Modify the zabbix_agentd.conf file
Add the following at the end of the zabbix_agentd.conf
UserParameter=pyora [*], / usr/local/zabbix/bin/pyora.py-- username $1-- password $2-- address $3-- database $4 $5 $6 $7 $8
2. Put the attached pyora.py script into / usr/local/zabbix/bin, then give 755 permissions, and change the user and group to zabbix (note that my pyora.py script has modified some contents, such as if None returns, I changed it to 0. If you need to use the original script, please go to https://github.com/bicofino/Pyora to download)
3. Installation dependency
Make sure that the local python is above 2.6.
Install cx_Oracle and argparse
Easy_install cx_Oracleeasy_install argparse
4. Create a monitoring oracle account in oracle
CREATE USER ZABBIX IDENTIFIED BY 'zabbix' DEFAULT TABLESPACE SYSTEM TEMPORARY TABLESPACE TEMP PROFILE DEFAULT ACCOUNT UNLOCK;GRANT CONNECT TO ZABBIX;GRANT RESOURCE TO ZABBIX;ALTER USER ZABBIX DEFAULT ROLE ALL;GRANT SELECT ANY TABLE TO ZABBIX;GRANT CREATE SESSION TO ZABBIX;GRANT SELECT ANY DICTIONARY TO ZABBIX;GRANT UNLIMITED TABLESPACE TO ZABBIX;GRANT SELECT ANY DICTIONARY TO ZABBIX;GRANT SELECT ON V_$SESSION TO ZABBIX;GRANT SELECT ON V_$SYSTEM_EVENT TO ZABBIX;GRANT SELECT ON V_$EVENT_NAME TO ZABBIX;GRANT SELECT ON V_$RECOVERY_FILE_DEST TO ZABBIX
5. Restart the zabbix service
Ps-ef | grep zabbix | grep-v grep | awk'{print $2}'| xargs kill-9/usr/local/zabbix/sbin/zabbix_agentd-c / usr/local/zabbix/conf/zabbix_agentd.conf
II. Server side
1. Template import
Import Template Oracle Auto Discovery into zabbix (template is attached).
2. Host association template
When adding a host and associating a template, select Macro
Then enter the corresponding information
In this way, you can draw a picture, and notice that the time for automatically discovering rules is 3600 seconds.
Thank you for reading this article carefully. I hope the article "how to monitor oracle in zabbix" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.