mirror of https://github.com/Icinga/icinga2.git
parent
53d3a4af5f
commit
008f5803e7
|
@ -0,0 +1,46 @@
|
|||
|
||||
object EventCommand "5927-handle" {
|
||||
import "plugin-event-command"
|
||||
command = "echo \"event handler triggered.\""
|
||||
}
|
||||
|
||||
object NotificationCommand "5927-notification" {
|
||||
import "plugin-notification-command"
|
||||
command = "echo \"notification triggered.\""
|
||||
}
|
||||
|
||||
object HostGroup "5927-bar" {
|
||||
assign where match("5927-keks*", host.name)
|
||||
}
|
||||
|
||||
object Host "5927-keks" {
|
||||
import "test-generic-host"
|
||||
event_command = "5927-handle"
|
||||
address = "1.2.3.4"
|
||||
}
|
||||
|
||||
apply Service "5927-foo" {
|
||||
import "test-generic-service"
|
||||
check_command = "ping4"
|
||||
event_command = "5927-handle"
|
||||
assign where "5927-bar" in host.groups
|
||||
}
|
||||
|
||||
apply Notification "5927-host-notification" to Host {
|
||||
import "test-mail-host-notification"
|
||||
command = "5927-notification"
|
||||
assign where "5927-bar" in host.groups
|
||||
}
|
||||
|
||||
apply Notification "5927-service-notification" to Service {
|
||||
import "test-mail-service-notification"
|
||||
command = "5927-notification"
|
||||
assign where "5927-bar" in host.groups
|
||||
}
|
||||
|
||||
object ServiceGroup "5927-bar" {
|
||||
assign where service.name == "5927-foo"
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -38,6 +38,10 @@ apply ScheduledDowntime "5980-test-service-downtime" to Host {
|
|||
import "5980-test-downtime"
|
||||
comment = "Scheduled host downtime for tests"
|
||||
|
||||
ranges = {
|
||||
tuesday = "09:37-09:40"
|
||||
}
|
||||
|
||||
assign where host.name == "5980-host"
|
||||
}
|
||||
|
||||
|
@ -45,6 +49,10 @@ apply ScheduledDowntime "5980-test-service-downtime" to Service {
|
|||
import "5980-test-downtime"
|
||||
comment = "Scheduled service downtime for tests"
|
||||
|
||||
ranges = {
|
||||
tuesday = "09:37-09:40"
|
||||
}
|
||||
|
||||
assign where host.name == "5980-host"
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
object HostGroup "6105-bar" {
|
||||
assign where match("6105-keks*", host.name)
|
||||
vars.foo = "bar"
|
||||
}
|
||||
|
||||
object Host "6105-keks" {
|
||||
|
@ -17,6 +18,7 @@ apply Service "6105-foo" {
|
|||
|
||||
object ServiceGroup "6105-bar" {
|
||||
assign where service.name == "6105-foo"
|
||||
vars.bar = "foo"
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
|
||||
object EventCommand "6479-handle" {
|
||||
import "plugin-event-command"
|
||||
command = "echo \"event handler triggered.\""
|
||||
}
|
||||
|
||||
object NotificationCommand "6479-notification" {
|
||||
import "plugin-notification-command"
|
||||
command = "echo \"notification triggered.\""
|
||||
}
|
||||
|
||||
object HostGroup "6479-bar" {
|
||||
assign where match("6479-keks*", host.name)
|
||||
}
|
||||
|
||||
object Host "6479-keks" {
|
||||
import "test-generic-host"
|
||||
event_command = "6479-handle"
|
||||
address = "1.2.3.4"
|
||||
}
|
||||
|
||||
apply Service "6479-foo" {
|
||||
import "test-generic-service"
|
||||
check_command = "ping4"
|
||||
event_command = "6479-handle"
|
||||
assign where "6479-bar" in host.groups
|
||||
}
|
||||
|
||||
apply Notification "6479-host-notification" to Host {
|
||||
import "test-mail-host-notification"
|
||||
command = "6479-notification"
|
||||
assign where "6479-bar" in host.groups
|
||||
}
|
||||
|
||||
apply Notification "6479-service-notification" to Service {
|
||||
import "test-mail-service-notification"
|
||||
command = "6479-notification"
|
||||
assign where "6479-bar" in host.groups
|
||||
}
|
||||
|
||||
object ServiceGroup "6479-bar" {
|
||||
assign where service.name == "6479-foo"
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
|
||||
object Host "6608-host" {
|
||||
import "test-generic-host"
|
||||
vars.BUMSTI = "keks"
|
||||
vars.bumsti = "schaschlik"
|
||||
}
|
||||
|
||||
object Service "6608-service" {
|
||||
import "test-generic-service"
|
||||
check_command = "dummy"
|
||||
host_name = "6608-host"
|
||||
vars.DINGDONG = "$BUMSTI$"
|
||||
vars.dingdong = "$bumsti$"
|
||||
}
|
||||
|
|
@ -12,3 +12,70 @@ template Host "test-generic-host" {
|
|||
check_command = "hostalive"
|
||||
}
|
||||
|
||||
template User "test-generic-user" {
|
||||
|
||||
}
|
||||
|
||||
template Notification "test-mail-host-notification" {
|
||||
command = "mail-host-notification"
|
||||
|
||||
states = [ Up, Down ]
|
||||
types = [ Problem, Acknowledgement, Recovery, Custom,
|
||||
FlappingStart, FlappingEnd,
|
||||
DowntimeStart, DowntimeEnd, DowntimeRemoved ]
|
||||
|
||||
period = "test-24x7"
|
||||
|
||||
user_groups = [ "test-icingaadmins" ]
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides default settings for service notifications.
|
||||
* By convention all service notifications should import
|
||||
* this template.
|
||||
*/
|
||||
template Notification "test-mail-service-notification" {
|
||||
command = "mail-service-notification"
|
||||
|
||||
states = [ OK, Warning, Critical, Unknown ]
|
||||
types = [ Problem, Acknowledgement, Recovery, Custom,
|
||||
FlappingStart, FlappingEnd,
|
||||
DowntimeStart, DowntimeEnd, DowntimeRemoved ]
|
||||
|
||||
period = "test-24x7"
|
||||
|
||||
user_groups = [ "test-icingaadmins" ]
|
||||
}
|
||||
|
||||
|
||||
/* users */
|
||||
|
||||
object User "test-icingaadmin" {
|
||||
import "test-generic-user"
|
||||
|
||||
display_name = "Test Icinga 2 Admin"
|
||||
groups = [ "test-icingaadmins" ]
|
||||
|
||||
email = "icinga@localhost"
|
||||
}
|
||||
|
||||
object UserGroup "test-icingaadmins" {
|
||||
display_name = "Test Icinga 2 Admin Group"
|
||||
}
|
||||
|
||||
/* timeperiods */
|
||||
object TimePeriod "test-24x7" {
|
||||
import "legacy-timeperiod"
|
||||
|
||||
display_name = "Test Icinga 2 24x7 TimePeriod"
|
||||
ranges = {
|
||||
"monday" = "00:00-24:00"
|
||||
"tuesday" = "00:00-24:00"
|
||||
"wednesday" = "00:00-24:00"
|
||||
"thursday" = "00:00-24:00"
|
||||
"friday" = "00:00-24:00"
|
||||
"saturday" = "00:00-24:00"
|
||||
"sunday" = "00:00-24:00"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue