I followed the steps in this article, http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/mon-scripts.html#mon-scripts-systems to monitor my server's memory usage and submit the data to CloudWatch.
One of the metrics that can be used is --mem-used-incl-cache-buff
which collects and sends the MemoryUsed metrics, reported in megabytes. This option reports used in cache and buffers, as well as memory allocated by applications and the operating system. This memory metric is important compare to other memory metrics because this metric collects memory used in cache and buffers as well. The other memory metrics simply collect free
and used
memory to determine whether or not my server is running out of memory.
Unfortunately this is the output when I tried to run the script:
[root@ip-172-31-10-167 ~]# ~/aws-scripts-mon/mon-put-instance-data.pl --mem-used-incl-cache-buff --verify --verbose
ERROR: No metrics specified for collection and submission to CloudWatch.
For more information, run 'mon-put-instance-data.pl --help'
I've followed the prerequisite in the documentation to ensure that all required tools are installed first. What did I miss?