安裝nagios出現的錯誤

來源:互聯網
上載者:User

標籤:process   start   mis   tar   name   ati   this   出現   tween   

最近安裝nagios時,檢查的的狀態都沒有什麼問題,就是監控系統的狀態顯示不出來

檢測的結果如下:

[[email protected] ~]# /etc/init.d/httpd startStarting httpd: You have new mail in /var/spool/mail/root[[email protected] ~]# [[email protected] ~]# [[email protected] ~]# /etc/init.d/nagios checkconfigRunning configuration check...Nagios Core 3.5.1Copyright (c) 2009-2011 Nagios Core Development Team and Community ContributorsCopyright (c) 1999-2009 Ethan GalstadLast Modified: 08-30-2013License: GPLWebsite: http://www.nagios.orgReading configuration data...   Read main config file okay...Processing object config file ‘/usr/local/nagios/etc/objects/commands.cfg‘...Processing object config file ‘/usr/local/nagios/etc/objects/contacts.cfg‘...Processing object config file ‘/usr/local/nagios/etc/objects/timeperiods.cfg‘...Processing object config file ‘/usr/local/nagios/etc/objects/templates.cfg‘...Processing object config file ‘/usr/local/nagios/etc/objects/hosts.cfg‘...Processing object config file ‘/usr/local/nagios/etc/objects/services.cfg‘...Processing object config directory ‘/usr/local/nagios/etc/objects/services‘...   Read object config files okay...Running pre-flight check on configuration data...Checking services...    Checked 12 services.Checking hosts...    Checked 2 hosts.Checking host groups...    Checked 1 host groups.Checking service groups...    Checked 0 service groups.Checking contacts...    Checked 1 contacts.Checking contact groups...    Checked 1 contact groups.Checking service escalations...    Checked 0 service escalations.Checking service dependencies...    Checked 0 service dependencies.Checking host escalations...    Checked 0 host escalations.Checking host dependencies...    Checked 0 host dependencies.Checking commands...    Checked 25 commands.Checking time periods...    Checked 5 time periods.Checking for circular paths between hosts...Checking for circular host and service dependencies...Checking global event handlers...Checking obsessive compulsive processor commands...Checking misc settings...Total Warnings: 0Total Errors:   0Things look okay - No serious problems were detected during the pre-flight check

查看nagios日誌的內容:

[[email protected] var]# tail nagios.log[1536369288] LOG VERSION: 2.0[1536369288] Finished daemonizing... (New PID=1423)[1536369288] Error: Could not create external command file ‘/usr/local/nagios/var/rw/nagios.cmd‘ as named pipe: (2) -> No such file or directory.  If this file already exists and you are sure that another copy of Nagios is not running, you should delete this file.[1536369288] Bailing out due to errors encountered while trying to initialize the external command file... (PID=1423)[1536369446] Nagios 3.5.1 starting... (PID=1502)[1536369446] Local time is Sat Sep 08 09:17:26 CST 2018[1536369446] LOG VERSION: 2.0[1536369446] Finished daemonizing... (New PID=1503)

錯誤原因:大致是我不能建立nagios.cmd,到/usr/local/nagios/var目錄下竟然發現沒有rw目錄,建立之後重新載入nagios

[[email protected] var]# mkdir rw[[email protected] var]# chown -R nagios.nagios rw[[email protected] var]# lltotal 40drwxrwxr-x 2 nagios nagios  4096 Sep  6 12:55 archives-rw-r--r-- 1 nagios nagios     5 Sep  8 09:23 nagios.lock-rw-rw-r-- 1 nagios nagios  3991 Sep  8 09:23 nagios.log-rw-r--r-- 1 nagios nagios 17051 Sep  8 09:23 objects.cache-rw-rw-r-- 1 nagios nagios     0 Sep  8 09:23 retention.datdrwxr-xr-x 2 nagios nagios  4096 Sep  8 09:25 rwdrwxr-xr-x 3 root   root    4096 Sep  6 12:55 spool

此時才載入到正確的監控效果。

安裝nagios出現的錯誤

相關文章

聯繫我們

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