Capture JSON for Alerts that are sent to SQS

Reply
L0 Member

Capture JSON for Alerts that are sent to SQS

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.

 

 

SQS_json.JPGSQS_JSON_Fields

Alert_API_Detailed.JPGAlert_API_JSON

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 

Highlighted
L4 Transporter

Re: Capture JSON for Alerts that are sent to SQS

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.

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

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 Live Community as a whole!

The Live Community thanks you for your participation!