我还想使用 nagios 监控非关键服务,例如我们的 GitLab-server 或 phpMyAdmin 实例。有什么方法可以为某些服务创建警告而不是严重错误?
目前我正在使用以下内容:
define service {
host_name localhost
use generic-service
service_description HTTP GitLab
check_command check_www!git.example.com!'/users/sign_in'
}
define command {
command_name check_www
command_line /usr/lib/nagios/plugins/check_http -H '$ARG1$' -I '$HOSTADDRESS$' -e 'HTTP/1.1 200 OK' -u '$ARG2$'
}
Run Code Online (Sandbox Code Playgroud)