HPUX上安装NRPE,特别是在监控ORACLE数据库有一些疑难的点,自己一边摸索一边整理了出来,就当是做个备忘一、下载预编译好的depot源码包网址:http://www.mayoxi
HPUX上安装NRPE,特别是在监控ORACLE数据库有一些疑难的点,自己一边摸索一边整理了出来,就当是做个备忘
一、下载预编译好的depot源码包
网址:
包名:NRPE-2.12.depot.gz
可能还需要另外两个包的支持,如果操作系统没有安装,也请下载:
openssl-1.0.1f-ia64-11.31.depot.gz
tcp_wrappers-7.6-ia64-11.31.depot.gz
二、创建NRPE用户
groupadd -g 312 nrpe
useradd -g nrpe -G oinstall -u 312 nrpe (注:之所以添加到oinstall组,是使其具备执行oracle插件的权限)
三、HPUX上安装NRPE
swinstall -s /tmp/NRPE-2.12.depot.gz
swlist -l product | grep NRPE
四、将NRPE配置为inetd管理进程
/opt/nrpe/bin/configure.sh
会在/etc/services与/etc/inetd.conf文件中添加nrpe相关的配置项
五、修改NRPE主配置文件
vi /opt/nrpe/etc/nrpe.conf
主要修改两个地方:
1、allowed_hosts=127.0.0.1,nagios_server_ip
2、command[check_users]=/opt/nrpe/libexec/check_users -w 5 -c 10 (添加监控命令)
六、启动NRPE
inetd -k && inetd (作为inetd后台服务启动)
七、测试NRPE
/usr/local/nagios/libexec/check_nrpe -H xxxxxx
NRPE v2.12
返回上信息测试成功,在服务端同样测试
netstat -na | grep 5666
查看nrpe服务端口
安装过程中常见疑难解答:
其实nrpe安装很简单,但针对ORACLE数据库的检查(check_oracle),,有可能会出现一些问题,这里整理了下:
1、nagios服务端check_nrpe -H nagios_client_IP时提示ssl连接错误?
可能原因:
a、检查nagios_client的nrpe.cfg配置文件,allowed_hosts有没有正确添加服务端的IP;
b、检查openssl包有没有装上;
c、检查服务器之间的防火墙有没有放通5666端口;
2、在hpux服务器上测试check_oracle --cache orcl username password总是提示用户名密码错误,无论用什么帐户都报这个错误?
可能原因:
a、一定要注意hpux上输入oracle相关用户名密码进分别用单引号引起来,如'username' 'password'
3、在hpux服务器上测试check_oracle --login check_oracle --cache 都可以正常返回数据,但在nagios服务端总是没
有数据返回,但nrpe通信又是正常的,users,disk,load等都可以正常返回数据?
可能原因:
a、遇到这个问题,最好的测试方法是在nrpe.cfg的中相关监控项目后加上 >> /tmp/output 2>&1 将输出结果输入一个
文件,方便查看;
b、一些库文件找不到,如utils,这个文件在/opt/nrpe/libexec目录下有,但系统会自动到/目录下查找,只要做个软连接就可以了
ln -s /opt/nrpe/libexec/utils.sh /utils.sh
c、提示ps,grep,awk等命名找不到,这当然是环境变量中没有添加相应命名的路径,把/usr/bin这个目录加到PATH
d、提示su:sorry,主要是执行sqlplus操作需要具有oracle用户的相关权限,只需要将nrpe用户添加 到oinstall组
usermod -G oinstall nrpe
4、执行check_oracle这个脚本就报错,如找不到服务名,没有权限等等
可能原因:
a、由于我们是在nrpe这个用户下执行check_oracle,所以一定要注意环境变量问题,把$ORACLE_HOME加到这个脚本中去

This article addresses MySQL's "unable to open shared library" error. The issue stems from MySQL's inability to locate necessary shared libraries (.so/.dll files). Solutions involve verifying library installation via the system's package m

This article explores optimizing MySQL memory usage in Docker. It discusses monitoring techniques (Docker stats, Performance Schema, external tools) and configuration strategies. These include Docker memory limits, swapping, and cgroups, alongside

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

This article compares installing MySQL on Linux directly versus using Podman containers, with/without phpMyAdmin. It details installation steps for each method, emphasizing Podman's advantages in isolation, portability, and reproducibility, but also

This article provides a comprehensive overview of SQLite, a self-contained, serverless relational database. It details SQLite's advantages (simplicity, portability, ease of use) and disadvantages (concurrency limitations, scalability challenges). C

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

This guide demonstrates installing and managing multiple MySQL versions on macOS using Homebrew. It emphasizes using Homebrew to isolate installations, preventing conflicts. The article details installation, starting/stopping services, and best pra

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version
Visual web development tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.
