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

Suppress stale check events when client keepalive event exists #1428

Merged

Conversation

Projects
None yet
2 participants
@cwjohnston
Copy link
Member

commented Aug 23, 2016

Description

Inspired by #1282, this pull request includes changes to suppress stale check events (i.e. checks with an expired ttl) when the relevant client has an active keepalive event.

Also updates spec config.json and API query helper to use 127.0.0.1 instead of localhost to help those of us with working IPv6 stacks :)

Related Issue

Closes #1282

Motivation and Context

Motivated by a desire to reduce the noise and boost the signal :)
#1282 and #861 (comment) describe the desire to suppress stale check events if keepalive is also alerting.

How Has This Been Tested?

Added unit tests

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

cwjohnston added some commits Aug 22, 2016

update specs to use 127.0.0.1 in lieu of localhost
ipv6 resolution of localhost is problematic as the API does not currently bind
to [::1].

@cwjohnston cwjohnston added this to the 0.26 milestone Aug 23, 2016

# @param client_name [String] name of client to look up in event registry.
# @return [TrueClass, FalseClass]
def keepalive_event_exists?(client_name)
@redis.hexists("event:#{client_name}", "keepalive") do |event_exists|

This comment has been minimized.

Copy link
@portertech

portertech Aug 23, 2016

Member

should be "events:"

@portertech

This comment has been minimized.

Copy link
Member

commented Aug 23, 2016

1486

Going to merge and make a few minor changes, i.e. white space and language (incidents).

@portertech portertech merged commit 148bd1e into sensu:release/0.26 Aug 23, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@portertech portertech removed the in progress label Aug 23, 2016

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.