Injecting a failure and then reviewing the insights
In the previous section, we enabled DevOps Guru on the gdo-serverless-stack
serverless application. We also enabled the integration between DevOps Guru and Systems Manager OpsCenter. Now, let's inject some failure and see the insight.
Perform the following steps to inject the failure:
- Edit the Python script and place the
ListRestApiEndpointMonitorOper
URL as theurl variable
value and save the file. - Run the following Python script in four different tabs of your terminal to inject the large traffic. You need to keep this script running for at least 10 minutes. You will see there will be lots of failure requests with a
502
error code:$ python3 sendAPIRequest.py
- After some time, you will be able to see the anomaly insight in the DevOps Guru console. The total analyzed resources may vary in your scenario: