In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Detect check_oracle_table through check_nrpe
/ usr/local/nagios/libexec/check_nrpe-H 10.10.10.10-c check_oracle_table
Error NRPE: Unable to read output
Execute / usr/local/nagios/libexec/check_oracle_table.py output directly locally and the result is normal
According to the online blog http://blog.chinaunix.net/uid-25266990-id-3431778.html
Prompt to modify / etc/sudoers
Add a row
Nagios ALL= (ALL) NOPASSWD:/usr/local/nagios/libexec/check_oracle_table.py
Comment Defaults requiretty
Then execute it at the remote end, and still report an error NRPE: Unable to read output
Follow the blog prompts above to switch nagios users to execute scripts.
# usermod-s / bin/bash nagiosp
# su-nagios
-bash-4.1 $/ usr/local/nagios/libexec/check_oracle_table.py
File "/ usr/local/nagios/libexec/check_oracle_table.py", line 5, in
Import cx_Oracle,sys
ImportError: libclntsh.so.10.1: cannot open shared object file: No such file or directory
Copy the .bash _ profile of the root user to the nagios user
Execute again
Traceback (most recent call last):
File "/ usr/local/nagios/libexec/check_oracle_table.py", line 55, in
Conn = cx_Oracle.connect ('test','test',dsn)
Cx_Oracle.InterfaceError: Unable to acquire Oracle environment handle
Detection found that no permission was assigned to ORACLE_HOME=/opt/oracle/product/10.2/db_1 in .bash _ profile
I give weight to the entire directory 755.
Execute it again, success!
Switch to the remote end
/ usr/local/nagios/libexec/check_nrpe-H 10.10.10.10-c check_oracle_table
It looks normal.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.