答案1
为了监控日志文件最后一行的“ERROR”:将日志文件路径更改为:
/var/log/waagent.log|tail -n 1
Modify the trigger condition to: count(/Linux Azure Waagent/log[/var/log/waagent.log|tail -n 1,,,,skip],#1,"regexp","ERROR") > 0
为“INFO”创建触发器:添加新的触发条件:javascriptcount(/Linux Azure Waagent/log[/var/log/waagent.log|tail -n 1,,,,skip],#1,"regexp","INFO") > 0