Correlate Infrastructure Alerts Into Incidents Using a Dependency Graph
Last updated: November 29, 2026
Quick Overview
Given timestamped alerts on configuration items and a list of dependency edges between items, group alerts into incidents where two alerts are linked if they are on the same or directly dependent items and fired within W seconds of each other, with linking applied transitively.
TCS
November 29, 20260
0
0 solved
Given timestamped alerts on configuration items and a list of dependency edges between items, group alerts into incidents where two alerts are linked if they are on the same or directly dependent items and fired within W seconds of each other, with linking applied transitively.
Alert noise reduction is central to ignio, TCS's AIOps platform, which groups related events across servers, databases and applications. The interviewer wants a near-linear solution, not an all-pairs comparison, and a clear argument for why the shortcut is still correct.
What the Interviewer Expects
- Model linking as union-find over alerts
- Process alerts in time order instead of comparing all pairs
- Justify unioning only with the latest alert per neighboring item
- Handle items with no edges and alerts outside the window
- State complexity in terms of alerts and node degree
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- How would you allow links across two hops of dependency with a longer window?
- How would you stream this and close an incident after inactivity?
- What changes if dependency edges are directed (only downstream causes upstream)?
- How would you pick a probable root-cause alert inside each incident?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Alerts are (id, ci, ts); edges are undirected pairs of CIs. Alerts a and b link if ci_a == ci_b or the CIs share an edge, and |ts_a - ts_b| <= W. Incidents are the connected components. Output e...
High-Level Design
Sort alerts by time. For each new alert, look at its own CI and each neighbor CI and union with the most recent earlier alert there if it is within W. This is enough: any older alert on that same CI w...