0
我正在開發一個項目,使我的計算機與一個讀取傳感器輸出的arduino板通信,並在一個C插件(Reading from a serial port after writing on it)中爲nagios進行測試。我的問題是狀態信息始終爲空。我的插件是在lib 「在/ usr /本地/ nagios的/ libexec目錄」 在commands.cfg我增加了以下內容:Nagios狀態信息
define command{
command_name arduino_temp_sensor
command_line /usr/local/nagios/libexec/essai.c
}
而在localhost.cfg我增加了以下內容:
define service{
use generic-service
host_name localhost
service_description Temp
check_command arduino_temp_sensor
}
如果printf的輸出應該顯示在狀態信息中,我很困惑。 在此先感謝。
這取決於在標準格式或不凋謝你'/ libexec'輸出。檢查'/ var /'文件 –
我檢查了/usr/local/nagios/var/status.dat並在我自己的插件中有:plugin_output =(null) –
然後它不能提供信息。 –