To my knowledge it is not possible to pass an environment variable from the script through the SSH client and into ipMonitor. Having that said, in this scenario ipMonitor can only monitor if the entire process failed or succeeded. The script is therefore written to "fail" if its thresholds are not met by setting the errorlevel to 1.
If you find an alternative way to do this, please feel free to share.
Chris Foley - SolarWinds - Support Specialist
Support: 866.530.8040 | Fax: 512.857.0125
network management simplified | solarwinds.com