/* HOST CONFIGURATION */ object Host "localserver" { import "base-log" display_name = "localserver" address = "127.0.0.1" check_command = "hostalive" max_check_attempts = 3 check_period = "24x7" check_interval = 600 retry_interval = 100 enable_notifications = 1 enable_active_checks = 1 enable_passive_checks = 1 enable_event_handler = 1 enable_flapping = 0 enable_perfdata = 1 vars.notification_group = "group-mail-24x7" } template Host "base-log" { } /* SERVICE CONFIGURATION */ apply Service "LOG" { import "volatile-service" check_command = "check_nrpe" vars.address = host.address vars.remote_nrpe_command = "check_log" vars.notification_group = "group-mail-24x7" assign where "base-log" in host.templates } template Service "volatile-service" { max_check_attempts = 1 check_period = "24x7" check_interval = 300 retry_interval = 60 enable_notifications = 1 enable_active_checks = 1 enable_passive_checks = 1 enable_event_handler = 1 enable_flapping = 0 enable_perfdata = 1 volatile = 1 vars.types = [ Problem, Acknowledgement, Custom, FlappingStart, FlappingEnd, DowntimeStart, DowntimeEnd, DowntimeRemoved ] vars.states = [ Critical, Unknown ] } /* CONTACT CONFIGURATION */ object UserGroup "group-mail-24x7" { display_name = "Group Mail 24x7" } object User "mail-24x7" { display_name = "Mail 24x7" email = "diego.marco@nologin.es" groups = [ "group-mail-24x7" ] enable_notifications = 1 period = "24x7" types = [ DowntimeStart, DowntimeEnd, DowntimeRemoved, Custom, Acknowledgement, Problem, Recovery, FlappingStart, FlappingEnd ] states = [ OK, Warning, Critical, Unknown, Up, Down ] } /* NOTIFICATION CONFIGURATION */ template Notification "template-mail-service-notification" { command = "mail-service-notification" states = [ Up, Down ] types = [ Problem, Acknowledgement, Recovery, Custom, FlappingStart, FlappingEnd, DowntimeStart, DowntimeEnd, DowntimeRemoved ] interval = 7200 } apply Notification "notification-group-mail-24x7" to Service { import "template-mail-service-notification" user_groups = [ "group-mail-24x7" ] period = "24x7" if(service.vars.states){ states = service.vars.states } if(service.vars.types){ types = service.vars.types } if(service.vars.notification_interval){ interval = service.vars.notification_interval } assign where service.vars.notification_group == "group-mail-24x7" }