mon-put-metric-alarm.cmd 526 B

12345678910111213141516171819202122
  1. @call echo-helper
  2. @echo off
  3. setlocal
  4. REM Set intermediate env vars because the %VAR:x=y% notation below
  5. REM (which replaces the string x with the string y in VAR)
  6. REM doesn't handle undefined environment variables. This way
  7. REM we're always dealing with defined variables in those tests.
  8. set CHK_HOME=_%AWS_CLOUDWATCH_HOME%
  9. if "%CHK_HOME:"=%" == "_" goto HOME_MISSING
  10. "%AWS_CLOUDWATCH_HOME:"=%\bin\mon-cmd.cmd" mon-put-metric-alarm %*
  11. goto DONE
  12. :HOME_MISSING
  13. echo AWS_CLOUDWATCH_HOME is not set
  14. exit /b 1
  15. :DONE
  16. endlocal