I am trying to add a filter to AWS Cloudwatch log on XML text that is printed to log file.
e.g. <one> <Test>Something</Test> <Msg>blah blah</Msg></one>
I am trying to put filter pattern on text <Test>Something</Test>. I have tried below options but none of them work. I receive "Invalid metrics filter pattern". There will be lines in the log file that will not have this text as well.
<Test>Something</Test>
<Test>Something</Test>
<\"Test>\"Something<\"/\"Test>\"
Any suggestions please?
A bit late but might help future visitors. I got around by using query inside Cloudwatch Logs Insights
Example log generated in Cloudwatch
Query to find all events with
TargetDomainName=NT AUTHORITY