This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Parse syslog file for logs (per hour) that match message | |
# Prior art: https://github.com/dabeaz/generators | |
from dateutil import parser | |
from collections import Counter | |
import re | |
logpats = r"(\S+ \d+ \d+:\d+:\d+) (\S+) (.*]:|.*]\):|.*\):) (.*)" | |
colnames = ("datetime", "host", "process", "message") | |
message = "Killed" |