ncpa安裝

安裝

NCPA為所有的目標(biāo)平臺準(zhǔn)備了安裝包。包括windows,linux RRM 和 DEB包,除此之外也為其他較少使用的操作系統(tǒng)準(zhǔn)備了tarballs。NCPA不支持未知的平臺。NCPA包為所有的目標(biāo)平臺提供了一個非常簡便的安裝方法,這個文檔將通過例子來講述如何安裝NCPA.

我們提供的服務(wù)有:成都做網(wǎng)站、成都網(wǎng)站設(shè)計(jì)、微信公眾號開發(fā)、網(wǎng)站優(yōu)化、網(wǎng)站認(rèn)證、雙城ssl等。為上千余家企事業(yè)單位解決了網(wǎng)站和推廣的問題。提供周到的售前咨詢和貼心的售后服務(wù),是有科學(xué)管理、有技術(shù)的雙城網(wǎng)站制作公司

首先這里講述的是如何進(jìn)行簡便安裝,如果你有一個很復(fù)雜的環(huán)境,你或許得跳過這里。除非你知道該如何去做,在這里并不存在很復(fù)雜的安裝NCPA的方法

注意

這并不是一個能適應(yīng)任何情況的指南,也許你應(yīng)該調(diào)整你自己防火墻,為NCPA放行5693端口。通常windows會自動放行這個端口,就象MAC OS 一樣。請你時刻記住這一點(diǎn),當(dāng)首次安裝后出現(xiàn)不能工作的情況,請檢查這一點(diǎn)。

在windows中安裝NCPA

首先下載安裝程序到機(jī)器中。安裝程序下載地址:NCPA’s Windows Installer link.

圖形化安裝

安裝程序下載以后,雙擊安裝程序,同意license后,你將會看到一個配置界面,這是詢問你填配置信息。

ncpa安裝

NCPA作為一個代理的時候,僅需要填寫一個簡單的進(jìn)入token 到文本框中就可以單擊下一步了。 你必須記住這個token,在配置Nagios XI向?qū)Щ蚴褂胏heck_ncpa.py plugin 需要用到它.如果你是安裝這個代理發(fā)送被動的檢查結(jié)果給Nagios,有額外的信息需要填寫。 

  • Token - NCPA 使用它用來做身份驗(yàn)證。你需要這個token當(dāng)你安裝配置 Nagios的監(jiān)控代理的時候。

對于被動代理這個token不是絕對必需的,有其他的參數(shù)需要指定:

  • NRDP URL

  • 這個URL是NCPA 作為被動代理發(fā)送檢查結(jié)果的目標(biāo)。對于主動代理這個是不需要的。

    • NRDP Token

    • 這是NRDP身份驗(yàn)證的token值。作為被動代理時需要填寫。

  • Hostname

  • 這個主機(jī)名是代理將報告發(fā)回nagios需要填寫的主機(jī)名,由nagios進(jìn)行定義。

    Config Name

  • This is the NRDS config name that the agent will request when contacting the NRDS server.

注意:

如果你使用被動檢查,在初始安裝的時候"NRDP token"由NRDP與NRDS共用。如果這個值請編ncpa.cfg. 

寂靜安裝

windows安裝包也支持寂靜安裝,效果與GUI安裝相同。

注意:

寂靜安裝請求在命令行實(shí)用 /S 參數(shù)。同時跟隨其他參數(shù),如:

/<directive>="<value>"

這些參數(shù)都可以在命令行下使用

  • TOKEN

  • The token that will be used to access the agent’s API and web interface.

  • NRDPURL

  • This specifies the NRDP URL to use if passive checks are being implemented.

  • NRDPTOKEN

  • This is the token that will be used to authenticate NRDP passive checks and to authenticate with NRDS.

  • HOST

  • The host that the passive agent will report back as.

  • CONFIG

  • The name of the NRDS config the agent will be associated with.

