Getting log group ID of an L7 load balancer
To get the ID of the Yandex Cloud Logging log group the L7 load balancer will send its logs to:
- In the management console
, select the folder where the load balancer was created. - Select Application Load Balancer.
- Click the name of the load balancer you need.
- Under Log settings, click the log group name in the Cloud Logging log group field.
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.
-
View the description of the CLI command to get information about a L7 load balancer:
yc alb load-balancer get --help
-
Run the command, specifying the name of the load balancer:
yc alb load-balancer get <load_balancer_name>
Result:
id: a5d88ep483cm******** name: test-balancer2 folder_id: aoe197919j8e******** status: ACTIVE region_id: ru-central1 network_id: c64l1c06d151******** allocation_policy: locations: - zone_id: ru-central1-a subnet_id: buc4gsmpj8hv******** log_group_id: eolul9ap0bv0******** created_at: "2021-04-26T12:12:13.624832586Z" log_options: log_group_id: e23ujjda632o********
The Cloud Logging log group ID will be specified in the
log_group_id
field underlog_options
. Note that thelog_group_id
field that follows thesubnet_id
field contains a different ID that refers to the outdated logging service.
Use the get REST API method for the LoadBalancer resource or the LoadBalancerService/Get gRPC API call.
The Cloud Logging log group ID will be specified in the logGroupId
field under logOptions
. Note that the logGroupId
field located outside logOptions
contains a different ID that refers to the outdated logging service.
If, when creating an L7 load balancer, you kept the Default log group value in the Cloud Logging log group field, do the following to find out its ID:
- In the management console
, go to the folder where the load balancer was created. - Select Cloud Logging.
- Save the ID of the log group named
default
.
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 get the ID of the default log group, run this command:
yc logging group get \
--name=default \
--folder-id=<folder_ID>
Where:
--name
: Name of the default log group, which isdefault
.--folder-id
: ID of the folder where the load balancer was created.
Result:
id: e23qfbb01na0********
folder_id: b1gvgqhc5745********
cloud_id: b1g3clmedscm********
created_at: "2021-08-07T10:40:55.412Z"
name: default
description: Auto-created default group