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

Retain next_check schedule on restart (#224, #156) #259

Commits on Sep 11, 2018

  1. Retain next_check schedule on restart

    This commit ensures that the next_check schedule for hosts and services
    are retained on Naemon restart, given that use_retained_scheduling_info
    is enabled.
    
    The logic is as follows:
    
    - If use_retained_scheduling_info is disabled, set a random time (as
      before)
    - If use_retained_schedule_info is enabled:
      - If we didn't miss the check during the restart, retain the old
        next_check time
      - If we missed one check, schedule the service/host within the next
        interval_length (usually 60 seconds)
      - If we missed more than one check, schedule the next check randomly.
    
    We schedule missed checks within 60 seconds, rather than immediately in
    order to do some load balacing. This is also the rationale for
    scheduling the check randomly, in case we missed more than one check
    (this indicates Naemon has been down for a longer period of time).
    
    This fixes:
    - naemon#224
    - naemon#156
    - MON-10720 (https://jira.op5.com/browse/MON-10720)
    
    Signed-off-by: Jacob Hansen <jhansen@op5.com>
    jacobbaungard committed Sep 11, 2018
    Configuration menu
    Copy the full SHA
    1b97362 View commit details
    Browse the repository at this point in the history
  2. Tests: Retain next_check schedule on restart

    This commit adds tests to ensure that the next_check is set correctly
    after Naemon restarts. This ensures the logic is from the previous
    commit is correctly followed.
    
    This fixes:
    - naemon#224
    - naemon#156
    - MON-10720 (https://jira.op5.com/browse/MON-10720)
    
    Signed-off-by: Jacob Hansen <jhansen@op5.com>
    jacobbaungard committed Sep 11, 2018
    Configuration menu
    Copy the full SHA
    402706b View commit details
    Browse the repository at this point in the history