您好,登錄后才能下訂單哦!
前一段時(shí)間應(yīng)公司要求部署nagios監(jiān)控系統(tǒng),一切安裝配置就緒,在啟動(dòng)nagios的過(guò)程中遇到了問(wèn)題,仔細(xì)查看nagios的日志并沒(méi)有發(fā)現(xiàn)具體的問(wèn)題在哪里,使用/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg對(duì)nagios主配置文件的語(yǔ)法做檢查時(shí),看到如下所示的提示信息:
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config file '/usr/local/nagios/etc/hosts.cfg'...
Processing object config file '/usr/local/nagios/etc/services.cfg'...
Processing object config file '/usr/local/nagios/etc/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/templates.cfg'...
Error: Invalid host object directive ' action_url'.
Error: Could not add object property in file '/usr/local/nagios/etc/templates.cfg' on line 193.
Error processing object config files!
經(jīng)過(guò)仔細(xì)的排除后,找到了導(dǎo)致問(wèn)題出現(xiàn)的原因,由于這個(gè)文件中追加的內(nèi)容有誤所導(dǎo)致
解決方式:
vi /usr/local/nagios/etc/templates.cfg
define host{
name hosts-pnp
register 0
action_url /nagios/pnp/index.php?host=$HOSTNAME$
process_perf_data 1
}
define service{
name services-pnp
register 0
action_url /nagios/pnp/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$
process_perf_data 1
}
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。