Hands-on task
What happened before the first error
There are two logs for the same morning: /var/log/ops.log — operations actions (TIME event), and /var/log/http.log — service responses (TIME CODE text). Find the last action in ops.log that happened before the first 5xx error in http.log and write its text (without the time) to /root/cause.txt.
- awk
- log correlation
- time comparison
- -v variable passing
- END block