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 #11823] Volatile check results for OK->OK transitions are logged into DB IDO statehistory #4231

Closed
icinga-migration opened this issue May 21, 2016 · 4 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/11823

Created by Skap1981 on 2016-05-21 07:28:02 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2016-05-21 11:42:23 +00:00)
Target Version: 2.5.0
Last Update: 2016-06-16 08:11:39 +00:00 (in Redmine)

Icinga Version: 2.4.10
Backport?: Not yet backported
Include in Changelog: 1

Every OK state is logged in icinga_statehistory for volatile services.
See https://monitoring-portal.org/index.php?thread/36153-eintr%C3%A4ge-in-icinga-statehistory/&postID=229469#post229509 for details.

According to http://docs.icinga.org/latest/en/volatileservices.html only the non-OK service state should be logged.
In the documentation for Icinga2 there are no further details how the states for volatile services are logged.
http://docs.icinga.org/icinga2/latest/search?q=volatile\#!/icinga2/latest/doc/module/icinga2/chapter/advanced-topics?highlight-search=volatile#volatile-services

Attachments

Changesets

2016-05-21 11:41:43 +00:00 by mfriedrich b4843dc

Fix: Volatile check results for OK->OK transitions are logged into DB IDO statehistory

fixes #11823

2016-05-21 12:16:47 +00:00 by mfriedrich 3f1a9f1

Silence compiler warnings

refs #11823
@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-05-21 11:36:51 +00:00

  • File added i2_11823_bug.png

    object Host "11320-host" {
    check_command = "dummy"
    }

    object Service "11320-service-volatile" {
    host_name = "11320-host"

    check_command = "dummy"
    
    max_check_attempts = 1
    volatile = true
    

    }

    object Notification "11320-service-notification" {
    host_name = "11320-host"
    service_name = "11320-service-volatile"

    command = "11320-notification-command"
    users = [ "11320-user" ]
    

    }

    object NotificationCommand "11320-notification-command" {
    import "plugin-notification-command"

    command = "echo \"`date +%s`: Volatile notification for service $service.name$ with state $service.state$ and type $notification.type$.\" >> /tmp/i2.volatile"
    

    }

    object User "11320-user" {

    }

  • Feed in some passive check results, and continue with OK results

i2_11823_bug.png

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-05-21 11:41:24 +00:00

  • File added i2_11823_fix.png
  • Subject changed from IDO: check result without state change for volatile services are logged in icinga_statehistory to Volatile check results for OK->OK transitions are logged into DB IDO statehistory
  • Status changed from New to Assigned
  • Assigned to set to mfriedrich
  • Target Version set to 307

NOT-OK -> NOT-OK, NOT-OK -> OK, OK -> NOT-OK changes are perfectly fine, but not OK -> OK transitions. The same applies for event handlers btw.

Applied fix:
i2_11823_fix.png

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-05-21 11:42:23 +00:00

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

Applied in changeset b4843dc.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-06-16 08:11:39 +00:00

  • Target Version changed from 307 to 2.5.0

@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.5.0 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