Viewing L7 load balancer logs
Written by
Updated at October 17, 2024
You can configure the delivery of L7 load balancer logs to a Yandex Cloud Logging log group.
To view logs of the L7 Load balancer:
Management console
- In the management console
, select the folder where the load balancer was created. - Select Application Load Balancer.
- Select the load balancer to view logs for.
- Go to the Logs tab.
- Select the number of messages per page and the period: 1 hour, 3 hours, 1 day, 1 week, or 2 weeks.
- To view full information about the message, click the arrow at the beginning of the row.
You can also view logs in Yandex Cloud Logging:
Management console
CLI
API
- In the management console
, select the folder containing your log group. - Select Cloud Logging.
- Select the log group the load balancer logs are sent to.
- Select the number of messages per page and the period: 1 hour, 3 hours, 1 day, 1 week, or 2 weeks.
- To view full information about the message, click the arrow at the beginning of the row.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To view the records in JSON format, run the command:
yc logging read \
--group-name=<log_group_name> \
--format=json
Where:
--group-name
: Name of the log group the load balancer logs are sent to.--format
: Log output format.
Result:
[
{
"uid": "488ece3c-75b8-4d35-95ac-2b49********",
"resource": {},
"timestamp": "2021-06-22T02:10:40Z",
"ingested_at": "2021-06-22T08:49:15.716Z",
"saved_at": "2021-06-22T08:49:16.176097Z",
"level": "INFO",
"message": "My message",
"json_payload": {
"request_id": "1234"
}
}
]
For more information on how to read logs using the CLI, see Reading records.
To view log group entries, use the LogReadingService/Read gRPC API call.