Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ Shell generated using automated configuration script Orabbix     - Transfer files to Windows and Linux (Linux)

- Network Security: SYN attacks against under linux (Linux)

- Linux Operating System Security Study (Linux)

- Schema snapshot rollback (Database)

- Learn to read the source code of vmstat (Linux)

- Use MySQL optimization of security to prevent misuse of aliases (Database)

- OpenSSL to generate public and private key (Linux)

- Installation Strongswan: on a Linux IPsec-based VPN tool (Linux)

- Vmstat command Linux Performance Monitoring (Linux)

- Based on a complete solution RMI service to transfer large files (Programming)

- Learn about EditText little depth (Programming)

- Oracle archive log size than the size of the online journal of the much smaller (Database)

- The Java way to stop a thread of execution (Programming)

- Quickly locate the mistakes by gdb location (Programming)

- FFmpeg compiled with only H264 decoding library (Programming)

- CentOS 6.5 three ways to configure the IP address (Linux)

- Monitoring services are running properly and will email alert (Server)

- Define and modify strings principle in Python (Programming)

- Linux, Google Test (GTest) test environment to build step (Linux)

- SSH mutual trust configuration (Server)

 
         
  Shell generated using automated configuration script Orabbix
     
  Add Date : 2017-04-13      
         
         
         
  Oracle in monitoring the use of Orabbix when zaabix agent itself and the biggest difference is the use of Orabbix are not required to install a separate agent for each database instance, but a Orabbix instance can have multiple database instances, Orabbix is JDBC-based approach to achieve, based on this, the configuration work is particularly important.

For a database instance configuration Orabbix, generally have the following three things to consider.

Network configuration, open the corresponding ports in the firewall, this is the time to use Orabbix agent, in order to make Orabbix agent can gain access to the database through jdbc way, we need to open the corresponding ports in the firewall

such as

iptables -I INPUT -s 10.xx.133.xx -p tcp -m multiport --dports $ db_port -i eth0 -j ACCEPT

Of course, when using Orabbix still need to create a file in response to a user in the database instance, the main role of this user is to access the data dictionary tables, performance view, purely queries.

The final task is to configure a jdbc connection string.

For example, we assume that the database is test_internal, you can configure Orabbix's profile

test_internal.Url = jdbc: oracle: thin: @ 10.127.xxxx.xx: 1523: test_internal
 test_internal.User = orabbix
 test_internal.Password = orabbix
 test_internal.QueryListFile =. / conf / query.props
Overall, these three steps workload is not large, but when in reality there are some complicated operations, on the one hand is the server ip, for Orabbix agent, it may be used directly ip connection is more direct manner using hostname also need to / etc / hosts configuration again to resolve one port for each database instance may be different, if you dozens of machines to do the work of these configurations, the extent of the work tedious and error discipline will be much higher, hope it can be faster, but it does not always feel fast, always stuck in some small place, in general, this configuration work or take time, but also really is a careful living.
 For faster, easier to use, but also make a determined effort to improve themselves, and thus wrote the following shell script, a script directly generate all scripts, at a glance, when to do what, what is certain environment variables can be dynamically generate dynamic assignment of configuration scripts.
 The main work of this script is parsed using tnsping to link the string, then the connection string in the host by the host name to ip manner in which to resolve the port number, consider some gaps standby database, also made a script Some improvements.
$ ORACLE_HOME / bin / tnsping `sqlplus -s / as sysdba < col value format a10
 set pages 0
 set linesize 200
 set feedback off
 select value from v \\ $ parameter where name = 'db_unique_name';
 EOF` | sed 's / (/ \ n / g' | sed 's /) / \ n / g' | grep -i 'HOST \ | PORT \ | SERVICE_NAME \ | SID_NAME'> tns_tmp.lst

 tmp_host_name = `grep -i HOST tns_tmp.lst | awk -F = '{print $ 2}'`
 host_name = `grep -w $ tmp_host_name / etc / hosts | awk '{print $ 1}'`
 db_port = `grep -i PORT tns_tmp.lst | awk -F = '{print $ 2}'`
 db_name = `grep -i 'SERVICE_NAME \ | SID_NAME' tns_tmp.lst | awk -F = '{print $ 2}'`
 eth_name = `ifconfig | head -1 | awk '{print $ 1}'`

 echo "#### use below to open firewall to zabbix server with dedicated db port ####"
 echo "iptables -I INPUT -s 10.127.133.82 -p tcp -m multiport --dports $ db_port -i $ eth_name -j ACCEPT"

 echo "#### use below script to create orabbix user accounts ####"
 echo "CREATE USER orabbix"
 echo "IDENTIFIED BY orabbix"
 echo "DEFAULT TABLESPACE USERS"
 echo "TEMPORARY TABLESPACE TEMP"
 echo "PROFILE DEFAULT"
 echo "ACCOUNT UNLOCK;"
 echo "-2 Roles for orabbix"
 echo "GRANT CONNECT TO orabbix;"
 echo "GRANT RESOURCE TO orabbix;"
 echo "ALTER USER orabbix DEFAULT ROLE ALL;"
 echo "-3 System Privileges for orabbix"
 echo "GRANT SELECT ANY TABLE TO orabbix;"
 echo "GRANT CREATE SESSION TO orabbix;"
 echo "GRANT SELECT ANY DICTIONARY TO orabbix;"
 echo "GRANT UNLIMITED TABLESPACE TO orabbix;"
 echo "GRANT SELECT ANY DICTIONARY TO orabbix;"
  
 echo "exec dbms_network_acl_admin.create_acl (acl => 'resolve.xml', description => 'resolve acl', principal => 'ORABBIX', is_grant => true, privilege => 'resolve');"
 echo "exec dbms_network_acl_admin.assign_acl (acl => 'resolve.xml', host => '*');"

 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
Run the script is as follows:
#### 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

Well, the script is ready, waiting for convenient work, dozens of short configuration database instances are not a problem, with who knows who.
     
         
         
         
  More:      
 
- How to use GRUB2 files directly from the hard disk to run ISO (Linux)
- VMware virtual machine Ubuntu install arm-linux-gcc cross-compiler environment (Linux)
- A command to install Sublime Text 3 on Manjaro / Archlinux (Linux)
- The AWK use Cygwin tools mysql binlog log viewer (Database)
- RabbitMQ installation, configuration, monitoring (Linux)
- CentOS 7 repair MBR and GRUB (Linux)
- Linux text processing tool of awk (Linux)
- JavaScript function part (Programming)
- Linux Open coredump (Linux)
- Embedded Linux to solve the problem in the time zone (Linux)
- Ubuntu 14.04 install PostgreSQL 9.2 (Database)
- How to test your MongoDB application upgrade? (Database)
- The sublime into IDE (Linux)
- Some common Linux commands Study Notes (Linux)
- Automate deployment of Docker-based Rails applications (Server)
- ASP.NET 5 is connected with the Redis server on the Linux platform (Server)
- Linux shell script to adjust the Task Scheduler (Linux)
- How to use the process on the desktop xkill end Linux (Linux)
- Efficient running Linux virtual machine Six Tips (Linux)
- Ubuntu terminal command - see the port occupied and off (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.