Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

Commit

Permalink
Add exit code 3 as valid nagios value
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee Briggs committed Nov 13, 2016
1 parent 92ff7bf commit 54633b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sensu-wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func run_command(cmdName string, cmdArgs []string, timeout int) (int, string) {
// Command ! exit 0, capture it
if status, ok := exiterr.Sys().(syscall.WaitStatus); ok {
// Check it's nagios compliant
if status.ExitStatus() == 1 || status.ExitStatus() == 2 {
if status.ExitStatus() == 1 || status.ExitStatus() == 2 || status.ExitStatus() == 3 {
return status.ExitStatus(), stderr.String()
} else {
// If not, force an exit code 2
Expand Down

0 comments on commit 54633b0

Please sign in to comment.