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 #10766] DB IDO: User notification type filters are incorrect #3742

Closed
icinga-migration opened this issue Dec 3, 2015 · 5 comments
Labels
area/db-ido Database output bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

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

Created by teclogi on 2015-12-03 10:48:34 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2016-03-15 13:43:24 +00:00)
Target Version: 2.4.4
Last Update: 2016-03-15 13:54:19 +00:00 (in Redmine)

Icinga Version: 2.4.3
Backport?: Already backported

If I click on a contact of a user the notification types ans states are different to the configuration as shown in the sceenshots.
The notification are send out as configured.

Attachments

  • icingaweb2.jpg teclogi - 2015-12-03 10:45:50 +00:00 - Icingaweb2 Contact details
  • icinga2 object list.jpg teclogi - 2015-12-03 10:45:54 +00:00 - icinga2 object list --type user --name "test"
  • test.conf.jpg teclogi - 2015-12-03 10:45:56 +00:00 - configuration file

Changesets

2016-03-15 13:41:55 +00:00 by mfriedrich 2f02f5a

DB IDO: Fix user notification type filters

fixes #10766

2016-03-15 13:50:43 +00:00 by mfriedrich 67b7df3

DB IDO: Fix user notification type filters

fixes #10766

2016-03-15 13:53:25 +00:00 by mfriedrich 307498e

DB IDO: Fix user notification type filters

fixes #10766
@icinga-migration
Copy link
Author

Updated by elippmann on 2016-03-15 13:10:12 +00:00

  • Project changed from Icinga Web 2 to Icinga 2
  • Subject changed from Notification contact details of user displayed wrong to IDO: Notification types of users wrong when configured explicitly
  • Category set to DB IDO
  • Icinga Version set to 2

Hi,

Icinga 2 inserts the wrong notification types when configured explicitly. I tested w/ the following configuration:

object User "User 1" {
  import "generic-user"

  groups = [ "..." ]

  email = "..."

  states = [Up, OK, Down, Critical, Unknown, Warning]
  types = [Recovery, Problem, Custom, Acknowledgement]
}

This is what's inserted into the database:

    host_timeperiod_object_id: 0
 service_timeperiod_object_id: 0
   host_notifications_enabled: 1
service_notifications_enabled: 1
          can_submit_commands: 1
      notify_service_recovery: 0
       notify_service_warning: 1
       notify_service_unknown: 1
      notify_service_critical: 1
      notify_service_flapping: 1
      notify_service_downtime: 0
         notify_host_recovery: 0
             notify_host_down: 1
      notify_host_unreachable: 0
         notify_host_flapping: 1
         notify_host_downtime: 0

Best regards,
Eric

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-03-15 13:41:06 +00:00

  • Status changed from New to Assigned

  • Assigned to set to mfriedrich

  • Target Version set to 2.5.0

    object User "10766-user" {
    email = "foo@bar.com"
    states = [ Up, OK, Down, Critical, Unknown, Warning ]
    types = [ Recovery, Problem, Custom, Acknowledgement ]
    }

Broken

MariaDB [icinga]> select * from icinga_contacts c join icinga_objects oc on c.contact_object_id=oc.object_id where oc.name1 like '10766%'\G
*************************** 1. row ***************************
                   contact_id: 17
                  instance_id: 1
                  config_type: 1
            contact_object_id: 14602
                        alias: 10766-user
                email_address: foo@bar.com
                pager_address:
    host_timeperiod_object_id: 0
 service_timeperiod_object_id: 0
   host_notifications_enabled: 1
service_notifications_enabled: 1
          can_submit_commands: 1
      notify_service_recovery: 0
       notify_service_warning: 1
       notify_service_unknown: 1
      notify_service_critical: 1
      notify_service_flapping: 1
      notify_service_downtime: 0
         notify_host_recovery: 0
             notify_host_down: 1
      notify_host_unreachable: 0
         notify_host_flapping: 1
         notify_host_downtime: 0
                    object_id: 14602
                  instance_id: 1
                objecttype_id: 10
                        name1: 10766-user
                        name2: NULL
                    is_active: 1
1 row in set (0.00 sec)

Fixed

MariaDB [icinga]> select * from icinga_contacts c join icinga_objects oc on c.contact_object_id=oc.object_id where oc.name1 like '10766%'\G
*************************** 1. row ***************************
                   contact_id: 17
                  instance_id: 1
                  config_type: 1
            contact_object_id: 14602
                        alias: 10766-user
                email_address: foo@bar.com
                pager_address:
    host_timeperiod_object_id: 0
 service_timeperiod_object_id: 0
   host_notifications_enabled: 1
service_notifications_enabled: 1
          can_submit_commands: 1
      notify_service_recovery: 1
       notify_service_warning: 1
       notify_service_unknown: 1
      notify_service_critical: 1
      notify_service_flapping: 0
      notify_service_downtime: 0
         notify_host_recovery: 1
             notify_host_down: 1
      notify_host_unreachable: 0
         notify_host_flapping: 0
         notify_host_downtime: 0
                    object_id: 14602
                  instance_id: 1
                objecttype_id: 10
                        name1: 10766-user
                        name2: NULL
                    is_active: 1
1 row in set (0.00 sec)

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-03-15 13:43:24 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset 2f02f5a.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-03-15 13:53:48 +00:00

  • Target Version changed from 2.5.0 to 2.4.4
  • Backport? changed from __ to Already backported

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-03-15 13:54:19 +00:00

  • Subject changed from IDO: Notification types of users wrong when configured explicitly to DB IDO: User notification type filters are incorrect

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

No branches or pull requests

1 participant