Repository navigation
Architecture
balakrishnagatla edited this page Nov 29, 2026
·
1 revision

-
Providers (
src/infralens/providers/) talk to one cloud each using read-only APIs and translate what they see into one standard shape, theFinding. AWS, Azure (beta), Kubernetes and a mock provider ship in the box; others plug in through theinfralens.providersentry-point group. -
Engine (
engine.py) runs the providers, applies the policy (thresholds, ignore rules, ownership tags), resolves owners from tags, and correlates each reliability alert with recent changes ("what changed?"). -
Store (
store.py, SQLite) remembers every finding across scans, so reports show only what's new or resolved, triage decisions stick, and resolved cost savings are counted as captured. - Front doors: the MCP server (stdio or Streamable HTTP), the CLI, Watch Mode, and an AWS Lambda handler.
Every provider emits the same shape, so the AI and the report never need cloud-specific logic:
| Field | Example |
|---|---|
cloud, account, region
|
aws, 123456789012, us-east-2
|
category |
savings · incident · ownership
|
check |
unattached_volume, log_error_spike, crash_loop
|
resource_type, resource_id
|
ebs_volume, vol-0abc...
|
title, severity
|
low · medium · high · critical |
est_monthly_cost_usd |
1.60 |
evidence |
numbers and log lines the AI reasons about (secrets masked) |
recommendation |
the command a human would run; never executed |
owner, team, env, tags
|
resolved from tags |
The id is a stable fingerprint of cloud, account, region, check and resource, so the same issue is tracked across scans.
new → open → acknowledged / suppressed → resolved
- A finding seen for the first time is new; seen again, open.
-
acknowledge_findingandsuppress_finding(with a reason) are recorded in the store, never in the cloud. - When a finding disappears from a scan it is resolved. A resolved cost savings finding adds its monthly estimate to savings captured.
For each reliability alert, the engine looks at changes from the providers (CloudTrail write events, Azure Activity Log, Kubernetes rollouts) inside the correlation window (default 120 minutes before the alert). Suspects are ranked by:
- Same service or resource as the alert
- Changes before the alert started, over changes after it
- Closest in time
Noise such as console sign-ins, CloudShell heartbeats and role assumptions is filtered out. Capacity forecasts (a disk slowly filling) get no suspects, because a slow trend isn't caused by one change.