README.TXT 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. Amazon CloudWatch (Monitoring) Command Line Tools
  2. =================================================
  3. Installation:
  4. -------------
  5. 1. Ensure that JAVA version 1.5 or higher is installed on your system: (java -version)
  6. 2. Unzip the deployment zip file
  7. 3. Set the following environment variables:
  8. 3.1 AWS_CLOUDWATCH_HOME - The directory where the deployment files were copied to
  9. check with:
  10. Unix: ls ${AWS_CLOUDWATCH_HOME}/bin should list mon-list-metrics ...)
  11. Windows: dir %AWS_CLOUDWATCH_HOME%\bin should list mon-list-metrics ...)
  12. 3.2 JAVA_HOME - Java Installation home directory
  13. 4. Add ${AWS_CLOUDWATCH_HOME}/bin (in Windows: %AWS_CLOUDWATCH_HOME%\bin) to your path
  14. Configuration:
  15. --------------
  16. Provide the command line tool with your AWS user credentials. There
  17. are two ways you can provide credentails: AWS keys, or using X.509
  18. certificates.
  19. Using AWS Keys
  20. --------------
  21. 1. Create a credential file: The deployment includes a template file ${AWS_CLOUDWATCH_HOME}/credential-file-path.template.
  22. Edit a copy of this file to add your information.
  23. On UNIX, limit permissions to the owner of the credential file: $ chmod 600 <the file created above>.
  24. 2. There are several ways to provide your credential information:
  25. a. Set the following environment variable: AWS_CREDENTIAL_FILE=<the file created in 1>
  26. b. Alternatively, provide the following option with every command --aws-credential-file <the file created in 1>
  27. c. Explicitly specify credentials on the command line: --I ACCESS_KEY --S SECRET_KEY
  28. Using X.509 Certs
  29. -----------------
  30. 1. Save your cetificate and private keys to files: e.g. my-cert.pem
  31. and my-pk.pem.
  32. 2. There are two ways to provide the certificate information to the
  33. command line tool
  34. a. Set the following environment variables:
  35. EC2_CERT=/path/to/cert/file
  36. EC2_PRIVATE_KEY=/path/to/key/file
  37. b. Specify the files directly on command-line for every command
  38. <command> --ec2-cert-file-path=/path/to/cert/file --ec2-private-key-file-path=/path/to/key/file
  39. Setting custom JVM properties
  40. -----------------------------
  41. By setting the environment variable SERVICE_JVM_ARGS, you can pass arbitrary JVM properties to the command line.
  42. For example, the following line sets proxy server properties in Linux/UNIX
  43. export SERVICE_JVM_ARGS="-Dhttp.proxyHost=http://my.proxy.com -Dhttp.proxyPort=8080"
  44. Running:
  45. ---------
  46. 1. Check that your setup works properly, run the following command:
  47. $ mon-cmd --help
  48. You should see the usage page for all Monitoring commands
  49. $ mon-list-metrics --headers
  50. You should see a header line. If you have any metrics defined, you should see them as well.