我需要監視/mnt/file-i-need-to-monitor.txt我需要的路徑中的特定檔案;
- 如果檔案不再存在,則創建警報。
if [ ! -f /mnt/file-i-need-to-monitor.txt ]; then
// create aws alarm and notify via an email
fi
我怎樣才能整合這種方法?
我已經研究過了,aws log agent但它似乎是為了將任何自定義日志推送到日志組。
有人可以幫我解決這個問題嗎?
uj5u.com熱心網友回復:
你好賈納納特巴努卡,
對于您的情況,您可以使用 aws cli 推送自定義指標,如果此自定義指標大于 1,則基于控制臺創建警報
https://docs.aws.amazon.com/cli/latest/reference/cloudwatch/put-metric-data.html
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/408888.html
標籤:
上一篇:AWS“HelloWorld”PythonLambda導致Runtime.ImportModuleError:“無法匯入模塊”
