Monitoring command execution


If you have a script or a binary that you can't instrument, Uptrace provides a wrapper that executes a command saving an exit code, stdout, and stderr. If a command exits with a non-zero exit code, Uptrace will send you a notification.

UPTRACE_DSN="" uptrace-run -cmd="sleep 1 && echo hello" -timeout=1m

The timeout option specifies command execution timeout. Timeout is an interval of time after which Uptrace aborts command execution and marks command as failed.


uptrace-run requires a recent version of Go:

GO111MODULE=on go get

Go saves the compiled binary in $GOPATH/bin:

go env GOPATH`/bin/uptrace-run -help

The source codeopen in new window is available at GitHub.

Last Updated: