First, install the Nrpe
This department uses the direct decompression method to install the Nrpe
Second, configure the Nrpe service
1. Modify the check_oracle in the Libexec folder
Add the following items in it
Oracle_home=/oradata/oracle/product/11.2.0path= $PATH:/oradata/oracle/product/11.2.0/bin
2. Add the following items in the nrpe.conf
Command[check_oracle_tablespace]=/usr/local/nagios/libexec/check_oracle--tablespace Listener name database user Database Password table name Critical alarm size Waring alarm size
Nrpe will report the following error after restarting
Cannot connect to adpdb. Ora-12154:tns:could not resolve the Connect identifierspecified (DBD error:ociserverattach)
Workaround:
This problem occurs because of insufficient permissions to add Nagios to the Oinstall group and restart Nrpe
[[email protected] nagios]# usermod-a-G oinstall nagios[[email protected] nagios]# killall nrpe[[email protected] Nagios ]#/usr/local/nagios/bin/nrpe-c/usr/local/nagios/etc/nrpe.cfg-d
Now we can monitor Oracle.
This article is from "It worker-small Maple" blog, please be sure to keep this source http://wangfeng7399.blog.51cto.com/3518031/1537297