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

Possible failure to set exit state when group resolution failure occurs #188

Open
atc0005 opened this issue May 18, 2023 · 0 comments
Open
Assignees
Labels
bug Something isn't working exit state question Further information is requested
Milestone

Comments

@atc0005
Copy link
Owner

atc0005 commented May 18, 2023

While auditing return exit state values (as part of #171) I found what appears to be a failure to explicitly set the exit state:

resolveErr := paths.ResolveIDs(&record)
if resolveErr != nil {
zlog.Error().Err(resolveErr).
Str("path", path).
Msg(resolveErr.Error())
nes.AddError(resolveErr)
nes.ServiceOutput = fmt.Sprintf(
"%s: failed to resolve IDs: %v [path: %q]",
nagios.StateCRITICALLabel,
resolveErr.Error(),
path,
)
return resolveErr
}

I see where the CRITICAL label is set, but not the exit state. I don't see where the caller is handling this either.

@atc0005 atc0005 added bug Something isn't working question Further information is requested exit state labels May 18, 2023
@atc0005 atc0005 added this to the Future milestone May 18, 2023
@atc0005 atc0005 self-assigned this May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working exit state question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant