Amazon Web Service has deprecated support for per-instance performance monitoring scripts. As of Entuity v21.0 P02 upwards, Entuity provides updated support for the AWS CloudWatch agent, which is deployed via AWS Systems and is the recommended method for enabling metric collection for most AWS instances (both Windows and Linux). Please see this article for updated help and information on enabling AWS CloudWatch monitoring.
If you are using an earlier version of Entuity, please see the below instructions.
To manually install an agent of Amazon Linux running under AWS
To manage Linux instances on AWS using AWS System Manager
To manually install an agent of Amazon Linux running under AWS:
These instructions apply to the manual installation of an agent on Amazon Linux running under AWS.
- Connect to the AWS AMI Linux instance that you want to instrument.
- Install required packages by entering:
sudo yum install perl-Switch perl-DateTime perl-Sys-Syslog perl-LWP-Protocol-https -y
- Download the Cloudwatch monitoring scripts with curl http://aws-cloudwatch.s3.amazonaws.com/downloads/CloudWatchMonitoringScripts-1.2.1.zip -O
- Unzip CloudWatchMonitoringScripts-1.2.1.zip
- Remove CloudWatchMonitoringScripts-1.2.1.zip
- Change to the directory aws-scripts-mon
- Copy awscreds.template to awscreds.conf
- Edit awscreds.conf and enter your AWS Access Key and your AWS Secret Key, e.g.:
AWSAccessKeyID=<AWS Access Key>
orAWSSecretKey=<Secret Key>
- Check it works by running the command:
./mon-put-instance-data.pl --mem-util --aws-credential-file=./awscreds.conf
Note, you must ensure you have the perl-Digest-SHA model installed, to check for which you can use the following command:sudo yum install perl-Digest-SHA
If successful, metrics will be reported to CloudWatch. Reference Id: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - Add to cronjob, and schedule the regular data upload every five minutes by adding the following line to crontab:
*/5 * * * * ~/aws-scripts-mon/mon-put-instance-data.pl --mem-used-incl-cache-buff --mem-util --disk-space-util --disk-path=/ --from-cron
To manage Linux instances on AWS using AWS System Manager:
For ENA v17.0 P01 onwards, Entuity also supports SM deployed Linux CloudWatch agents.
- In the EC2 Parameter store (for the required Region), create a new parameter called "CloudWatchConfigLin"
- Enter:
{
"agent": {
"metrics_collection_interval": 60,
"logfile": "/opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log",
"debug": true
},
"metrics": {
"metrics_collected": {
"disk": {
"measurement": [
{"name": "used_percent", "unit": "Percent"},
{"name": "free", "unit": "Megabytes" },
{"name": "total", "unit": "Megabytes" },
{"name": "used", "unit": "Megabytes" }
],
"resources": [
"*"
]
},
"mem": {
"measurement": [
{"name": "available", "unit": "Megabytes" }
]
}
},
"append_dimensions": {
"InstanceId": "${aws:InstanceId}"
}
}
}
- Ensure that instances requiring monitoring have a CloudWatch capable IAM role - e.g. see the Windows AWS instrumentation notes for IAM role: "CloudWatchServerAgentMonitoringRole" and verify that "Enable CloudWatch detailed monitoring" is enabled.
- Then deploy and configure the CW Agent using SM:
- AWS -> EC2 -> Systems Manager Services -> Run Command -> "Run a command"
- Choose "AWS-ConfigureAWSPackage"
- Select the instance(s). Note, if the IAM role has only just been assigned to the instance, it might take several minutes before it appears in the "select instances" list.
- Set "Action" to "Install"
- In "Name", type "AmazonCloudWatchAgent"
- Check "Version" is "latest"
- "Run"
- Click "view result"
- Wait until status has changed from "In Progress" to "Success" or "Failed". If failed, check output of the job to see what went wrong.
- Then in SMS, configure the agent (to check that the config pull works):
- Run Command: "AmazonCloudWatch-ManageAgent"
- Select instance(s)
- Action: configure
- Mode: ec2
- Optional Configuration Source: ssm
- Optional Configuration Location: CloudWatchConfigLin
- Optional Restart: yes
- "Run"
- Check the full set of metrics appears in Entuity - CPU, Guest memory, Disks' names + utilization %, network traffic in and out, bytes and packets.
- AWS -> EC2 -> Systems Manager Services -> Run Command -> "Run a command"
Comments
0 comments
Please sign in to leave a comment.