The log parser tool simplifies debugging errors by analyzing logs and summarizing different modules.

You can peruse this summary to determine the error zone and evaluate the root cause. In some instances, you can identify potential root cause zones without knowing the exact technical root cause.

Before the availability of the log parser tool, users manually examined logs from every Replica node to find the Replica node with the error.

The log parser tool contains the log parser agent and log parser appliance.

The log parser agent is a Docker container deployed on each blockchain node. The log parser agent sends the compressed logs to the log parser appliance at certain intervals. Log preprocessing is not performed at the agent level to avoid performance latency. The log parser agent retrieves logs from blockchain nodes and requires access to all the blockchain nodes.

The log parser appliance is deployed with the blockchain nodes. The log parser appliance container processes the logs at a certain interval and generates the log summary, which is grouped based on the time stamp. After the log summary is stored, the logs are removed to free up storage space.

The log parser tool can parse up to 800MB of compressed logs or 10GB of logs.

Note: You cannot enable or disable the log parser tool after deploying the blockchain nodes.

You cannot use the log parser tool for scaled up and down blockchain nodes.

Procedure

  • Run the log parser agent on all blockchain nodes to identify an error.
    sudo docker run -d --name log_parser_agent -v /var/lib/docker/containers:/logs -v config:/config log_parser_agent:<version>

    You can modify the /log_parser/log_parser_agent/config.json file to configure the appliance details such as the IP address or port and to update the frequency of log intervals.

  • Run the log parser appliance on all blockchain node VM to identify an error.
    sudo docker run -d --name log_parser_appliance -p <port>:<port> -v /var/lib/docker/containers:/logs -v config:/config log_parser_appliance:<version>

    You can modify the /log_parser/log_parser_appliance/config.json file to change the threshold size and frequency of log intervals. You can also configure whether the log cleanup is required or not.

What to do next

Analyze the logs to identify the error and proceed to troubleshoot the problem.