1.nagios 啟動(dòng)(root身份)
慈利ssl適用于網(wǎng)站、小程序/APP、API接口等需要進(jìn)行數(shù)據(jù)傳輸應(yīng)用場景,ssl證書未來市場廣闊!成為創(chuàng)新互聯(lián)建站的ssl證書銷售渠道,可以享受市場價(jià)格4-6折優(yōu)惠!如果有意向歡迎電話聯(lián)系或者加微信:13518219792(備注:SSL證書合作)期待與您的合作!
/etc/init.d/nagios restart
(/etc/init.d/xinetd restart 重啟nsca,用于接收客戶端的數(shù)據(jù),端口為5667,接收數(shù)據(jù)出現(xiàn)問題時(shí),需要重啟)
2.nagios 配置文件編輯
(su - nagios編輯)
1)/usr/local/nagios/etc/objects/hostgroups.cfg中定義hostgroup,有時(shí)禁用host,需要在這里把相應(yīng)主機(jī)注釋掉
define hostgroup{
hostgroup_name NETWORK-DEVICE Group
alias NETWOKR_DEVICE
members FW01
}
2)/usr/local/nagios/etc/nagios.cfg (禁用主機(jī)注釋掉相應(yīng)主機(jī)配置文件)
cfg_file=/usr/local/nagios/etc/objects/DB1.cfg
3.檢查配置,
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg用來檢查配置是否有問題,
出現(xiàn)這樣的說明沒問題
.........
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
再用root重啟/etc/init.d/nagios restart
常用腳本
客戶端
useradd -u 2001 -s /sbin/nologin nagios
cd /usr/local
tar -xzvf nagios.tar.gz
sed -i "s/WEB2/DB3/g" /usr/local/nagios/exe_scripts.sh
echo "*/2 * * * * sh /usr/local/nagios/exe_scripts.sh >/dev/null 2>&1" >>/var/spool/cron/nagios
服務(wù)端
sed -i "s/ DB1/DB3/g" /usr/local/nagios/etc/objects/DB3.cfg
sed -i "s/address 10.99.2.40/address 10.99.2.42/g" /usr/local/nagios/etc/objects/DB3.cfg
標(biāo)題名稱:nagios日常維護(hù)
文章網(wǎng)址:http://vcdvsql.cn/article22/pegecc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供面包屑導(dǎo)航、網(wǎng)站設(shè)計(jì)公司、網(wǎng)頁設(shè)計(jì)公司、域名注冊、標(biāo)簽優(yōu)化、軟件開發(fā)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)