In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
(1) as shown in the question, there is a script on my zabbix client:
[root@mpdb01 scripts] # vim / usr/local/zabbix/scripts/paycompletion12.sh
Its contents are as follows:
#! / bin/bashecho "/ home/oracle/scripts/paymentcompletion.sh" | su-oracle
The meaning of the above script is very simple, which is to execute a statistical script as the oracle user
(2) modify the zabbix_agentd configuration file to add a "UserParameter":
[root@prx01 scripts] # vim / usr/local/zabbix/etc/zabbix_agentd.conf
The following has been added:
UserParameter=paycompletion12,/usr/local/zabbix/scripts/paycompletion12.sh
(3) then, when I tested and obtained the data on zabbix_server, I exposed the error shown in the question:
Thinking about [root@nmp01] # / usr/local/zabbix/bin/zabbix_get-s 10.110.80.117-k paycompletion12standard in must be a tty
For this problem, zabbix's mistake is that "the rule must be a tty". I think the reason for the problem is this: / usr/local/zabbix/scripts/paycompletion12.sh I tested this script with root users, so naturally I don't have to enter a password when su-oracle, but zabbix uses zabbix when executing this script, so I need to enter a password when executing su-oracle according to the normal process. But it is obvious that it is impossible for zabbix_get to get the data to provide you with an interactive interface to enter your password, so you report an error.
Problem solving
Everything else remains the same, just modify the zabbix_agentd configuration file and set "AllowRoot" to 1. In this way, the zabbix_agentd has root permissions, so you can naturally execute scripts to get the data. The specific operations are as follows:
[root@prx01 scripts] # vim / usr/local/zabbix/etc/zabbix_agentd.conf
Modify the following:
AllowRoot=1
If you use zabbix_get to obtain data again, you will obviously not make an error. The effect is as follows:
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.