I have a requirement to monitor for a specific file in the /mnt/file-i-need-to-monitor.txt
path where I need to;
if [ ! -f /mnt/file-i-need-to-monitor.txt ]; then
// create aws alarm and notify via an email
fi
How can I integrate this methodology?
I have looked into the aws log agent
but it seems like it is for pushing any custom logs to a log group.
Can someone help me fix this?
Hello Jananath Banuka,
For your case, you can use aws cli to push a custom metric, And you create an alert based on the console if this custom metric if you have > 1
https://docs.aws.amazon.com/cli/latest/reference/cloudwatch/put-metric-data.html