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) –
然后它不能提供信息。 –