1. 首先在oracle用户下创建一个脚本,定期将ogg的状态写入到一个临时文件中
$ su - oracle
$ mkdir scripts
$ cd scripts
$ vi checkogg.sh
#!/bin/bash
# author: yangbao
source ~/.bash_profile
oggdir='/u01/app/OGG_11' # input your ogg home directory
echo "info all" | $oggdir/ggsci | awk '/^MANAGER|^EXTRACT|^REPLICAT/ {print $2}' | grep -v RUNNING | uniq > /tmp/tmpogg.cache
exit 0$ chmod +x checkogg.sh
$ crontab –l
*/3 * * * * /home/oracle/scripts/checkogg.sh
2. 修改agent配置文件
$ su - root
$ cd /etc/zabbix/zabbix_agentd.d
$ vi userparameter_ogg.conf
UserParameter=ogg.status,cat /tmp/tmpogg.cache
$ service zabbix-agent restart
3. web页面中添加监控项

4. 添加触发器
