search
HomeDatabaseMysql TutorialZabbix中配置DataGuard的监控

在zabbix中有了orabbix的辅助,监控效率大大提高,但是因为orabbix是基于jdbc的方式,有些监控还是有一些限制。比如DataGuard的检

在zabbix中有了orabbix的辅助,监控效率大大提高,但是因为orabbix是基于jdbc的方式,有些监控还是有一些限制。
比如DataGuard的检查,如果采用dg broker来检查,效果就更直观也更可信。

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

只要显示为SUCCESS,说明dg就是正常的。
 如果通过orabbix来监控,只能通过主库中的v$dataguard_status来进行检查。
 很多时候这种检查一方面很可能有误报,有时候可能会有很多额外的信息干扰。
 所以使用orabbix来监控备库还是有一定的瓶颈,可以监控,但是结果还是不够可信。
 这个时候还是投入zabbix的怀抱,我们还是需要通过zabbix的方法来辅助。
 对于dg的检查,可以使用下面的脚本来检查
echo `sudo su -l Oracle  EOD
 EOF`|grep ORA- |wc -l
如果输出结果大于0,说明检查结果存在ORA错误。这个时候需要关注备库的情况。
 在zabbix中的配置如下:
 在zabbix agent的目录下配置这个参数
UserParameter=check.dg[*], sh /home/app/zabbix/script/check_dg.sh

然后在zabbix agent的script目录下,脚本check_dg.sh 的内容就是调用show configuration的结果。
 这些配置还是方便的。

Zabbix中配置DataGuard的监控

 然后配置trigger

Zabbix中配置DataGuard的监控

配置完成之后,就可以在zabbix server端进行验证。
# ./zabbix_get -s 10.xxx.xx.45 -k  check.dg
 ZBX_NOTSUPPORTED
这个时候说明agent这边校验失败,还是需要重启一下agent的。
 这个时候如果备库存在问题显示也会为0,需要明辨。
 如果备库确实存在问题,,显示结果就会大于0
 # ./zabbix_get -s 10.127.133.45 -k  check.dg
 1
当然为了使得zabbix用户能够切换到oracle用户,还是需要使用sudo的方式为zabbix赋予权限,比如末尾的切换用户的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 *

一些Zabbix相关教程集合:

Ubuntu 14.04下Zabbix2.4.5 源码编译安装 

安装部署分布式监控系统Zabbix 2.06

《安装部署分布式监控系统Zabbix 2.06》

CentOS 6.3下Zabbix安装部署

Zabbix分布式监控系统实践

CentOS 6.3下Zabbix监控apache server-status

CentOS 6.3下Zabbix监控MySQL数据库参数

64位CentOS 6.2下安装Zabbix 2.0.6   

ZABBIX 的详细介绍:请点这里
ZABBIX 的下载地址:请点这里

本文永久更新链接地址

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
How do you alter a table in MySQL using the ALTER TABLE statement?How do you alter a table in MySQL using the ALTER TABLE statement?Mar 19, 2025 pm 03:51 PM

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

How do I configure SSL/TLS encryption for MySQL connections?How do I configure SSL/TLS encryption for MySQL connections?Mar 18, 2025 pm 12:01 PM

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

How do you handle large datasets in MySQL?How do you handle large datasets in MySQL?Mar 21, 2025 pm 12:15 PM

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?Mar 21, 2025 pm 06:28 PM

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

How do you drop a table in MySQL using the DROP TABLE statement?How do you drop a table in MySQL using the DROP TABLE statement?Mar 19, 2025 pm 03:52 PM

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

How do you represent relationships using foreign keys?How do you represent relationships using foreign keys?Mar 19, 2025 pm 03:48 PM

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.

How do you create indexes on JSON columns?How do you create indexes on JSON columns?Mar 21, 2025 pm 12:13 PM

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)?How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)?Mar 18, 2025 pm 12:00 PM

Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),