I have configured Redlock to send alert to SQS queue. I am getting the below fields in JSON body when I fetch it from SQS:
However, When I try to fetch the alert details using Alert API I get the complete different schema.
As soon as an alert is generated, then the JSON data for that alert is sent to SQS queue. (I have lambda that captures and process the data from queue and queue is empty)
Is there any way I can get the data in JSON format which are sent to SQS for the existing alert?
My aim is to capture the JSON data from the existing alert instead of creating a new alert and use it to manipulate and process the data from SQS as per requirement
The alert metadata should be under the "resource" field of the Alert API response JSON. Is the information not there? If you're looking to get the EXACT same overall schema, then I don't believe that's possible. You probably have to modify your Lambda to accommodate the Alert API format. Or alternatively, (if you don't mind doing this), you can always delete the Cloud Account to get rid of all the alerts, then recreate it to send all the alert into SQS.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!