Browse Source

Adding a debug log to indicate the exit code of failed check

pull/1343/head
Diptanu Choudhury 9 years ago
parent
commit
d695012e40
  1. 1
      command/agent/check.go

1
command/agent/check.go

@ -616,6 +616,7 @@ func (c *CheckDocker) check() {
if execInfo.ExitCode == 0 { if execInfo.ExitCode == 0 {
c.Notify.UpdateCheck(c.CheckID, structs.HealthPassing, fmt.Sprintf("Script execution %s: Success", c.Script)) c.Notify.UpdateCheck(c.CheckID, structs.HealthPassing, fmt.Sprintf("Script execution %s: Success", c.Script))
} else { } else {
c.Logger.Printf("[DEBUG] Check failed with exit code: %d", execInfo.ExitCode)
c.Notify.UpdateCheck(c.CheckID, structs.HealthCritical, fmt.Sprintf("Script execution faied with exit code: %s", execInfo.ExitCode)) c.Notify.UpdateCheck(c.CheckID, structs.HealthCritical, fmt.Sprintf("Script execution faied with exit code: %s", execInfo.ExitCode))
} }

Loading…
Cancel
Save