Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Monitoring ORACLE Server with NAGIOS

2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Monitoring ORACLE Server with nagios

Environment: Oracle 10g

CentOS 5.2 x86_64

Install NRPE on the server where Oracle is located

The installation process refers to the Nagios NRPE documentation.

Note:

1. Because the nagios script needs to read oracle-related files. So the user running nagios needs to be defined as an oracle service user. And modify the configuration in / etc/xinted.d/nrpe.

Service nrpe

{

Flags = REUSE

Socket_type = stream

Port = 5666

Wait = no

User = oracle

Group = nagios

Server = / usr/local/nagios/bin/nrpe

Server_args =-c / usr/local/nagios/etc/nrpe.cfg-- inetd

Log_on_failure + = USERID

Disable = no

Only_from = 192.168.100.62

}

two。 Give oracle users permission to execute under the ORACLE_HOME directory.

Chmod-Rf 740 $ORACLE_HOME/*

3. Modify the check_oracle script. Add $ORACLE_HOME and $PATH manually to avoid problems.

ORACLE_HOME=/u01/oracle/product/10.2.0/db_1

PATH=$PATH: / u01/oracle/product/10.2.0/db_1/bin

2. Configure nrpe service

Modify the / usr/local/nagios/etc/nrpe.cfg file. Add the following:

# Check Oracle

Commanded [check _ oracle_tns] = / usr/local/nagios/libexec/check_oracle-- tns orcl

Commanded [check _ oracle_db] = / usr/local/nagios/libexec/check_oracle-- db orcl

Commanded [check _ oracle_login] = / usr/local/nagios/libexec/check_oracle-- login orcl

Commander [check _ oracle_cache] = / usr/local/nagios/libexec/check_oracle-- cache orcl system lkjsdf 80 90

Commander [check _ oracle_tablespace] = / usr/local/nagios/libexec/check_oracle-- tablespace orcl system lkjsdf tab 90 80

For specific parameter description, please refer to check_oracle-- help.

After the configuration is complete, restart the xinetd service.

3. Configure Nagios server

1. Install nrpe scripting support. -refer to the official documentation.

two。 Add nrpe command configuration. Modify the nagios/etc/objects/command.cfg file:

Define command {

Command_name check_nrpe

Command_line $USER1 $/ check_nrpe-H $HOSTADDRESS$-c $ARG1 $

}

3. Add the oracle host profile in nagios/etc/objects. Oracle.cfg .

Define host {

Use linux-server

Host_name oracle

Alias Oracle 10g

Address 192.168.100.63

}

Define service {

Use generic-service

Host_name oracle

Service_description TNS Check

Check_command check_nrpe!check_oracle_tns

}

Define service {

Use generic-service

Host_name oracle

Service_description DB Check

Check_command check_nrpe!check_oracle_db

}

Define service {

Use generic-service

Host_name oracle

Service_description Login Check

Check_command check_nrpe!check_oracle_login

}

Define service {

Use generic-service

Host_name oracle

Service_description Cache Check

Check_command check_nrpe!check_oracle_cache

}

Define service {

Use generic-service

Host_name oracle

Service_description Tablespace Check

Check_command check_nrpe!check_oracle_tablespace

}

NRPE and Nagios-Plugin installation files can be found in the attachment package. The official NRPE documentation is also included in the attachment package.

Note:

Tablespace check has not been fine-tuned and uses the wrong table name.

Temporary tablespaces can also be monitored by modifying the script.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report