Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev.icinga.com #6509] Notifications for child hosts #1703

Closed
icinga-migration opened this issue Jun 18, 2014 · 6 comments
Closed

[dev.icinga.com #6509] Notifications for child hosts #1703

icinga-migration opened this issue Jun 18, 2014 · 6 comments
Labels
area/notifications Notification events bug Something isn't working

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/6509

Created by ccesario on 2014-06-18 13:15:06 +00:00

Assignee: ccesario
Status: Closed (closed on 2015-01-13 14:06:01 +00:00)
Target Version: (none)
Last Update: 2015-01-13 14:06:01 +00:00 (in Redmine)

Icinga Version: 2.0.0+icingasnap201406161418.d8cc127~precise

I'm having a strange behaviour in notifications process.
Notifications for child hosts are being sent when the parent is down.

I have the follwing scenario

host_client_vivo -> host_client_ap -> host_client_station (-> means "is parent of")

When the host_client_vivo goes down, I receive 3 notifications

log part

[2014-06-18 10:06:23 -0300] information/NotificationComponent: Sending reminder notification for object 'host_client_station'
[2014-06-18 10:06:23 -0300] information/Notification: Sending notification for user 'suporte-tecnomega'
[2014-06-18 10:06:23 -0300] information/NotificationComponent: Sending reminder notification for object 'host_client_ap'
[2014-06-18 10:06:23 -0300] information/Notification: Sending notification for user 'suporte-tecnomega'
[2014-06-18 10:06:23 -0300] information/NotificationComponent: Sending reminder notification for object 'host_client_vivo'
[2014-06-18 10:06:23 -0300] information/Notification: Sending notification for user 'suporte-tecnomega'
[2014-06-18 10:06:23 -0300] information/Notification: Completed sending notification for object 'host_client_ap'
[2014-06-18 10:06:23 -0300] information/Notification: Completed sending notification for object 'host_client_vivo'
[2014-06-18 10:06:23 -0300] information/Notification: Completed sending notification for object 'host_client_station'

debug

[2014-06-18 10:06:23 -0300] debug/Dependency: Dependency 'host_client_station!host_client_ap-host' parent host 'host_client_ap.
[2014-06-18 10:06:23 -0300] debug/Dependency: Dependency 'host_client_ap!host_client_vivo-host' parent host 'host_client_vivo.
[2014-06-18 10:06:23 -0300] debug/Dependency: Dependency 'host_client_ap!host_client_vivo-host' parent host 'host_client_vivo.
[2014-06-18 10:06:23 -0300] notice/Dependency: Dependency 'host_client_ap!host_client_vivo-host' passed: Notifications are not disabled
[2014-06-18 10:06:23 -0300] debug/Dependency: Dependency 'host_client_station!host_client_ap-host' parent host 'host_client_ap.
[2014-06-18 10:06:23 -0300] notice/Dependency: Dependency 'host_client_station!host_client_ap-host' passed: Notifications are not disabled
[2014-06-18 10:06:23 -0300] debug/IdoMysqlConnection: Query: UPDATE icinga_hoststatus SET current_notification_number = '20',  last_notification = FROM_UNIXTIME(1403096783),  next_notification = FROM_UNIXTIME(1403100383) WHERE host_object_id = 59 AND instance_id = 1
[2014-06-18 10:06:23 -0300] information/NotificationComponent: Sending reminder notification for object 'host_client_station'
[2014-06-18 10:06:23 -0300] debug/Notification: FType=32, TypeFilter=511
[2014-06-18 10:06:23 -0300] information/Notification: Sending notification for user 'suporte-tecnomega'
[2014-06-18 10:06:23 -0300] debug/DbEvents: add notification history for 'host_client_station'
[2014-06-18 10:06:23 -0300] debug/DbEvents: add contact notification history for service 'host_client_station' and user 'suporte-tecnomega'.

Config

// Hosts

object Host "host_client_vivo" {
  import "generic-host"
  address = "xxx.xxx.xx.xx"
  notes = "Border router"
  vars.os = "Router"
  vars.sla = "24x7"
}

object Host "host_client_ap" {
  import "generic-host"
  address = "xxx.xxx.xx.xx"
  vars.os = "Wireless"
  vars.sla = "24x7"
}


object Host "host_client_station" {
  import "generic-host"
  address = "xxx.xxx.xx.xx"
  vars.os = "Wireless"
  vars.sla = "24x7"
}

// Apply dependency

apply Dependency "host_client_vivo-host" to Host {
  parent_host_name = "host_client_vivo"
  disable_checks = true
  assign where host.name == "host_client_ap"
}

apply Dependency "host_client_vivo-service" to Service {
  parent_host_name = "host_client_vivo"
  parent_service_name = "ping4"

  states = [ Warning, Critical, Unknown ]
  disable_checks = true

  disable_notifications = true

  assign where host.name == "host_client_ap"
  ignore where service.name == "ping4"
}


apply Dependency "host_client_ap-host" to Host {
  parent_host_name = "host_client_ap"

  disable_checks = true

  assign where host.name == "host_client_station"
}


apply Dependency "host_client_ap-service" to Service {
  parent_host_name = "host_client_ap"
  parent_service_name = "ping4"

  states = [ Warning, Critical, Unknown ]
  disable_checks = true
  disable_notifications = true

  assign where host.name == "host_client_station"
  ignore where service.name == "ping4"
}


// Apply notification


apply Notification "mail-suporte-tecnomega" to Host {
  import "mail-host-notification"

  user_groups = [ "grp-support" ]

  assign where host.vars.sla == "24x7"
}


apply Notification "mail-suporte-tecnomega" to Service {
  import "mail-service-notification"

  user_groups = [ "grp-support" ]

  assign where service.vars.sla == "24x7"
}


// Contacts

object UserGroup "grp-support" {
  display_name = "Tecnomega"
}

template User "users-noc" {
    groups = [ "grp-support" ]
}

object User "suporte-tecnomega" {
    states = [ OK, Warning, Critical, Up, Down ]
    types = [ Problem, Recovery, Custom ]

    import "users-noc"
    display_name = "Support"
    email = "support@domain.com"
}

Attachments

  • parent.png ccesario - 2014-06-18 13:21:50 +00:00
@icinga-migration
Copy link
Author

Updated by ccesario on 2014-06-18 13:21:57 +00:00

  • File added parent.png

Its attached an map image about it

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-06-18 13:28:40 +00:00

  • Category set to Notifications
  • Status changed from New to Assigned
  • Assigned to set to gbeutner
  • Target Version set to 2.0.1

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-07-09 15:20:07 +00:00

  • Target Version deleted 2.0.1

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-01-12 09:30:34 +00:00

  • Status changed from Assigned to Feedback
  • Assigned to changed from gbeutner to ccesario

Please re-test against 2.2.3.

@icinga-migration
Copy link
Author

Updated by ccesario on 2015-01-13 13:40:16 +00:00

@dnsmichi it is fixed!!

thanks!

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-01-13 14:06:01 +00:00

  • Status changed from Feedback to Closed

Thanks for the feedback :)

@icinga-migration icinga-migration added bug Something isn't working area/notifications Notification events labels Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/notifications Notification events bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant