Field | Description | Example | Notes |
aliyun_logs_{key} | Required. {key} can contain only lowercase letters, digits, and hyphens (-). If the specified aliyun_logs_{key}_logstore does not exist, a Logstore named {key} is created. If the value is stdout, the standard output of the container is collected. Other values indicate the log path in the container.
| -
- name: aliyun_logs_catalina
value: stdout
-
- name: aliyun_logs_access-log
value: /var/log/nginx/access.log
| The default log collection mode is simple mode. If you want to parse log content, it is recommended to use the Simple Log Service console or configure it through CRD. {key} specifies the name of the Logtail configuration in Simple Log Service. The configuration name must be unique in the Kubernetes cluster.
|
aliyun_logs_{key}_tags | Optional. The value must be in the following format: {tag-key}={tag-value}. It is used to add tags to log data. |
- name: aliyun_logs_catalina_tags
value: app=catalina
| None |
aliyun_logs_{key}_project | Optional. The variable specifies a project in Simple Log Service. If this environment variable is not configured, the project that you specified when you installed the cluster is used. |
- name: aliyun_logs_catalina_project
value: my-k8s-project
| The project must be deployed in the same region as Logtail. |
aliyun_logs_{key}_logstore | Optional. The variable specifies a Logstore in Simple Log Service. If this environment variable is not configured, the Logstore is named {key}. |
- name: aliyun_logs_catalina_logstore
value: my-logstore
| None |
aliyun_logs_{key}_shard | Optional. The variable specifies the number of shards of the Logstore. Valid values: 1 to 10. If this environment variable is not configured, the default value is 2. Note If the Logstore that you specify already exists, this variable does not take effect. |
- name: aliyun_logs_catalina_shard
value: '4'
| None |
aliyun_logs_{key}_ttl | Optional. The variable specifies the log retention period. Valid values: 1 to 3650. To retain log data permanently, set the value to 3650. If this environment variable is not configured, the default retention period is 90 days.
Note If the Logstore that you specify already exists, this variable does not take effect. |
- name: aliyun_logs_catalina_ttl
value: '3650'
| None |
aliyun_logs_{key}_machinegroup | Optional. The variable specifies the node group in which the application is deployed. If this environment variable is not configured, the default node group is the one in which Logtail is deployed. For more information about this parameter, see Collect text logs of Alibaba Cloud ACK clusters (deploy Logtail in DaemonSet mode). |
- name: aliyun_logs_catalina_machinegroup
value: my-machine-group
| None |
aliyun_logs_{key}_logstoremode | Optional. The variable specifies the type of the Logstore in Simple Log Service. If this parameter is not specified, the default value is standard. Valid values: Note If the Logstore that you specify already exists, this variable does not take effect. standard: Supports one-stop data analysis features of Simple Log Service. Applicable to scenarios such as real-time monitoring, interactive analysis, and building a complete observability system. query: Supports high-performance queries. The index traffic cost is about half of that of standard, but SQL analysis is not supported. Applicable to scenarios with large data volumes, long storage periods (weeks or months), and no log analysis.
| -
- name: aliyun_logs_catalina_logstoremode
value: standard
-
- name: aliyun_logs_catalina_logstoremode
value: query
| None |