JSON Log in PHP and Cloud Watch(2)CloudWatch Pattern
For this type of JSON data
{
"datetime": "2018-01-03 14:29:36.221983”,
"logLevel": "INFO”,
"message": "Start parsing reference number 787_534550106 for source 1624”,
"context": "[]”
}
The Filter we can put there is as follow:
{$.message = "Start parsing reference number 787_*"}
And this filter
{$.message != "Start parsing reference number 787_*" && $.datetime = "2018-01-03 14:*"}
And this filter
{$.message != "Start parsing reference number 787_*" && ( $.datetime = "2018-01-03 14:04:*" || $.datetime = "2018-01-03 14:06:*" )}
More filter pattern is here
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html
References:
http://sillycat.iteye.com/blog/2406205
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html
For this type of JSON data
{
"datetime": "2018-01-03 14:29:36.221983”,
"logLevel": "INFO”,
"message": "Start parsing reference number 787_534550106 for source 1624”,
"context": "[]”
}
The Filter we can put there is as follow:
{$.message = "Start parsing reference number 787_*"}
And this filter
{$.message != "Start parsing reference number 787_*" && $.datetime = "2018-01-03 14:*"}
And this filter
{$.message != "Start parsing reference number 787_*" && ( $.datetime = "2018-01-03 14:04:*" || $.datetime = "2018-01-03 14:06:*" )}
More filter pattern is here
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html
References:
http://sillycat.iteye.com/blog/2406205
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html