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

Refactor certs state identification #189

Merged
merged 1 commit into from
Jul 29, 2021

Conversation

atc0005
Copy link
Owner

@atc0005 atc0005 commented Jul 29, 2021

  • Extend ChainStatus type to bundle cert chain and threshold
    values
  • Replace ServiceCheckStatus field in ChainStatus type with
    method to provide this text label in addition to the appropriate
    exit code
  • Simplify GenerateCertsReport() func to only require a
    ChainStatus instead of multiple arguments
  • Update OneLineCheckSummary() so that an optional flag can be
    provided to toggle overall cert chain summary text and so that
    multiple other arguments are now replaced by a ChainStatus
    value
  • Provide and use IsCriticalState(), IsWarningState() and
    IsOKState ChainStatus methods to simplify and fix the logic
    for determining the final exit status for the service check.

refs GH-188

- Extend `ChainStatus` type to bundle cert chain and threshold
  values
- Replace `ServiceCheckStatus` field in `ChainStatus` type with
  method to provide this text label in addition to the appropriate
  exit code
- Simplify `GenerateCertsReport()` func to only require a
  `ChainStatus` instead of multiple arguments
- Update `OneLineCheckSummary()` so that an optional flag can be
  provided to toggle overall cert chain summary text and so that
  multiple other arguments are now replaced by a `ChainStatus`
  value
- Provide and use `IsCriticalState()`, `IsWarningState()` and
  `IsOKState` `ChainStatus` methods to simplify and fix the logic
  for determining the final exit status for the service check.

refs GH-188
@atc0005 atc0005 added bug Something isn't working plugin/check_cert app/lscert labels Jul 29, 2021
@atc0005 atc0005 added this to the Next Release milestone Jul 29, 2021
@atc0005 atc0005 self-assigned this Jul 29, 2021
@atc0005
Copy link
Owner Author

atc0005 commented Jul 29, 2021

Still need to update the documentation examples to reflect the fixed logic, so not closing GH-188 just yet.

@atc0005 atc0005 merged commit 934c303 into master Jul 29, 2021
@atc0005 atc0005 deleted the i188-refactor-certs-state-identification branch July 29, 2021 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant