I'd prefer to have this function be in machine/heartbeat.go, but there's an import loop if we do that.