我想通过 Puppet 设置 Icinga2 远程客户端,但是官方文档的整个页面都在谈论使用他们很棒的CLI 向导,这需要手动运行。
任何解决方法?也许我应该回到Nagios?
我用 icingaweb2 安装并配置了 Icinga2。
我添加了一个带有测试服务的测试主机:我们称之为“example.com”。
这是测试主机:
/etc/icinga2/conf.d/hosts/example-com:
object Host "example-com" {
//Importiert die generische Host-Vorlage aus der template.conf
import "generic-host"
//IPv4 Adresse
address = "2xx.2xx.2xx.2xx"
//Angabe des Betriebssystemtyps
vars.os = "Linux OS"
vars.sla = "24x7"
}
Run Code Online (Sandbox Code Playgroud)
好的,那么我们有了服务配置:
/etc/icinga2/conf.d/hosts/example-com/http.conf
object Service "http" {
import "generic-service"
host_name = "example-com"
check_command = "http"
vars.sla = "24x7"
}
Run Code Online (Sandbox Code Playgroud)
当然我在/etc/icinga2/conf.d/users.conf中添加了一个新的用户组
/**
* The example user 'icingaadmin' and the example
* group 'icingaadmins'.
*/
object User "icingaadmin" {
import "generic-user"
display_name = "Icinga 2 Admin"
groups …
Run Code Online (Sandbox Code Playgroud)