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

Comments

Projects
None yet
1 participant
@icinga-migration
Copy link
Member

commented May 21, 2016

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

This comment has been minimized.

Copy link
Member Author

commented May 21, 2016

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

This comment has been minimized.

Copy link
Member Author

commented May 21, 2016

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

This comment has been minimized.

Copy link
Member Author

commented May 21, 2016

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

This comment has been minimized.

Copy link
Member Author

commented Jun 16, 2016

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

  • Target Version changed from 307 to 2.5.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.