Getting a log group ID of an L7 load balancer
To get the ID of the Yandex Cloud Logging log group receiving logs from the L7 load balancer:
- In the management console
, select the folder the load balancer is in. - Select Application Load Balancer.
- Click your load balancer's name.
- Under Log settings, click the log group name in the Cloud Logging log group field.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
-
See the description of the CLI command to get information about an L7 load balancer:
yc alb load-balancer get --help -
Run this command with your load balancer name specified:
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********You will see the Cloud Logging log group ID in the
log_group_idfield underlog_options. Note that thelog_group_idfield following thesubnet_idfield contains a different ID referring to the outdated logging service.
Use the get REST API method for the LoadBalancer resource or the LoadBalancerService/Get gRPC API call.
You will see the Cloud Logging log group ID in the logGroupId field under logOptions. Note that the logGroupId field outside logOptions contains a different ID referring to the outdated logging service.
If you kept the Default log group value in the Cloud Logging log group field when creating an L7 load balancer, do the following to get its ID:
- In the management console
, navigate to the folder with your load balancer. - Select Cloud Logging.
- Save the
defaultlog group ID.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
To get the default log group ID, run this command:
yc logging group get \
--name=default \
--folder-id=<folder_ID>
Where:
--name: Default log group name, i.e.,default.--folder-id: ID of the folder with your load balancer.
Result:
id: e23qfbb01na0********
folder_id: b1gvgqhc5745********
cloud_id: b1g3clmedscm********
created_at: "2021-08-07T10:40:55.412Z"
name: default
description: Auto-created default group