awslabs/mountpoint-s3

Alert when mountpoint-s3 mounted and unmounted

Opened this issue · 1 comments

Tell us more about this new feature.

I have a high traffic system that would like to use mountpoint-s3 for mounting a bucket that contains a lot of files and they are read access very frequently.
In case of mountpoint-s3 is unmounted by accident, It might make a very big impact to our high traffic system. So I plan some alerts for mounted and unmounted events. I can do it using CloudWatch metric filter and Alarm when a log entry like "INFO fuser::session: Unmounted" occurs in mountpoint-s3 log files. The problem is without debug log, no log with level under WARN is written into log files. If I turn debug log on, there are ton of logs on my EC2 instance sent to CloudWatch and cost very high.

If log entry for mounted and unmounted comes with WARN level, it will solve my problem.

Can you suggest a solution for this?

It may be useful to look at this section of the docs: Advanced logging verbosity options. By using the environment variable documented there, you should be able to configure logging in more detail than with the --debug flag.
For example, would something like this suit your needs?

MOUNTPOINT_LOG="info,awscrt=off"