這里有一個使用寂靜安裝的例子 TOKEN ‘fishingrocks’:

ncpa-<version>.exe /S /TOKEN='fishingrocks'

Note

所有這些值都可以在安裝完之后,很容易的改變。當(dāng)感覺到這些安裝參數(shù)通過后,請記錄下來。

現(xiàn)在NCPA服務(wù)已經(jīng)安裝完畢并啟動。

To test your installation see Testing Your Installation.

使用RPM包安裝NCPA

首先根據(jù)操作系統(tǒng)類型下載對應(yīng)的RPM安裝包。

    • 32-bit

    • 64-bit

    • CentOS 5.x

    • 32-bit

    • 64-bit

    • CentOS 6.x

    • 64-bit

    • CentOS 7.0

    • 32-bit

    • 64-bit

    • openSUSE 13.x

Note

這些RPM或許未能覆蓋你的系統(tǒng),或者在你的系統(tǒng)上無法工作,你可以從git上獲取源代碼進(jìn)行build。

這是一個使用rpm進(jìn)行安裝例子,當(dāng)然你也可以使用yum或zypper也一樣。

rpm -ivh --nomd5 <path to the NCPA RPM>

現(xiàn)在NCPA 服務(wù)經(jīng)安裝并啟動 。

你需要編輯  /usr/local/ncpa/etc/ncpa.cfg 去指定一個通訊字符串  在  [api] section 中 ,設(shè)置 你自己的  token:

[api]
community_string=<your token>

更改ncpa.cfg之后,需要重新啟動 ncpa_listener.重啟命令 :

/etc/init.d/ncpa_listener restart

To test your installation see Testing Your Installation.

使用 DEB Packaging安裝 NCPA

下載安裝包 

    • 32-bit

    • 64-bit

    • Debian/Ubuntu

安裝命令 

dpkg -i <path to the NCPA deb>

修改  /usr/local/ncpa/etc/ncpa.cfg 中的通訊字符串 ,在  [api] section 中 設(shè)置你自己的 token:

[api]community_string=XXXXXX

重啟動服務(wù) 

/etc/init.d/ncpa_listener restart

To test your installation see Testing Your Installation.

在  Mac OS X 上安裝 

Note

The install process on Mac OS X is still experimental. If you would like to help make this process better, please get in contact with the author (whose address can be found at the bottom of the page.)

Download the DMG here .

Download the NCPA DMG here . You will need to log in as root, or at least as a user who can run commands as root to continue with the installation. Then, depending on where you installed it (we will assume you downloaded it to your /tmp directory), run the following commands:

cd /tmp
hdiutil attach /tmp/ncpa-<version>.dmg
sudo zsh /Volumes/NCPA-<version>/install.sh

What this script does:

  • Creates the folder /usr/local/ncpa if it does not exist

  • Moves all necessary files there

  • Sets the owner of /usr/local/ncpa to nagios:nagcmd

  • Sets the mode of /usr/local/ncpa to 775

  • Creates the group nagcmd if it does not exist

  • Creates the user nagios if it does not exist

  • Starts the listener daemon

If any of this fails, you will need to do the steps manually. The steps that may fail most often are adding users and groups. If they do, add the user ‘nagios’ and make sure the group ‘nagcmd’ exists and that ‘nagios’ user is in the group ‘nagcmd’.

測試你的安裝結(jié)果 

Warning

配置防火墻放行  5693 端口 

你需要知道以下信息 

  • 代理者 IP

  • 在  [api] 中定義的  community_string (這個  token field 在  Windows Installer時定義 )

打開瀏覽器輸入 https://ip:5693, 如果提示你輸入 token意味著安裝成功 .

分享文章:ncpa安裝
標(biāo)題URL:http://muchs.cn/article12/jogpdc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站策劃、企業(yè)網(wǎng)站制作、網(wǎng)站營銷、電子商務(wù)、網(wǎng)站制作

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都app開發(fā)公司