I installed and configured Icinga2 with icingaweb2.
I added a test-host with a test-service: Let's call it "example.com".
This is the test-host:
/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"
}
Okay, then we have the service-configuration:
/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"
}
Of course I added a new user group to /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 = [ "icingaadmins", "linux-admins" ]
email = "me@example123.com"
}
object UserGroup "icingaadmins" {
display_name = "Icinga 2 Admin Group"
}
object UserGroup "linux-admins" {
display_name = "Linux-Administrators"
}
Now I think I have to add the contact_groups to the host. But if I do that the config-check fails :-(
Thanks for your help :-)