This is my submission for solving "Root cause analysis in a dynamic IP network"
Events are processed chronologically against a live topology model of the network.
LINK_DOWN events mutate the graph and score the affected link and node as candidates for the root cause.
NODE_UNREACHABLE events are checked against the current topology, and if the topology agrees, then it is categorised as a downstream symptom of the root cause.
Candidates are ranked by accumulated score and split into most likely causes, less likely causes, and observed downstream symptoms.
- Stable Rust toolchain from rustup
git clone https://github.com/th0jensen/rootcause
cd rootcause
cargo build --releaseThe program expects input files matching the spec. There's a collection of example files in the /examples directory.
./target/release/rootcause -i ./examples/input1.json -e ./examples/events1.jsonOptionally, without building first:
cargo run -- -i ./examples/input1.json -e ./examples/events1.jsonTo view usage in the terminal:
./target/release/rootcause --helprootcause/
├── examples/ # Example files
└── src/
├── main.rs # CLI and API orchestration
├── types.rs # Struct definitions for deserialization
├── network.rs # Network and Event processing
└── analysis.rs # Score aggregation and analysis
serdeandserde_json: JSON deserializationclap: CLI argument parsinganyhow: Unified error handlingjiff: Timestamp parsing and formatting