echo "#### add below in orabbix config files ####"
echo $db_name.Url=jdbc:oracle:thin:@$host_name:$db_port:$db_name|sed 's/ //g'
echo $db_name.User=orabbix
echo $db_name.Password=orabbix
echo $db_name.QueryListFile=./conf/query.props
脚本的运行情况如下:
#### use below to open firewall to zabbix server with dedicated db port ####
iptables -I INPUT -s 10.127.xxxx.xx -p tcp -m multiport --dports 1526 -i eth0 -j ACCEPT
#### use below script to create orabbix user accounts ####
CREATE USER orabbix
IDENTIFIED BY orabbix
DEFAULT TABLESPACE USERS
TEMPORARY TABLESPACE TEMP
PROFILE DEFAULT
ACCOUNT UNLOCK;
-2 Roles for orabbix
GRANT CONNECT TO orabbix;
GRANT RESOURCE TO orabbix;
ALTER USER orabbix DEFAULT ROLE ALL;
-3 System Privileges for orabbix
GRANT SELECT ANY TABLE TO orabbix;
GRANT CREATE SESSION TO orabbix;
GRANT SELECT ANY DICTIONARY TO orabbix;
GRANT UNLIMITED TABLESPACE TO orabbix;
GRANT SELECT ANY DICTIONARY TO orabbix;
exec dbms_network_acl_admin.create_acl(acl => 'resolve.xml',description => 'resolve acl', principal =>'ORABBIX', is_grant => true, privilege => 'resolve');
exec dbms_network_acl_admin.assign_acl(acl => 'resolve.xml', host =>'*');
#### add below in orabbix config files ####
test_internal.Url=jdbc:oracle:thin:@10.127.xxxx.xx:1526:test_internal
test_internal.User=orabbix
test_internal.Password=orabbix
test_internal.QueryListFile=./conf/query.props
使用Shell生成Orabbix自动化配置脚本(2)
内容版权声明:除非注明,否则皆为本站原创文章。
转载注明出处:https://www.heiqu.com/99d2218c5362527d4c8f0394df86f8ba.html