我安装了 Nagios 并尝试添加 check_raid 插件。我有 3 个自定义 cfg 文件添加到 nagios.cfg 中,称为 custom-commands.cfg custom-servicegroups.cfg 和 custom-services.cfg。它们位于 /usr/local/nagios/etc/objects/ 文件夹中。我没有收到任何错误,但它们没有出现在我的 web gui 中,所以我不知道它们是否正在执行,或者它们的状态等。
custom-services.cfg 看起来像:
# service template
define service {
use generic-service
name raid
service_description raid
register 0
normal_check_interval 30
retry_check_interval 5
notification_interval 3600
check_command check_raid
}
custom-servicegroups.cfg 看起来像:
define servicegroup{
servicegroup_name CUSTOM
alias Custom Checks
}
自定义命令如下所示:
define command {
command_name check_raid
command_line /usr/lib/nagios/plugins/check_raid $ARG1$
}
我正在尝试在 windows-servers 组中的 windows 机器上运行 check_raid 命令。我没有收到任何错误,所以我认为配置文件很好,nagios 重新启动没有任何大惊小怪。但是,服务 check_raid 未列在我的 Web 界面上。任何意见是极大的赞赏。谢谢你的时间。