安装和配置orabbix

下载: http://www.smartmarmot.com/product/orabbix/download/

云盘链接:

https://pan.baidu.com/s/1Q9ktCS3mHUdqL7IPShNVGQ

mkdir -p /opt/orabbix mv orabbix-1.2.3.zip /opt/orabbix cd /opt/orabbix unzip orabbix-1.2.3.zip cp conf/config.props.sample conf/config.props chmod +x /etc/init.d/orabbix chmod +x /opt/orabbix/run.sh yum install java javac -y

登录sqlplus 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 CREATE SESSION TO ZABBIX; GRANT SELECT ANY DICTIONARY TO ZABBIX; GRANT UNLIMITED TABLESPACE TO ZABBIX; GRANT SELECT ANY DICTIONARY TO ZABBIX; exec dbms_network_acl_admin.create_acl(acl => 'resolve.xml',description => 'resolve acl', principal =>'ZABBIX', is_grant => true, privilege => 'resolve'); exec dbms_network_acl_admin.assign_acl(acl => 'resolve.xml', host =>'*'); commit;

vim /opt/orabbix/conf/config.props

修改后内容如下

#comma separed list of Zabbix servers ZabbixServerList=ZabbixServer ZabbixServer.Address=192.168.2.145 #zabbix server IP地址 ZabbixServer.Port=10051 #端口

#pidFile OrabbixDaemon.PidFile=./logs/orabbix.pid #frequency of item's refresh OrabbixDaemon.Sleep=300 #MaxThreadNumber should be >= than the number of your databases OrabbixDaemon.MaxThreadNumber=100

#put here your databases in a comma separated list DatabaseList=192.168.2.142 #名称与该机在 zabbix中监控的主机名称保持一致

#Configuration of Connection pool #if not specified Orabbis is going to use default values (hardcoded) #Maximum number of active connection inside pool

DatabaseList.MaxActive=10 #The maximum number of milliseconds that the pool will wait #(when there are no available connections) for a connection to be returned #before throwing an exception, or <= 0 to wait indefinitely. DatabaseList.MaxWait=100 DatabaseList.MaxIdle=1

#define here your connection string for each database 192.168.2.142.Url=jdbc:oracle:thin:@192.168.2.142:1521:orcl # 需要 jdk 环境,因为这里是通过 JDBC 连接的, #orcl 为数据库实例名称 192.168.2.142.User=ZABBIX # 用来监控 oracle 数据库的用户名和密码,需要在 oracle 中创建并赋予一定的权限 192.168.2.142.Password=ZABBIX #Those values are optionals if not specified Orabbix is going to use the general values 192.168.2.142.MaxActive=10 192.168.2.142.MaxWait=100 192.168.2.142.MaxIdle=1 192.168.2.142.QueryListFile=./conf/query.props zabbix就是添加模板即可

遇到的问题:

解决orabbix 无法获取数据问题 使用这个链接 执行sh build.sh 生成的orabbix-1.2.3.jar 拷贝到你的orabbix目录替换之前的即可 https://github.com/hsnotebook/orabbix4zabbix4

mysql安装https://segmentfault.com/a/1190000022843273

5.0页面中文乱码问题 6.https://blog.csdn.net/sehn_/article/details/107455885 7. /usr/share/zabbix/assets/fonts

https://blog.csdn.net/xufengduo/article/details/102562955 Cannot bind socket to "/var/run/zabbix/zabbix_server_alerter.sock": [13] Permission denied.解决

mysql8密码认证问题 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你的密码'; https://blog.csdn.net/youcijibi/article/details/81153789

yum缓存 有时候下载包下不下来 可以提前下载然后放到这个目录就率过去了 /var/cache/yum https://www.cnblogs.com/dbcloud/p/6701891.html