{
    "$schema": "https://lnav.org/schemas/format-v1.schema.json",
    "zookeeper_log": {
        "title": "ZooKeeper log format",
        "description": "Log format for the ZooKeeper coordination service",
        "regex": {
            "std": {
                "pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2},\\d{3}) \\[myid:(?<myid>\\d+)?\\] - (?<level>\\w+)\\s+\\[(?<thread>.*):(?<logger>[\\w\\.\\$]+)@(?<line_number>\\d+)\\] - (?<body>.*)"
            }
        },
        "value": {
            "thread": {
                "kind": "string",
                "identifier": true
            },
            "level": {
                "kind": "string"
            },
            "myid": {
                "kind": "integer",
                "identifier": true
            },
            "logger": {
                "kind": "string",
                "identifier": true
            },
            "line_number": {
                "kind": "integer",
                "foreign-key": true
            }
        },
        "search-table": {
            "zk_notifications": {
                "level": "info",
                "pattern": "Notification: my state:(?<my_state>\\w+); (?<nvalues>.*)"
            }
        },
        "sample": [
            {
                "line": "2024-04-23 09:24:31,484 [myid:] - INFO  [WorkerReceiver[myid=3]:o.a.z.s.q.FastLeaderElection$Messenger$WorkerReceiver@391] - Notification: my state:FOLLOWING; n.sid:1, n.state:LOOKING, n.leader:2, n.round:0x1, n.peerEpoch:0x1, n.zxid:0x100000057, message format version:0x2, n.config version:0x0"
            }
        ]
    }
}
