您好,登錄后才能下訂單哦!
前一段時間應公司要求部署nagios監控系統,一切安裝配置就緒,在啟動nagios的過程中遇到了問題,仔細查看nagios的日志并沒有發現具體的問題在哪里,使用/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg對nagios主配置文件的語法做檢查時,看到如下所示的提示信息:
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!
經過仔細的排除后,找到了導致問題出現的原因,由于這個文件中追加的內容有誤所導致
解決方式:
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
}
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。