Configure the monitoring of DataGuard in Zabbix

Source: Internet
Author: User
Orabbix is used in zabbix, which greatly improves the monitoring efficiency. However, because orabbix is based on jdbc, some monitoring services still have some restrictions. For example, the checking of the Federation uard

Orabbix is used in zabbix, which greatly improves the monitoring efficiency. However, because orabbix is based on jdbc, some monitoring services still have some restrictions. For example, the checking of the Federation uard

Orabbix is used in zabbix, which greatly improves the monitoring efficiency. However, because orabbix is based on jdbc, some monitoring services still have some restrictions.
For example, if you use the dg broker for the consumer uard check, the results will be more intuitive and credible.

DGMGRL> show configuration;
Configuration-csdb
Protection Mode: MaxPerformance
Databases:
Test-Primary database
Stest-Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS

If SUCCESS is displayed, the dg is normal.
If you use orabbix for monitoring, you can only check the status of v $ monitoring uard_status in the master database.
In many cases, this kind of check may have false positives, and sometimes there may be a lot of extra information interference.
Therefore, using orabbix to monitor the standby database still has some bottlenecks and can be monitored, but the results are still not credible.
At this time, we still need to invest in zabbix. We still need to use zabbix to help.
You can use the following script to check the dg.
Echo 'sudo su-l Oracle <dgmgrl-silent/<show configuration;
EOD
EOF '| grep ORA-| wc-l
If the output value is greater than 0, a ORA error is returned. In this case, you need to pay attention to the situation of the slave database.
The configuration in zabbix is as follows:
Configure this parameter in the zabbix agent directory.
UserParameter = check. dg [*], sh/home/app/zabbix/script/check_dg.sh

Then, in the script directory of zabbix agent, the content of the script check_dg.sh is the result of calling show configuration.
These configurations are convenient.

Configure the trigger

After the configuration is complete, you can verify it on the zabbix server.
#./Zabbix_get-s 10. xxx. xx.45-k check. dg
ZBX_NOTSUPPORTED
This indicates that the verification failed on the agent side. You still need to restart the agent.
In this case, if the standby inventory is displayed as a problem, the value is 0, which must be clearly identified.
If the standby database does have a problem, the displayed result will be greater than 0.
#./Zabbix_get-s 10.127.133.45-k check. dg
1
Of course, to enable zabbix users to switch to oracle users, you still need to use sudo to grant zabbix permissions, such as the su-l
Zabbix ALL = (ALL) NOPASSWD:/etc/init. d/iptables status,/sbin/iptables-nL,/usr/bin/head-n 50,/var/log/secure,/bin/su-l *

Some Zabbix Tutorials:

Compile and install Zabbix2.4.5 source code in Ubuntu 14.04

Install and deploy the distributed monitoring system Zabbix 2.06

Install and deploy the distributed monitoring system Zabbix 2.06

Install and deploy Zabbix in CentOS 6.3

Zabbix distributed monitoring system practice

Under CentOS 6.3, Zabbix monitors apache server-status

Monitoring MySQL database Parameters Using Zabbix in CentOS 6.3

Install Zabbix 2.0.6 in 64-bit CentOS 6.2

ZABBIX details: click here
ZABBIX: click here

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.