Enable internal domain names in a VPC
Use SLS internal domain names (format: *-internal.log.aliyuncs.com) to access Simple Log Service over a VPC network without incurring network traffic fees. Internal domain names use a small, fixed range of IP addresses. For the IP address ranges, see VPC-specific internal domain names.
Benefits
-
No traffic fees: Internal domain names use the Alibaba Cloud internal network, so no network traffic fees apply.
-
Reliable: Traffic routes directly through the Alibaba Cloud internal network.
-
Predictable IP range: Internal domain names resolve to a small, fixed set of IP addresses, which provides the following benefits:
-
Reduces the risk of IP address conflicts when establishing dedicated connections in multi-cloud or hybrid cloud environments.
-
Simplifies firewall rule configuration.
-
Limits
Use internal domain names only with LoongCollector 3.0.12 or later.
Configure the client on a host
-
LoongCollector is not installed: The installer automatically detects and prioritizes internal domain names during installation. To force the use of an internal domain name, run
./loongcollector.sh install ${region_id}-internal. In environments that cannot access the OSS VPC domain name, such as an enterprise network connected to SLS only through a dedicated line, first complete the steps in How to upgrade LoongCollector when a server cannot access the internet, and then run./loongcollector.sh install-local ${region_id}-internal. -
LoongCollector is already installed: Enable an internal domain name by modifying the
/usr/local/ilogtail_config.jsonfile.-
Edit the configuration file as shown in the following examples. Replace
${region_id}with the actual region ID.-
Collector upgraded from Logtail to LoongCollector:
{ "config_server_address" : "http://logtail.${region_id}-internal.log.aliyuncs.com", "data_server_list" : [ { "cluster" : "${region_id}", "endpoint" : "${region_id}-internal.log.aliyuncs.com" } ] } -
LoongCollector installed directly:
{ "primary_region" : "${region_id}", "config_servers" : [ "http://logtail.${region_id}-internal.log.aliyuncs.com" ], "data_servers" : [ { "region" : "${region_id}", "endpoint_list": [ "${region_id}-internal.log.aliyuncs.com" ] } ] }
-
-
Restart LoongCollector by running
sudo /etc/init.d/loongcollectord restart.
-
Configure the client in a container
-
Log in to the Container Service for Kubernetes console. In the left-side navigation pane, choose Clusters.
-
Click the name of the target cluster, and then click Applications. In the list of applications, find LoongCollector and click Update in the Actions column.
-
In the configuration YAML, set the
netparameter toInternal, and then click OK. The changes take effect after all DaemonSet instances restart.image: repository: registry-cn-huhehaote-vpc.ack.aliyuncs.com/acs/loongcollector tag: v3.2.6.0-109e584-aliyun memLimitsMB: 2048 replicas: 1 net: Internal operator: admissionRegistration: failurePolicy: Ignore onlyLabel: false