JohnTorres603474

prep_process_report and pull a specific string help

Discussion created by JohnTorres603474 on Jun 13, 2018
Latest reply on Jun 14, 2018 by Pete Wirfs

Hi. I could use the  communities help to prep process a report and create a variable of a specific string from a line (stored as a variable). The string characters might be from line 50-70 but I prefer not to hard code that values in case the position ever changes.

 

Post-Processing results for the prep_process_report is:

2018-06-13 14:39:16 - U00020408 OG alertId is : 2018-06-13 14:39:15 "alertId": "878520b4-2884-4f37-997e-aa80558f1eae-1528904520802",

 

I need the alert id value without the quotes (e.g. 878520b4-2884-4f37-997e-aa80558f1eae-1528904520802)

 

Original Report is:

 

2018-06-13 14:39:15             Connect timeout set to 30 seconds 2018-06-13 14:39:15             Read timeout set to:60 2018-06-13 14:39:15             Using connection:CONN.WEBSERVICE.RESTCONNECTION.OPSGENIE 2018-06-13 14:39:15             Authentication type:None 2018-06-13 14:39:15             Request:GET https://api.opsgenie.com/v2/alerts/requests/36305b6c-42e1-4b74-86af-877ee1f5691c 2018-06-13 14:39:15             Request headers:[[Authorization, GenieKey 45ba-92a7-c3e7c0e34c74]] 2018-06-13 14:39:15             Sending request... 2018-06-13 14:39:15             Response: 2018-06-13 14:39:15             Status:200 OK 2018-06-13 14:39:15             Response headers:[Content-Type:[application/json;charset=UTF-8], Transfer-Encoding:[chunked], Connection:[keep-alive], Date:[Wed, 13 Jun 2018 18:39:16 GMT], X-Response-Time:[0.007], X-Request-ID:[b50b5935-9ed3-4925-b7d8-6b1ed51265d0], X-RateLimit-State:[OK], X-Cache:[Miss from cloudfront], Via:[1.1 1011122594527947f68957a1e79e0577.cloudfront.net (CloudFront)], X-Amz-Cf-Id:[alWoqKCdSDmC3_Fs1R2SJrP0DXUf5HSHCvsM2-WFye8JvvBzrpCzlQ==]] 2018-06-13 14:39:15             Response - application/json 2018-06-13 14:39:15             Start response pattern 2018-06-13 14:39:15             { 2018-06-13 14:39:15                 "data": { 2018-06-13 14:39:15                     "success": true, 2018-06-13 14:39:15                     "action": "Create", 2018-06-13 14:39:15                     "processedAt": "2018-06-13T15:42:00.893Z", 2018-06-13 14:39:15                     "integrationId": "b9f5bf78-7bec-49f2-9432-83a32a1619fc", 2018-06-13 14:39:15                     "isSuccess": true, 2018-06-13 14:39:15                     "status": "Created alert", 2018-06-13 14:39:15                     "alertId": "878520b4-2884-4f37-997e-aa80558f1eae-1528904520802", 2018-06-13 14:39:15                     "alias": "878520b4-2884-4f37-997e-aa80558f1eae-1528904520802" 2018-06-13 14:39:15                 }, 2018-06-13 14:39:15                 "took": 0.007, 2018-06-13 14:39:15                 "requestId": "b50b5935-9ed3-4925-b7d8-6b1ed51265d0" 2018-06-13 14:39:15             } 2018-06-13 14:39:15             End response pattern 2018-06-13 14:39:15             Writing response output to file:D:\Automic\Agents\WebService\bin\task_reports\restResp_61594372.json 2018-06-13 14:39:15             RESTful job complete

Outcomes