Check MK monitoring Oracle

Source: Internet
Author: User
Tags check mk sqlplus

1. Install the new Check_mk_agent,1.2.5i7 version above and make sure the Mk_oracle script is installed

Copy the mk_oracle script from the server side to the target server

cp /usr/share/check-mk-agent/plugins/mk_oracle /usr/lib/check_mk_agent/plugins/ls -lth /usr/lib/check_mk_agent/plugins/mk_oracle

2, the database to CHECK_MK user empowerment:
(1) Grant Select_catalog_role to CHECK_MK

[email protected]# su - oracle[email protected]:~> export ORACLE_SID=<SID of an Instance>[email protected]:~> sqlplus / as sysdbasqlplus> create user check_mk identified by secret_password;sqlplus> grant select_catalog_role to check_mk;sqlplus> connect check_mk/secret_passwordsqlplus> exit[email protected]:~> export ORACLE_SID=<SID of an Instance>

(2) ASM-related

[email protected]# su - oracle[email protected]:~> ps ax | grep pmon | grep ASM[email protected]:~> export ORACLE_SID=+ASM1[email protected]:~> sqlplus / as sysasmsqlplus> create user check_mk identified by secret_password;sqlplus> grant sysdba to check_mk;sqlplus> exit

3. Modify the/etc/check_mk/sqlplus.sh file
vi /etc/check_mk/sqlplus.sh
Modified to:

ORACLE_SID=$1if [ -z "$ORACLE_SID" ] ; then    echo "Usage: $0 ORACLE_SID" >&2    exit 1fisu - oracle -c "ORACLE_SID=$ORACLE_SIDORAENV_ASK=NOsource /home/oracle/.bash_profilesqlplus -s check_mk/password"

4. Edit the/etc/check_mk/mk_oracle.cfg file
vi /etc/check_mk/mk_oracle.cfg
Add to:

#ASMUSER=check_mk:password:sysdba:hostname:port#DBUSER=check_mk:password:sysdba:hostname:portASMUSER=check_mk:passwordDBUSER=check_mk:password

Copy TNS file to/ETC/CHECK_MK
cp /u01/app/oracle/11.2.0/dbhome_1/network/admin/tnsnames.ora /etc/check_mk/

5. Edit/etc/check_mk/sqlnet.ora

vi /etc/check_mk/sqlnet.oraLOG_DIRECTORY_CLIENT = /var/log/check_mk/oracle_clientDIAG_ADR_ENABLED = OFFSQLNET.WALLET_OVERRIDE = FALSEWALLET_LOCATION = (SOURCE=  (METHOD = FILE)  (METHOD_DATA = (DIRECTORY=/etc/check_mk/oracle_wallet)) )

6. Execute the Verification statement:

export MK_CONFDIR="/etc/check_mk";/usr/lib/check_mk_agent/plugins/mk_oracle -texport MK_CONFDIR="/etc/check-mk-agent";/usr/share/check-mk-agent/plugins/mk_oracle -t

Output:
[Email protected] check_mk]#export MK_CONFDIR="/etc/check_mk";/usr/lib/check_mk_agent/plugins/mk_oracle -t

<<<oracle_instance>>><<<oracle_sessions>>><<<oracle_logswitches>>><<<oracle_undostat>>><<<oracle_recovery_area>>><<<oracle_processes>>><<<oracle_recovery_status>>><<<oracle_longactivesessions>>><<<oracle_dataguard_stats>>><<<oracle_performance>>><<<oracle_tablespaces>>><<<oracle_rman>>><<<oracle_jobs>>><<<oracle_ts_quotas>>><<<oracle_resumable>>><<<oracle_locks>>><<<oracle_instance>>><<<oracle_asm_diskgroup>>>
-----------------------------------------------Logincheck to Instance: hisdb  Version: 11.2The Oracle base remains unchanged with value /u01/app/oracleLogin ok User: CHECK_MK on datahis

The login OK Word appears stating that the configuration was successful

7. Permission setting:

chmod 700 /etc/check_mk/sqlplus.shchmod 600 /etc/check_mk/mk_oracle.cfgchown oracle.root /etc/check_mk/sqlplus.sh /etc/check_mk/mk_oracle.cfg

Check MK monitoring Oracle

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.