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

check_cert | Include the baseline certs "lead-in" immediately after retrieving the certificate chain #316

Closed
atc0005 opened this issue May 3, 2022 · 0 comments · Fixed by #319
Assignees
Labels
bug Something isn't working plugin/check_cert
Milestone

Comments

@atc0005
Copy link
Owner

atc0005 commented May 3, 2022

This block:

// Prepend a baseline lead-in that summarizes the number of certificates
// retrieved and from which target host/IP Address.
defer func() {
nagiosExitState.LongServiceOutput = fmt.Sprintf(
"%d certs found for %s%s%s%s",
certsSummary.TotalCertsCount,
certChainSource,
nagios.CheckOutputEOL,
nagios.CheckOutputEOL,
nagiosExitState.LongServiceOutput,
)
}()

is included after hostname verification succeeds or fails. Instead, for troubleshooting purposes we probably want to include that just after the certificate chain is retrieved. Then, regardless whether any later checks succeed or fail we'll have the plugin output to indicate how many certs were found for what source.

@atc0005 atc0005 added bug Something isn't working plugin/check_cert labels May 3, 2022
@atc0005 atc0005 added this to the Next Release milestone May 3, 2022
@atc0005 atc0005 self-assigned this May 3, 2022
atc0005 added a commit that referenced this issue May 4, 2022
Move lead-in text immediately after retreiving the certificate
chain so that those details are provided regardless of whether
hostname verification is successful.

refs GH-316
atc0005 added a commit that referenced this issue May 4, 2022
Move lead-in text immediately after retrieving the certificate
chain so that those details are provided regardless of whether
hostname verification is successful.

refs GH-316
@atc0005 atc0005 changed the title Include the baseline certs "lead-in" immediately after retrieving the certificate chain check_cert | Include the baseline certs "lead-in" immediately after retrieving the certificate chain May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working plugin/check_cert
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant