Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions labs/starter-lab/scripts/post-provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,11 @@ API_VERSION="2025-05-01-preview"
FILTER_CREATED=false
for attempt in 1 2 3 4 5; do
TOKEN=$(get_token)
HTTP_CODE=$(curl -s -o ${TEMP_DIR}/response-plan-resp.txt -w "%{http_code}" \
HTTP_CODE=$(curl -s -o "${TEMP_DIR}/response-plan-resp.txt" -w "%{http_code}" \
-X PUT "${AGENT_ENDPOINT}/api/v1/incidentPlayground/filters/grubify-http-errors" \
-H "Authorization: Bearer ${TOKEN}" \
-H "Content-Type: application/json" \
--data-binary '{"id":"grubify-http-errors","name":"Grubify HTTP Errors","priorities":["Sev0","Sev1","Sev2","Sev3","Sev4"],"titleContains":"","handlingAgent":"incident-handler","agentMode":"autonomous","maxAttempts":3}')
--data-binary '{"id":"grubify-http-errors","name":"Grubify HTTP Errors","priorities":["Sev0","Sev1","Sev2","Sev3","Sev4"],"titleContains":"alert-http-5xx-sre-lab","titleContainsAll":[],"titleContainsAny":[],"titleNotContains":[],"handlingAgent":"incident-handler","agentMode":"autonomous","maxAutomatedInvestigationAttempts":3,"mergeEnabled":true,"mergeWindowHours":3,"isEnabled":true}')

if [ "$HTTP_CODE" = "200" ] || [ "$HTTP_CODE" = "201" ] || [ "$HTTP_CODE" = "202" ] || [ "$HTTP_CODE" = "409" ]; then
echo " ✅ Response plan → incident-handler"
Expand All @@ -383,6 +383,7 @@ done

if [ "$FILTER_CREATED" = "false" ]; then
echo " ⚠️ Response plan failed after 5 attempts (set up in portal or run: ./scripts/post-provision.sh --retry)"
echo " API response: $(cat "${TEMP_DIR}/response-plan-resp.txt")"
fi
rm -f ${TEMP_DIR}/response-plan-resp.txt

Expand Down