Monitoring with AWS CloudWatch Agent
You can use AWS CloudWatch Agent to monitor your applications and resources on the AWS in real time. This section explains how to use AWS CloudWatch to monitor Exasol installation on AWS.
Install and Configure CloudWatch Agent
Do the following to install and configure the CloudWatch Agent:
- Attach CloudWatchAgentServerPolicy to IAM role of the EC2 instance.
- Access the cluster using ssh and run the following command to download the CloudWatch package.
- Run the following command on the nodes that should send the matrices.
rpm -ivh amazon-cloudwatch-agent.rpm
- (Optional) If you want to send the matrices to a different region, modify the following file.
- (Optional) Run the following commands to create AWS CloudWatch profile for AWS API.
pip install pipenv
pip install awscli
- (Optional) Enter Key, Secret, and Region in AWS Configure > Profile AmazonCloudWatchAgent.
- Create agent configuration or use an existing one at the following location.
It will create /opt/aws/amazon-cloudwatch-agent/bin/config.json
- Run the following command to start the agent and check the syntax.
/opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -c file:/opt/aws/amazon-cloudwatch-agent/bin/config.json -s
The logs are stored in the following file.
Start the CloudWatch Agent
Run the following command to start the CloudWatch Agent.
systemctl start amazon-cloudwatch-agent.service
Stop the CloudWatch Agent
Run the following command to stop the CloudWatch Agent.
systemctl stop amazon-cloudwatch-agent.service
Restart the CloudWatch Agent
Run the following command to restart the CloudWatch Agent.
systemctl restart amazon-cloudwatch-agent.service
Check Status of the CloudWatch Agent
Run the following command to check status of the CloudWatch Agent.
systemctl status amazon-cloudwatch-agent.service
To know about the AWS CloudWatch Agent in details, see official CloudWatch Documentation.