Network Type | address |
Public Network | https:// ${region}.cls.tencentcs.com/prometheus/${topicId}/api/v1/write |
Private Network | https:// ${region}.cls.tencentyun.com/prometheus/${topicId}/api/v1/write |
${region} with the region where the metric topic is located, such as ap-beijing. For more region abbreviations, see Available Regions. Currently, only the regions of Beijing, Shanghai, Guangzhou, and Nanjing are supported.${topicId} with the metric topic ID, such as 0e69453c-0727-4c9c-xxxx-ea51b10d2aba. You can find the topic ID in the Metric Topic List.${SecretId}${SecretKey}{"version": "2.0","statement": [{"effect": "allow","action": ["cls:MetricsRemoteWrite"],"resource": ["*"]}]}
[[outputs.http]]## Reporting address: Replace ${region} and ${topicId}. This example uses the public network address; if network conditions allow, it is recommended to use the private network address.## Private network address URL = https://${region}.cls.tencentyun.com/prometheus/${topicId}/api/v1/writeurl = "https://${region}.cls.tencentcs.com/prometheus/${topicId}/api/v1/write"## Authentication information: Replace ${SecretId} and ${SecretKey}.username = "${SecretId}"password = "${SecretKey}"## Do not modify the Telegraf output data format configuration.data_format = "prometheusremotewrite"[outputs.http.headers]Content-Type = "application/x-protobuf"Content-Encoding = "snappy"X-Prometheus-Remote-Write-Version = "0.1.0"
./vmagent-prod \\-remoteWrite.url=https://${region}.cls.tencentcs.com/prometheus/${topicId}/api/v1/write \\-remoteWrite.basicAuth.username=${SecretId} \\-remoteWrite.basicAuth.password=${SecretKey}
https://${region}.cls.tencentyun.com/prometheus/${topicId}/api/v1/write.# Reporting address: Replace ${region} and ${topicId}. This example uses the public network address; if network conditions allow, it is recommended to use the private network address.# Private network address URL: https://${region}.cls.tencentyun.com/prometheus/${topicId}/api/v1/writeurl: https://${region}.cls.tencentcs.com/prometheus/${topicId}/api/v1/write# Authentication information: Replace ${SecretId} and ${SecretKey}.basic_auth:username: ${SecretId}password: ${SecretKey}# Data write policy: Including caching and retry mechanisms, the following configuration is recommended for handling large data volumes.queue_config:capacity: 20480min_shards: 100max_samples_per_send: 2048batch_send_deadline: 20smin_backoff: 100msmax_backoff: 5s
kubectl create secret generic kubepromsecret \\--from-literal=username=${SecretId} \\--from-literal=password=${SecretKey} \\-n monitoring
${SecretId} and ${SecretKey} in the command.-n monitoring to the correct namespace.kube-prometheus/manifests/prometheus-prometheus.yaml.remoteWrite:- url: "https://${region}.cls.tencentcs.com/prometheus/${topicId}/api/v1/write"basicAuth:username:name: kubepromsecretkey: usernamepassword:name: kubepromsecretkey: password
${region} and ${topicId} in the configuration. This example uses the public network address; if network conditions allow, it is recommended to use the private network address.URL: https://${region}.cls.tencentyun.com/prometheus/${topicId}/api/v1/writequeueConfig:capacity: 204800minShards: 100maxShards: 2048maxSamplesPerSend: 4096batchSendDeadline: 30sminBackoff: 100msmaxBackoff: 5s
kubectl apply -f prometheus-prometheus.yaml -n monitoring
prometheus-prometheus.yaml with the correct configuration file path.-n monitoring to the correct namespace.Feedback