歡迎您光臨本站 註冊首頁

nagios!一個新的問題(已解決)

←手機掃碼閱讀     火星人 @ 2014-03-03 , reply:0

nagios!一個新的問題(已解決)

nagios!一個新的問題如圖:

1, 在對被控主機添加  check_load 或 check_disk 后顯示Return code of 127 is out of bounds - plugin may be missing的報錯!
check_load

--------這個問題的原因:1.在本機commands.cfg定義chechk_nrpe的時候,因為是從nrpe.pdf拷貝出錯;2,在被監控機上沒有定義check_disk
  
CRITICAL 10-24-2009 06:57:43 0d 0h 3m 9s 2/4 (Return code of 127 is out of bounds - plugin may be missing)  

2,在nagios監控web頁面上,添加一個定義的服務時,提示 Sorry, but you are not authorized to commit the specified command.
再指明 Read the section of the documentation that deals with authentication and authorization in the CGIs for more information.來解決問題
--------這個問題咱不知道
大家有遇到這種情況嘛?請不吝賜教,謝謝!!!

[ 本帖最後由 lq2003_cu 於 2009-11-26 14:29 編輯 ]
《解決方案》


1, 在對被控主機添加  check_load 或 check_disk 后顯示Return code of 127 is out of bounds - plugin may be missing的報錯!
check_load
  
CRITICAL 10-24-2009 06:57:43 0d 0h 3m 9s 2/4 (Return code of 127 is out of bounds - plugin may be missing)  

報錯很明顯,缺少插件

2,在nagios監控web頁面上,添加一個定義的服務時,提示 Sorry, but you are not authorized to commit the specified command.
再指明 Read the section of the documentation that deals with authentication and authorization in the CGIs for more information.來解決問題

這是因為許可權的問題,我也不是很明白,我是把default_user_name修改了來弄的,但是這個解決方法不推薦使用,不安全,你必須還得使用其他的方法加上別的限制才可以
《解決方案》

多謝mars531706 的回復!
是,報錯很明顯看出是插件缺失,可是nagios-plugins的插件已經裝好了,還需要什麼插件呢?、?
《解決方案》

你安裝的插件可能是沒有包含check_load這個command所需要的插件。你安裝的是nagios-plugins.tar.gz這個包,但是很多插件是沒有包含在其中的。

check_load是在nagios裡面定義的一個command對象,一般我們會單獨使用commands.cfg來定義所有的command對象。然後使用cfg_file=commands.cfg導入到nagios.cfg文件中。
一個command一般使用下面的格式去定義

# 'check_local_disk' command definition
define command{
        command_name    check_local_disk
        command_line    $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
        }

這裡的command_name check_local_disk定義的是一個nagios的command對象
command_line    $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$ 這行的check_disk就是我們所說的nagios插件,你的報錯就是缺少這種插件腳本
《解決方案》

你的這個「 check_local_disk」定義,是針對本地的吧?

在對同一台被監控機進行check_disk,check_load,check_ssh監控,前兩項報Return code of 127 is out of bounds - plugin may be missing的錯,而check_ssh卻顯示正常!難道是因為check_ssh僅僅是探測22埠開否,而check_disk需要在被控機上執行命令??

的確,在comment.CFG中,check_disk和check_load是我自己根據其他的自己定義的,就是錯在這裡????可是nrpe的版本是2.12最新的啊,nrpe的本義就是要監控磁碟和cpu等的情況啊?

難道是因為我那個nagios-plugs插件是2.4版的,比較舊???
明天再試!謝謝!
《解決方案》

突然之間,更新了 插件到nagios-plugins-1.4.14!

但是還是發現第一個問題還存在,真是糊塗了!

有經歷過的兄弟姐妹,請指點哈!
《解決方案》

原帖由 lq2003_cu 於 2009-11-11 10:57 發表 http://bbs3.chinaunix.net/images/common/back.gif
突然之間,更新了 插件到nagios-plugins-1.4.14!

但是還是發現第一個問題還存在,真是糊塗了!

有經歷過的兄弟姐妹,請指點哈!

由於「Return code of 127 is out of bounds」,估計是檢測數據超過了service中的定義
你把 check_disk 對應的command定義和service定義貼出來看一下。
《解決方案》

Return code of 127 is out of bounds !

對command.CFG的對應的命令修正了,現在這個問題沒有了!

取代的是一些 status為unknown的!



現在監控windows的伺服器沒有疑問了!對於linux和unix的伺服器存在貼圖中的問題。我想是不是因為nagios插件不一樣的原因!
監控機上是nagios-plugins-1.4.14 ,而其他伺服器是nagios-plugins-1.4.10.

另外,我還有疑問的是,如果監控上千台伺服器,而專門編輯services.cfg文件,工作量太大了吧!我嘗試按照本機監控cfg_file=/usr/local/nagios/etc/objects/localhost.cfg修改IP和主機名來完成監控,又產生其他的問題,真是鬱悶!!


cfg_file=/usr/local/nagios/etc/objects/commands.cfg
cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg
cfg_file=/usr/local/nagios/etc/objects/templates.cfg
cfg_file=/usr/local/nagios/etc/objects/hosts.cfg
#cfg_file=/usr/local/nagios/etc/resource.cfg
#cfg_file=/usr/local/nagios/etc/objects/jxh.cfg
cfg_file=/usr/local/nagios/etc/objects/services.cfg
cfg_file=/usr/local/nagios/etc/objects/hostgroups.cfg
cfg_file=/usr/local/nagios/etc/objects/contactgroups.cfg
cfg_file=/usr/local/nagios/etc/objects/checkcommands.cfg

# Definitions for monitoring the local (Linux) host
cfg_file=/usr/local/nagios/etc/objects/localhost.cfg
#cfg_file=/usr/local/nagios/etc/objects/localhost-smsg.cfg
#cfg_file=/usr/local/nagios/etc/objects/localhost-jxh1.cfg
#cfg_file=/usr/local/nagios/etc/objects/localhost-web1.cfg

[ 本帖最後由 lq2003_cu 於 2009-11-16 14:16 編輯 ]
《解決方案》

繼續跟
《解決方案》

回復 #8 lq2003_cu 的帖子

通過圖片最後一列的錯誤提示,大致可以確定是服務設置出了問題。
你最好把狀態為UNKNOWN所對應的服務的設置貼出來,這樣才能知道你那裡設置錯誤了。

[火星人 ] nagios!一個新的問題(已解決)已經有858次圍觀

http://coctec.com/docs/service/show-post-2988.html