Hello
thanks for the reply
My configuration is this
Service Template
template Service "disk" {
check_command = "disk"
check_period = "Horas Trabajo"
command_endpoint = host_name
}
Service
Apply service
apply Service "disk" {
import "disk"
assign where "Linux Server" in host.templates
import DirectorOverrideTemplate
}
Service group
object ServiceGroup "disk" {
display_name = "disk"
assign where service.name == "disk"
}
Notification Template
template Notification "NotificacionServicioP" {
command = "NotificacionServicio"
states = [ Critical, OK, Unknown, Warning ]
types = [
Acknowledgement,
Custom,
DowntimeEnd,
DowntimeRemoved,
DowntimeStart,
FlappingEnd,
FlappingStart,
Problem,
Recovery
]
user_groups = [ "Tragsatec" ]
}
Apply Notification
apply Notification "NotificacionServicio" to Service {
import "NotificacionServicioP"
assign where "disk" in service.groups
user_groups = [ "Tragsatec" ]
}
Timeperiod Template
template TimePeriod "workhour" {
import "legacy-timeperiod"
display_name = "workhour"
ranges = {
" thursday" = "08:00-19:00"
"friday" = "08:00-15:00"
"monday" = "08:00-19:00"
"tuesday" = "08:00-19:00"
"wednesday" = "08:00-19:00"
}
}
Timeperiod
object TimePeriod "Horas Trabajo" {
import "legacy-timeperiod"
import "workhour"
display_name = "Horas Trabajo"
ranges = {
}
}
Other Information
zones.d/master/hosts.conf
object Host "benecenvd10" {
import "Icinga Agent"
import "Linux Server"
display_name = "benecenvd10"
address = "172.17.4.10"
groups = [ "Fega-Host" ]
}
zones.d/master/agent_endpoints.conf
object Endpoint "benecenvd10" {
host = "172.17.4.10"
log_duration = 0s
}
zones.d/master/agent_zones.conf
object Zone "benecenvd10" {
parent = "master"
endpoints = [ "benecenvd10" ]
}
zones.d/master/agent_endpoints.conf
object Endpoint "benecenvd10" { host = "172.17.4.10" log_duration = 0s }
zones.d/master/agent_zones.conf
object Zone "benecenvd10" { parent = "master" endpoints = [ "benecenvd10" ] }
object Host "benecenvd10" {
import "Icinga Agent"
import "Linux Server"
display_name = "benecenvd10"
address = "172.17.4.10"
groups = [ "Fega-Host" ]
}
zones.d/master/agent_endpoints.conf
object Endpoint "benecenvd10" {
host = "172.17.4.10"
log_duration = 0s
}
zones.d/master/agent_zones.conf
object Zone "benecenvd10" {
parent = "master"
endpoints = [ "benecenvd10" ]
}
object HostGroup "Fega-Host" {
display_name = "Fega Host"
assign where match("bene*", Host.name)
}
template Host "Linux Server" {
check_command = "dummy"
}
template User "Standard" {
enable_notifications = true
states = [ Critical, Down, OK, Unknown, Up, Warning ]
types = [
Acknowledgement,
Custom,
DowntimeEnd,
DowntimeRemoved,
DowntimeStart,
FlappingEnd,
FlappingStart,
Problem,
Recovery
]
}
object User "rda" {
import "Standard"
display_name = "Roberto Diaz"
email = "rda@tragsa.es"
groups = [ "Tragsatec" ]
}
object UserGroup "Tragsatec" {
display_name = "Tragsatec"
}
This is my configuration…
Thanks for your help…