zabbix監控報錯zabbix server is not running解決方案

來源:互聯網
上載者:User

這幾天為了做監控在ubuntu伺服器上部署了zabbix做監控。過程還是遇到了一些問題,把他記錄下來。希望對大家有協助吧。原文來源:http://www.jincon.com/archives/169/

這裡千萬記住,zabbix 不建議用最新版本,唉~~~~找個稍微次級版本即可。

這次安裝過程過程出現了報錯:

zabbix紅色彈出報錯:zabbix server is not running: the information displayed may not be current        jincon

 

case 'zabbix.status':$session = Z::getInstance()->getSession();if (!isset($session['serverCheckResult']) || ($session['serverCheckTime'] + SERVER_CHECK_INTERVAL) <= time()) {$zabbixServer = new CZabbixServer($ZBX_SERVER, $ZBX_SERVER_PORT, ZBX_SOCKET_TIMEOUT, 0);$session['serverCheckResult'] = $zabbixServer->isRunning();$session['serverCheckTime'] = time();}#http://www.jincon.com$result = array('result' => (bool) $session['serverCheckResult'],'message' => $session['serverCheckResult'] ? '' : _('Zabbix server is not running: the information displayed may not be current.'));break;

 

   

 

是的,就這裡,首先執行個體化類:CZabbixServer,然後執行裡面的方法:isRunning();

繼續跟蹤到檔案是在:

zabbix/include/classes/server/CZabbixServer.php

最後跟蹤方法是在 connect 執行了,

問題出在268行:

            if (!$socket = @fsockopen($this->host, $this->port, $errorCode, $errorMsg, $this->timeout)) {

是的,就在這裡,fsockopen為空白了。

怎麼會為空白呢,突然想到是不是被禁用了,phpinfo看了下果然。

 

當然問題找到了,就簡單了,解決方案就是:

開啟fsockopen函數就可以了。

 

原文來源:http://www.jincon.com/archives/169/    轉載請註明出處哈。。。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.