Monitoring EFS file system mount status
You can use Amazon CloudWatch Logs to monitor the status of EFS file system mounts remotely without having to log into the Amazon EC2 instances. The following pre-requisites are required in order to use CloudWatch Logs to monitor for file system mount status:
The Amazon EC2 instances are launched with an instance profile that includes the
AmazonElasticFileSystemsUtils
permissions policy. For more information, see Step 1: Configure an IAM instance profile with the required permissions.Version 1.28.1 or later of the Amazon EFS client (
amazon-efs-utils
package) is installed on the Amazon EC2 instances. You can use AWS Systems Manager to automatically install the package on your instances. For more information, see Step 2: Configure an Association used by State Manager for installing or updating the Amazon EFS client.The
botocore
package is installed on the Amazon EC2 instance. For more information, see Installing botocore.The
efs-utils.conf
configuration file is updated to enable CloudWatch Logs. When you use AWS Systems Manager to install and configure theamazon-efs-utils
package, this update to enable CloudWatch logging is automatically done for you. When you install theamazon-efs-utils
package from the yum repository, you have to manually update the/etc/amazon/efs/efs-utils.conf
configuration file by uncommenting the# enabled = true
line in thecloudwatch-log
section.
Here are examples of mount status log entries:
Successfully mounted fs-12345678.efs.us-east-1.amazonaws.com at /home/ec2-user/efs Mount failed, Failed to resolve "fs-01234567.efs.us-east-1.amazonaws.com"
To view mount status in CloudWatch Logs
Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/
. Choose Log groups in the left-hand navigation bar.
Choose the /aws/efs/utils log group. You will see a log stream for each Amazon EC2 instance and EFS file system combination.
Choose a log stream to view specific log events including the file system mount status.