Last updated: 2021-03-10
Here’s a sample workflow to demonstrate the use of the Orchestration app to automate remediation of GCP instance.
Executing self-healing workflows based on alerts coming from the monitoring tool(New Relic), to fix the problems through resetting the instance to its original state and making the GCP instance available.


Assumptions
- P0\_alert
- instance-1
- us-central1-a
We’ll use these tags within the app action node to reset the correct instance.


Note: To integrate New Relic APM with Freshservice Alert Management, follow the documentation provided.
Workflow configuration
1. Create the Event when an Incident is raised. Followed by a condition node to check whether the incident is p0 priority.
2. You can then pull in the App Node which will have the following configurations:
App Name: GCP - Orch
App Action: Reset Instance
Note while configuring inputs:
To specify the name and zone, we have to use liquid templates to map ticket tags and to fetch the appropriate value.
For example,
Placeholder for the name will be,
{% assign value = ticket.tags \| split: ", " %}{{value\[1\]}}
Placeholder for the zone will be,
{% assign value = ticket.tags \| split: ", " %}{{value\[2\]}}

3. To validate whether the instance reset is successful or not a condition node is added with a check for status code as 200.
4. Finally, add a public note with a confirmation message
GCP Activity Console
