OGG监控最佳实践 – 使用脚本
• 使用脚本执行ggsci命令,根据结果判断运行状态,如进程异
常可以发送告警邮件,可以将进程报告放到邮件中作为附件
• 脚本示例
#!/usr/bin/ksh
LD_LIBRARY_PATH=/app/oracle/10.2/db_1/lib
ORACLE_SID=ggs
ORACLE_BASE=/app/oracle
PATH=/usr/lib/qt-
3.3/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/bin:/app/oracle/10.2/db_1/bin
SLEEPTIME=30 # number of seconds to sleep between iterations
ALERT_EMAIL=oracle@localhost.localdomain #Email address to receive alert message.
OGG_HOME=/home/oracle/goldengate #GoldenGate installation directory.