I am currently working on projects with Laravel/PHP that I manage with AWS.
I deploy several instances thanks to the CloudFormation service. So i have a lot of LogsGroups.
If I have an error in these LogsGroups, I have to manually search for the error logs.
So, my need is :
When I have an error API or PH message in one of my LogsGroups, like this:
[2021-11-24T13:03:48.075879+00:00] technical.ERROR: TYPE: Trzproject\Trzutils\Exceptions\InvalidJWTException
MESSAGE: Provided JWT has since expired, as defined by the "exp" claim
FILE: /var/task/vendor/trzproject/trzcore/src/Trzutils/JWT/JWTService.php LINE: 64 TRACE: stack trace disabled ____________________________________________________________________
I want to be alerted with a message (slack, mail, whatever) that tells me in which LogGroup is the error.
I can’t create a LogInsight query because I have a lot of clients and, LogInsight does not allow to make query on a very large amount of LogsGroups.
Thank you in advance for your advice.
Edit : something like this ; https://theithollow.com/2017/12/11/use-amazon-cloudwatch-logs-metric-filters-send-alerts/
but without create x alarms for x logGroups
(sorry for my english)