Skip to content

Commit

Permalink
Set check report message to MACKEREL_CHECK_MESSAGE env
Browse files Browse the repository at this point in the history
  • Loading branch information
a-know committed Oct 16, 2019
1 parent 36bde82 commit c9348b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ func runChecker(ctx context.Context, checker *checks.Checker, checkReportCh chan
nextTime = now.Add(nextInterval)

if checker.Config.Action != nil {
env := []string{fmt.Sprintf("MACKEREL_STATUS=%s", report.Status), fmt.Sprintf("MACKEREL_PREVIOUS_STATUS=%s", lastStatus)}
env := []string{fmt.Sprintf("MACKEREL_STATUS=%s", report.Status), fmt.Sprintf("MACKEREL_PREVIOUS_STATUS=%s", lastStatus), fmt.Sprintf("MACKEREL_CHECK_MESSAGE=%s", report.Message)}
go func() {
logger.Debugf("Checker %q action: %q env: %+v", checker.Name, checker.Config.Action.CommandString(), env)
stdout, stderr, exitCode, _ := checker.Config.Action.RunWithEnv(env)
Expand Down

0 comments on commit c9348b8

Please sign in to comment.