# https://support.nagios.com/kb/article.php?id=96
直接發送狀態給 nagios
yum install php-xml php-json
Downloading the Source
cd /tmp wget -O nrdp.tar.gz https://github.com/NagiosEnterprises/nrdp/archive/1.5.1.tar.gz tar xzf nrdp.tar.gzCopy Files
The /usr/local/nrdp directory is going to be created to store the NDRP php files.cd /tmp/nrdp-1.5.1/ mkdir -p /usr/local/nrdp cp -r clients server LICENSE* CHANGES* /usr/local/nrdp chown -R nagios:nagios /usr/local/nrdpDefine Tokens
The token is what the client uses to authenticate with NRDP on the Nagios Core server. You can use the same token on all your clients, or you could defined a different token for each client. Defining a different token for each client allows you to revoke access at a later date by removing the token, but it also adds an extra level of administration.You will need to edit the config.inc.php file and define the token(s) you want to use. Execute the following command to open the file in vi:vi /usr/local/nrdp/server/config.inc.phpThe section to define the tokens will be at the top of the file, it is a PHP array. Here is an example of three tokens:$cfg['authorized_tokens'] = array( "cda35gtdfu72", "90dfs7jwncsd908fng8fhgb54ynq690xc9vt8uw9ty53", "+23rf==34m12n-v73nciu", );Each token must be surrounded by double quotes and end with a comma:"",Once you've added the tokens save the config.inc.php file and exit vi.Copy Apache Config File
cp nrdp.conf /etc/httpd/conf.d/TEst Command
cd /usr/local/nrdp/clients
sh send_nrdp.sh -u http://192.168.240.79/nrdp/ -t 90dfs7jwncsd908fng8fhgb54ynq690xc9vt8uw9ty53 -H localhost -s HTTP -S OK -o abcd6
沒有留言:
張貼留言