CI Impact Analysis
Impact Analysis Overview
CI Impact Analysis uses the Neptune knowledge graph to calculate the downstream impact of an outage or change to any CI. When an incident or change references a CI, StackFlow automatically performs a graph traversal to identify all dependent services, applications, and users that may be affected. This information is displayed in the Impact Analysis tab and used to calculate change risk scores.
- Neptune: Graph must be populated with at least
DEPENDS_ONandAFFECTSedge types - DynamoDB:
StackFlow_CIrecords must havecriticalityattribute for blast radius scoring - Bedrock KB:
BXJGG7PIPSactive for AI-generated impact narrative - IAM:
StackFlowAPIRolewithneptune-db:ReadDataViaQueryon cluster ARN
Blast Radius Calculation
The blast radius algorithm performs a multi-hop BFS traversal from the affected CI through its dependency edges. Each downstream CI is scored based on its criticality (CRITICAL, HIGH, MEDIUM, LOW), distance from the root CI (closer = higher impact), and operational status (only Active CIs are counted in the blast radius score).
import boto3
import json
# Call the impact analysis API
response = requests.get(
f"https://your-instance.stackflow-tech.com/prod/api/cmdb/impact-analysis",
headers={"Authorization": f"Bearer {token}"},
params={
"ci_id": "ci_aurora_main_prod",
"max_depth": 4,
"include_inactive": False
}
)
impact = response.json()
print(f"Blast radius: {impact['affected_ci_count']} CIs")
print(f"Estimated users affected: {impact['estimated_user_impact']}")
print(f"Critical services affected: {impact['critical_services']}")
Dependency Visualization
The CMDB Impact Analysis page provides an interactive force-directed graph visualization of the CI dependency network. Nodes are color-coded by CI class and sized by criticality. Edges show the relationship type. The visualization uses D3.js and supports zoom, pan, and click-to-expand for navigating large dependency trees. Export the graph as PNG or SVG from the toolbar.
Change Risk from Impact
Impact analysis results feed directly into the Change Management risk scoring engine. A change to a CI with a large, critical blast radius automatically receives a higher risk score, which may trigger additional approval stages (e.g., requiring CISO sign-off for changes to CIs with 500+ affected users).
API Reference
# Get impact analysis for a CI
GET /prod/api/cmdb/impact-analysis?ci_id={ci_id}&max_depth={1-5}
# Get upstream dependencies (what does this CI depend on?)
GET /prod/api/cmdb/dependencies/upstream/{ci_id}
# Get downstream dependents (what depends on this CI?)
GET /prod/api/cmdb/dependencies/downstream/{ci_id}
# Find shortest path between two CIs
GET /prod/api/cmdb/path?from_ci={ci_id}&to_ci={ci_id}