Log Analysis and Diagnostic Data Gathering Questions

Extracting signal from existing logs and diagnostic output to find a root cause: parsing and querying log data, correlating traces and metrics during an investigation, and gathering the right diagnostic information (including asking clarifying questions) before drawing conclusions. Covers text-processing and query techniques for locating evidence in logs (structured log parsing, ElasticSearch/SQL-style log queries, log aggregation and retention trade-offs) and reconstructing a timeline from the data on hand. This is the analysis-of-existing-data skill used during troubleshooting and investigation across infrastructure and operations roles: distinct from monitoring and observability, which is about instrumenting a system so telemetry exists in the first place (see the observability topics for that), and distinct from SIEM-based security detection and formal digital-forensics practice (chain of custody, artifact/disk/memory analysis), which have their own dedicated coverage elsewhere in the catalog.

MediumTechnical
36 practiced

You're investigating an incident from three days ago, but journalctl on the affected host only shows the last several hours of logs. Walk through what could explain that gap (journald's own settings, disk pressure, a reboot) and how you'd confirm on the box which one actually happened here.

EasyTechnical
29 practiced

Given the following log line format: '2025-05-01T12:34:56Z level=error srv=payments request_id=abc123 user_id=42 msg="checkout failed" latency_ms=562', write a Python function that parses arbitrary lines conforming to this structure into a dictionary, handles missing keys gracefully, and converts numeric fields. Provide example input and expected output.

HardTechnical
31 practiced

Your log-processing pipeline needs to keep up with roughly 200k JSON log lines per second per host, and profiling shows the parsing step itself is the bottleneck, not disk or network I/O. Walk through how you'd diagnose where the time is actually going, what class of tooling you'd consider moving to if a scripting-language parser can't keep up, and how you'd benchmark candidate approaches before committing to a rewrite.

MediumTechnical
53 practiced

Compare different approaches to log aggregation and retention for forensic investigations at enterprise scale: self-hosted ELK, managed cloud logging, and cold object-store. Discuss trade-offs in cost, query latency, retention, compliance, and operational burden for each approach.

MediumTechnical
38 practiced

Write a Logstash/ELK grok pattern (or equivalent) for Nginx 'combined' access logs to extract client_ip, timestamp, method, path, protocol, status, bytes_sent, and user_agent. Explain how you'd handle query strings in path, percent-encoding, and very long user-agent strings to avoid mapping explosion in Elasticsearch.

Unlock Full Question Bank

Get access to all 28 Log Analysis and Diagnostic Data Gathering interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.