NagiosQL 3.2無法重啟Nagios4.0+的解決辦法

來源:互聯網
上載者:User

標籤:tar   com   string   art   os   line   

由於最近將Nagios從3.X版本升級到了4.0.7,突然發現nagiosQL無法重啟Naigos,查了很多資料都是沒有能夠解決,最後,終於在一個論壇中找到,只是不容易呀。

 

導致原因:因為nagiosql的重啟訊息格式還是3.x的,而4.x版本的nagios重啟命令格式已經改變。

 

解決方案:

修改nagiosql的verify.php,使其$strCommandString = "[".mktime()."] RESTART_PROGRAM;".mktime(); 都更新為$strCommandString = "[".mktime()."] RESTART_PROGRAM\n";即可 Nagios反饋的資訊是:I have checked that. Nagios 4.0.0 has a command queue - this ist located by default: 

/usr/local/nagios/var/rw/nagios.cmd 

But the old NagiosQL command does not work with Nagios 4.0.0. So edit verify.php and modify line 345 from: 

$strCommandString = "[".mktime()."] RESTART_PROGRAM;".mktime(); 

to: 

$strCommandString = "[".mktime()."] RESTART_PROGRAM\n";

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.