published on Thursday, Apr 23, 2026 by Volcengine
published on Thursday, Apr 23, 2026 by Volcengine
The log service provides log collection tools such as LogCollector and multi-language SDKs, supports various log collection methods, is compatible with open-source protocol frameworks like Kafka and OpenTelemetry, and supports log data collection from host applications, K8s clusters, mobile clients, Volcano Engine cloud products, and other cloud vendors.
Example Usage
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
resources:
tLSRuleDemo:
type: volcenginecc:tls:Rule
name: TLSRuleDemo
properties:
containerRule:
container_name_regex: ccapi-test
env_tag:
- key: k1
val: v1
exclude_container_env_regex:
- key: k2
val: v2
exclude_container_label_regex:
- key: k2
val: v2
include_container_env_regex:
- key: k1
val: v1
include_container_label_regex:
- key: k1
val: v1
kubernetes_rule:
annotationTag:
- key: k1
val: v1
enableAllLabelTag: true
excludePodAnnotationRegex:
- key: k2
val: v2
excludePodLabelRegex:
- key: k2
val: v2
includePodAnnotationRegex:
- key: k1
val: v1
includePodLabelRegex:
- key: k1
val: v1
labelTag:
- key: k1
val: v1
namespaceNameRegex: ccapi
podNameRegex: ccapi
workloadNameRegex: ccapi
workloadType: Deployment
stream: ""
excludePaths:
- type: Path
value: /test
extractRule:
begin_regex: ""
delimiter: ' '
enable_nanosecond: true
filter_key_regex:
- key: k1
regex: v1
keys:
- k1
log_regex: ""
log_template:
format: ""
type: ""
quote: ""
time_extract_regex: dsfasdf
time_format: '%Y-%m-%d %H:%M:%S.%f'
time_key: time_key
time_sample: 2006-01-02T15:04:05Z07:00
time_zone: Etc/GMT+12
un_match_log_key: LogParseFailed
un_match_up_load_switch: true
hostGroupInfos:
- host_group_id: 38feb3b9-xxxxx-de52cxxxxx
inputType: 2
logSample: asdfasf
logType: delimiter_log
paths:
- /test
ruleName: dx-rule-1
topicId: b881e3cd-xxxxx-966f-fe98xxxxxxx
userDefineRule:
advanced:
closeEof: false
closeInactive: 10
closeRemoved: false
closeRenamed: false
closeTimeout: 0
noLineTerminatorEofMaxTime: 0
enable_host_group_label: true
enable_hostname: true
enable_raw_log: true
fields:
- key: k1
val: v1
host_group_label_key: host_group_label
hostname_key: hostname
ignore_older: 72
multi_collects_type: RuleID
parse_path_rule:
keys:
- instance-id
- pod-name
pathSample: /var/logs/instanceid_any_podname/test.log
regex: /var/logs/([a-z]*)_any_([a-z]*)/test.log
plugin:
processors: '{}'
raw_log_key: raw
shard_hash_key:
hashKey: '2342134'
tail_files: true
tail_size_kb: 10240
Create Rule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Rule(name: string, args: RuleArgs, opts?: CustomResourceOptions);@overload
def Rule(resource_name: str,
args: RuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Rule(resource_name: str,
opts: Optional[ResourceOptions] = None,
rule_name: Optional[str] = None,
topic_id: Optional[str] = None,
container_rule: Optional[RuleContainerRuleArgs] = None,
exclude_paths: Optional[Sequence[RuleExcludePathArgs]] = None,
extract_rule: Optional[RuleExtractRuleArgs] = None,
host_group_infos: Optional[Sequence[RuleHostGroupInfoArgs]] = None,
input_type: Optional[int] = None,
log_sample: Optional[str] = None,
log_type: Optional[str] = None,
paths: Optional[Sequence[str]] = None,
pause: Optional[int] = None,
user_define_rule: Optional[RuleUserDefineRuleArgs] = None)func NewRule(ctx *Context, name string, args RuleArgs, opts ...ResourceOption) (*Rule, error)public Rule(string name, RuleArgs args, CustomResourceOptions? opts = null)type: volcenginecc:tls:Rule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args RuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args RuleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Rule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Rule resource accepts the following input properties:
- Rule
Name string - Collection configuration name. Please refer to the resource naming rules. Must be unique within a log topic.
- Topic
Id string - Log topic ID to which the collection configuration belongs.
- Container
Rule Volcengine.Rule Container Rule - Container log collection rules.
- Exclude
Paths List<Volcengine.Rule Exclude Path> - Extract
Rule Volcengine.Rule Extract Rule - Log extraction rules. Note: This parameter is required if LogType is set to any type other than minimalistlog or jsonlog.
- Host
Group List<Volcengine.Infos Rule Host Group Info> - Input
Type int - Collection type. 0: (Default) Host log file. 1: K8s container stdout. 2: K8s container internal log file.
- Log
Sample string - Log sample. Maximum length is 3000 characters. Log sample content must match the collection mode. Single-line full-text mode and JSON mode do not require a log sample. Other modes require a log sample, and the content must match the collection mode.
- Log
Type string - Collection mode. minimalistlog: (Default) Single-line full-text mode. jsonlog: JSON mode. delimiterlog: Delimiter mode. multilinelog: Multi-line full-text mode. fullregex_log: Full regex mode.
- Paths List<string>
- Collection path list. You can create up to 10 collection paths. Collection paths must be specified as absolute paths; relative paths are not supported. When InputType=0 or InputType=2, collection paths support exact match and wildcard mode. Wildcards only support **, *, and ?, but you can configure at most one ** wildcard. When InputType=1, you do not need to configure the collection path list.
- Pause int
- Collection configuration status. 0: Running. 1: Paused.
- User
Define Volcengine.Rule Rule User Define Rule - User-defined collection rules.
- Rule
Name string - Collection configuration name. Please refer to the resource naming rules. Must be unique within a log topic.
- Topic
Id string - Log topic ID to which the collection configuration belongs.
- Container
Rule RuleContainer Rule Args - Container log collection rules.
- Exclude
Paths []RuleExclude Path Args - Extract
Rule RuleExtract Rule Args - Log extraction rules. Note: This parameter is required if LogType is set to any type other than minimalistlog or jsonlog.
- Host
Group []RuleInfos Host Group Info Args - Input
Type int - Collection type. 0: (Default) Host log file. 1: K8s container stdout. 2: K8s container internal log file.
- Log
Sample string - Log sample. Maximum length is 3000 characters. Log sample content must match the collection mode. Single-line full-text mode and JSON mode do not require a log sample. Other modes require a log sample, and the content must match the collection mode.
- Log
Type string - Collection mode. minimalistlog: (Default) Single-line full-text mode. jsonlog: JSON mode. delimiterlog: Delimiter mode. multilinelog: Multi-line full-text mode. fullregex_log: Full regex mode.
- Paths []string
- Collection path list. You can create up to 10 collection paths. Collection paths must be specified as absolute paths; relative paths are not supported. When InputType=0 or InputType=2, collection paths support exact match and wildcard mode. Wildcards only support **, *, and ?, but you can configure at most one ** wildcard. When InputType=1, you do not need to configure the collection path list.
- Pause int
- Collection configuration status. 0: Running. 1: Paused.
- User
Define RuleRule User Define Rule Args - User-defined collection rules.
- rule
Name String - Collection configuration name. Please refer to the resource naming rules. Must be unique within a log topic.
- topic
Id String - Log topic ID to which the collection configuration belongs.
- container
Rule RuleContainer Rule - Container log collection rules.
- exclude
Paths List<RuleExclude Path> - extract
Rule RuleExtract Rule - Log extraction rules. Note: This parameter is required if LogType is set to any type other than minimalistlog or jsonlog.
- host
Group List<RuleInfos Host Group Info> - input
Type Integer - Collection type. 0: (Default) Host log file. 1: K8s container stdout. 2: K8s container internal log file.
- log
Sample String - Log sample. Maximum length is 3000 characters. Log sample content must match the collection mode. Single-line full-text mode and JSON mode do not require a log sample. Other modes require a log sample, and the content must match the collection mode.
- log
Type String - Collection mode. minimalistlog: (Default) Single-line full-text mode. jsonlog: JSON mode. delimiterlog: Delimiter mode. multilinelog: Multi-line full-text mode. fullregex_log: Full regex mode.
- paths List<String>
- Collection path list. You can create up to 10 collection paths. Collection paths must be specified as absolute paths; relative paths are not supported. When InputType=0 or InputType=2, collection paths support exact match and wildcard mode. Wildcards only support **, *, and ?, but you can configure at most one ** wildcard. When InputType=1, you do not need to configure the collection path list.
- pause Integer
- Collection configuration status. 0: Running. 1: Paused.
- user
Define RuleRule User Define Rule - User-defined collection rules.
- rule
Name string - Collection configuration name. Please refer to the resource naming rules. Must be unique within a log topic.
- topic
Id string - Log topic ID to which the collection configuration belongs.
- container
Rule RuleContainer Rule - Container log collection rules.
- exclude
Paths RuleExclude Path[] - extract
Rule RuleExtract Rule - Log extraction rules. Note: This parameter is required if LogType is set to any type other than minimalistlog or jsonlog.
- host
Group RuleInfos Host Group Info[] - input
Type number - Collection type. 0: (Default) Host log file. 1: K8s container stdout. 2: K8s container internal log file.
- log
Sample string - Log sample. Maximum length is 3000 characters. Log sample content must match the collection mode. Single-line full-text mode and JSON mode do not require a log sample. Other modes require a log sample, and the content must match the collection mode.
- log
Type string - Collection mode. minimalistlog: (Default) Single-line full-text mode. jsonlog: JSON mode. delimiterlog: Delimiter mode. multilinelog: Multi-line full-text mode. fullregex_log: Full regex mode.
- paths string[]
- Collection path list. You can create up to 10 collection paths. Collection paths must be specified as absolute paths; relative paths are not supported. When InputType=0 or InputType=2, collection paths support exact match and wildcard mode. Wildcards only support **, *, and ?, but you can configure at most one ** wildcard. When InputType=1, you do not need to configure the collection path list.
- pause number
- Collection configuration status. 0: Running. 1: Paused.
- user
Define RuleRule User Define Rule - User-defined collection rules.
- rule_
name str - Collection configuration name. Please refer to the resource naming rules. Must be unique within a log topic.
- topic_
id str - Log topic ID to which the collection configuration belongs.
- container_
rule RuleContainer Rule Args - Container log collection rules.
- exclude_
paths Sequence[RuleExclude Path Args] - extract_
rule RuleExtract Rule Args - Log extraction rules. Note: This parameter is required if LogType is set to any type other than minimalistlog or jsonlog.
- host_
group_ Sequence[Ruleinfos Host Group Info Args] - input_
type int - Collection type. 0: (Default) Host log file. 1: K8s container stdout. 2: K8s container internal log file.
- log_
sample str - Log sample. Maximum length is 3000 characters. Log sample content must match the collection mode. Single-line full-text mode and JSON mode do not require a log sample. Other modes require a log sample, and the content must match the collection mode.
- log_
type str - Collection mode. minimalistlog: (Default) Single-line full-text mode. jsonlog: JSON mode. delimiterlog: Delimiter mode. multilinelog: Multi-line full-text mode. fullregex_log: Full regex mode.
- paths Sequence[str]
- Collection path list. You can create up to 10 collection paths. Collection paths must be specified as absolute paths; relative paths are not supported. When InputType=0 or InputType=2, collection paths support exact match and wildcard mode. Wildcards only support **, *, and ?, but you can configure at most one ** wildcard. When InputType=1, you do not need to configure the collection path list.
- pause int
- Collection configuration status. 0: Running. 1: Paused.
- user_
define_ Rulerule User Define Rule Args - User-defined collection rules.
- rule
Name String - Collection configuration name. Please refer to the resource naming rules. Must be unique within a log topic.
- topic
Id String - Log topic ID to which the collection configuration belongs.
- container
Rule Property Map - Container log collection rules.
- exclude
Paths List<Property Map> - extract
Rule Property Map - Log extraction rules. Note: This parameter is required if LogType is set to any type other than minimalistlog or jsonlog.
- host
Group List<Property Map>Infos - input
Type Number - Collection type. 0: (Default) Host log file. 1: K8s container stdout. 2: K8s container internal log file.
- log
Sample String - Log sample. Maximum length is 3000 characters. Log sample content must match the collection mode. Single-line full-text mode and JSON mode do not require a log sample. Other modes require a log sample, and the content must match the collection mode.
- log
Type String - Collection mode. minimalistlog: (Default) Single-line full-text mode. jsonlog: JSON mode. delimiterlog: Delimiter mode. multilinelog: Multi-line full-text mode. fullregex_log: Full regex mode.
- paths List<String>
- Collection path list. You can create up to 10 collection paths. Collection paths must be specified as absolute paths; relative paths are not supported. When InputType=0 or InputType=2, collection paths support exact match and wildcard mode. Wildcards only support **, *, and ?, but you can configure at most one ** wildcard. When InputType=1, you do not need to configure the collection path list.
- pause Number
- Collection configuration status. 0: Running. 1: Paused.
- user
Define Property MapRule - User-defined collection rules.
Outputs
All input properties are implicitly available as output properties. Additionally, the Rule resource produces the following output properties:
- Create
Time string - Time when the collection configuration was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modify
Time string - Collection configuration modification time.
- Project
Id string - ID of the project to which the collection configuration belongs.
- Project
Name string - Name of the project to which the collection configuration belongs
- Rule
Id string - Collection configuration ID.
- Topic
Name string - Name of the log topic to which the collection configuration belongs.
- Create
Time string - Time when the collection configuration was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modify
Time string - Collection configuration modification time.
- Project
Id string - ID of the project to which the collection configuration belongs.
- Project
Name string - Name of the project to which the collection configuration belongs
- Rule
Id string - Collection configuration ID.
- Topic
Name string - Name of the log topic to which the collection configuration belongs.
- create
Time String - Time when the collection configuration was created.
- id String
- The provider-assigned unique ID for this managed resource.
- modify
Time String - Collection configuration modification time.
- project
Id String - ID of the project to which the collection configuration belongs.
- project
Name String - Name of the project to which the collection configuration belongs
- rule
Id String - Collection configuration ID.
- topic
Name String - Name of the log topic to which the collection configuration belongs.
- create
Time string - Time when the collection configuration was created.
- id string
- The provider-assigned unique ID for this managed resource.
- modify
Time string - Collection configuration modification time.
- project
Id string - ID of the project to which the collection configuration belongs.
- project
Name string - Name of the project to which the collection configuration belongs
- rule
Id string - Collection configuration ID.
- topic
Name string - Name of the log topic to which the collection configuration belongs.
- create_
time str - Time when the collection configuration was created.
- id str
- The provider-assigned unique ID for this managed resource.
- modify_
time str - Collection configuration modification time.
- project_
id str - ID of the project to which the collection configuration belongs.
- project_
name str - Name of the project to which the collection configuration belongs
- rule_
id str - Collection configuration ID.
- topic_
name str - Name of the log topic to which the collection configuration belongs.
- create
Time String - Time when the collection configuration was created.
- id String
- The provider-assigned unique ID for this managed resource.
- modify
Time String - Collection configuration modification time.
- project
Id String - ID of the project to which the collection configuration belongs.
- project
Name String - Name of the project to which the collection configuration belongs
- rule
Id String - Collection configuration ID.
- topic
Name String - Name of the log topic to which the collection configuration belongs.
Look up Existing Rule Resource
Get an existing Rule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: RuleState, opts?: CustomResourceOptions): Rule@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
container_rule: Optional[RuleContainerRuleArgs] = None,
create_time: Optional[str] = None,
exclude_paths: Optional[Sequence[RuleExcludePathArgs]] = None,
extract_rule: Optional[RuleExtractRuleArgs] = None,
host_group_infos: Optional[Sequence[RuleHostGroupInfoArgs]] = None,
input_type: Optional[int] = None,
log_sample: Optional[str] = None,
log_type: Optional[str] = None,
modify_time: Optional[str] = None,
paths: Optional[Sequence[str]] = None,
pause: Optional[int] = None,
project_id: Optional[str] = None,
project_name: Optional[str] = None,
rule_id: Optional[str] = None,
rule_name: Optional[str] = None,
topic_id: Optional[str] = None,
topic_name: Optional[str] = None,
user_define_rule: Optional[RuleUserDefineRuleArgs] = None) -> Rulefunc GetRule(ctx *Context, name string, id IDInput, state *RuleState, opts ...ResourceOption) (*Rule, error)public static Rule Get(string name, Input<string> id, RuleState? state, CustomResourceOptions? opts = null)public static Rule get(String name, Output<String> id, RuleState state, CustomResourceOptions options)resources: _: type: volcenginecc:tls:Rule get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Container
Rule Volcengine.Rule Container Rule - Container log collection rules.
- Create
Time string - Time when the collection configuration was created.
- Exclude
Paths List<Volcengine.Rule Exclude Path> - Extract
Rule Volcengine.Rule Extract Rule - Log extraction rules. Note: This parameter is required if LogType is set to any type other than minimalistlog or jsonlog.
- Host
Group List<Volcengine.Infos Rule Host Group Info> - Input
Type int - Collection type. 0: (Default) Host log file. 1: K8s container stdout. 2: K8s container internal log file.
- Log
Sample string - Log sample. Maximum length is 3000 characters. Log sample content must match the collection mode. Single-line full-text mode and JSON mode do not require a log sample. Other modes require a log sample, and the content must match the collection mode.
- Log
Type string - Collection mode. minimalistlog: (Default) Single-line full-text mode. jsonlog: JSON mode. delimiterlog: Delimiter mode. multilinelog: Multi-line full-text mode. fullregex_log: Full regex mode.
- Modify
Time string - Collection configuration modification time.
- Paths List<string>
- Collection path list. You can create up to 10 collection paths. Collection paths must be specified as absolute paths; relative paths are not supported. When InputType=0 or InputType=2, collection paths support exact match and wildcard mode. Wildcards only support **, *, and ?, but you can configure at most one ** wildcard. When InputType=1, you do not need to configure the collection path list.
- Pause int
- Collection configuration status. 0: Running. 1: Paused.
- Project
Id string - ID of the project to which the collection configuration belongs.
- Project
Name string - Name of the project to which the collection configuration belongs
- Rule
Id string - Collection configuration ID.
- Rule
Name string - Collection configuration name. Please refer to the resource naming rules. Must be unique within a log topic.
- Topic
Id string - Log topic ID to which the collection configuration belongs.
- Topic
Name string - Name of the log topic to which the collection configuration belongs.
- User
Define Volcengine.Rule Rule User Define Rule - User-defined collection rules.
- Container
Rule RuleContainer Rule Args - Container log collection rules.
- Create
Time string - Time when the collection configuration was created.
- Exclude
Paths []RuleExclude Path Args - Extract
Rule RuleExtract Rule Args - Log extraction rules. Note: This parameter is required if LogType is set to any type other than minimalistlog or jsonlog.
- Host
Group []RuleInfos Host Group Info Args - Input
Type int - Collection type. 0: (Default) Host log file. 1: K8s container stdout. 2: K8s container internal log file.
- Log
Sample string - Log sample. Maximum length is 3000 characters. Log sample content must match the collection mode. Single-line full-text mode and JSON mode do not require a log sample. Other modes require a log sample, and the content must match the collection mode.
- Log
Type string - Collection mode. minimalistlog: (Default) Single-line full-text mode. jsonlog: JSON mode. delimiterlog: Delimiter mode. multilinelog: Multi-line full-text mode. fullregex_log: Full regex mode.
- Modify
Time string - Collection configuration modification time.
- Paths []string
- Collection path list. You can create up to 10 collection paths. Collection paths must be specified as absolute paths; relative paths are not supported. When InputType=0 or InputType=2, collection paths support exact match and wildcard mode. Wildcards only support **, *, and ?, but you can configure at most one ** wildcard. When InputType=1, you do not need to configure the collection path list.
- Pause int
- Collection configuration status. 0: Running. 1: Paused.
- Project
Id string - ID of the project to which the collection configuration belongs.
- Project
Name string - Name of the project to which the collection configuration belongs
- Rule
Id string - Collection configuration ID.
- Rule
Name string - Collection configuration name. Please refer to the resource naming rules. Must be unique within a log topic.
- Topic
Id string - Log topic ID to which the collection configuration belongs.
- Topic
Name string - Name of the log topic to which the collection configuration belongs.
- User
Define RuleRule User Define Rule Args - User-defined collection rules.
- container
Rule RuleContainer Rule - Container log collection rules.
- create
Time String - Time when the collection configuration was created.
- exclude
Paths List<RuleExclude Path> - extract
Rule RuleExtract Rule - Log extraction rules. Note: This parameter is required if LogType is set to any type other than minimalistlog or jsonlog.
- host
Group List<RuleInfos Host Group Info> - input
Type Integer - Collection type. 0: (Default) Host log file. 1: K8s container stdout. 2: K8s container internal log file.
- log
Sample String - Log sample. Maximum length is 3000 characters. Log sample content must match the collection mode. Single-line full-text mode and JSON mode do not require a log sample. Other modes require a log sample, and the content must match the collection mode.
- log
Type String - Collection mode. minimalistlog: (Default) Single-line full-text mode. jsonlog: JSON mode. delimiterlog: Delimiter mode. multilinelog: Multi-line full-text mode. fullregex_log: Full regex mode.
- modify
Time String - Collection configuration modification time.
- paths List<String>
- Collection path list. You can create up to 10 collection paths. Collection paths must be specified as absolute paths; relative paths are not supported. When InputType=0 or InputType=2, collection paths support exact match and wildcard mode. Wildcards only support **, *, and ?, but you can configure at most one ** wildcard. When InputType=1, you do not need to configure the collection path list.
- pause Integer
- Collection configuration status. 0: Running. 1: Paused.
- project
Id String - ID of the project to which the collection configuration belongs.
- project
Name String - Name of the project to which the collection configuration belongs
- rule
Id String - Collection configuration ID.
- rule
Name String - Collection configuration name. Please refer to the resource naming rules. Must be unique within a log topic.
- topic
Id String - Log topic ID to which the collection configuration belongs.
- topic
Name String - Name of the log topic to which the collection configuration belongs.
- user
Define RuleRule User Define Rule - User-defined collection rules.
- container
Rule RuleContainer Rule - Container log collection rules.
- create
Time string - Time when the collection configuration was created.
- exclude
Paths RuleExclude Path[] - extract
Rule RuleExtract Rule - Log extraction rules. Note: This parameter is required if LogType is set to any type other than minimalistlog or jsonlog.
- host
Group RuleInfos Host Group Info[] - input
Type number - Collection type. 0: (Default) Host log file. 1: K8s container stdout. 2: K8s container internal log file.
- log
Sample string - Log sample. Maximum length is 3000 characters. Log sample content must match the collection mode. Single-line full-text mode and JSON mode do not require a log sample. Other modes require a log sample, and the content must match the collection mode.
- log
Type string - Collection mode. minimalistlog: (Default) Single-line full-text mode. jsonlog: JSON mode. delimiterlog: Delimiter mode. multilinelog: Multi-line full-text mode. fullregex_log: Full regex mode.
- modify
Time string - Collection configuration modification time.
- paths string[]
- Collection path list. You can create up to 10 collection paths. Collection paths must be specified as absolute paths; relative paths are not supported. When InputType=0 or InputType=2, collection paths support exact match and wildcard mode. Wildcards only support **, *, and ?, but you can configure at most one ** wildcard. When InputType=1, you do not need to configure the collection path list.
- pause number
- Collection configuration status. 0: Running. 1: Paused.
- project
Id string - ID of the project to which the collection configuration belongs.
- project
Name string - Name of the project to which the collection configuration belongs
- rule
Id string - Collection configuration ID.
- rule
Name string - Collection configuration name. Please refer to the resource naming rules. Must be unique within a log topic.
- topic
Id string - Log topic ID to which the collection configuration belongs.
- topic
Name string - Name of the log topic to which the collection configuration belongs.
- user
Define RuleRule User Define Rule - User-defined collection rules.
- container_
rule RuleContainer Rule Args - Container log collection rules.
- create_
time str - Time when the collection configuration was created.
- exclude_
paths Sequence[RuleExclude Path Args] - extract_
rule RuleExtract Rule Args - Log extraction rules. Note: This parameter is required if LogType is set to any type other than minimalistlog or jsonlog.
- host_
group_ Sequence[Ruleinfos Host Group Info Args] - input_
type int - Collection type. 0: (Default) Host log file. 1: K8s container stdout. 2: K8s container internal log file.
- log_
sample str - Log sample. Maximum length is 3000 characters. Log sample content must match the collection mode. Single-line full-text mode and JSON mode do not require a log sample. Other modes require a log sample, and the content must match the collection mode.
- log_
type str - Collection mode. minimalistlog: (Default) Single-line full-text mode. jsonlog: JSON mode. delimiterlog: Delimiter mode. multilinelog: Multi-line full-text mode. fullregex_log: Full regex mode.
- modify_
time str - Collection configuration modification time.
- paths Sequence[str]
- Collection path list. You can create up to 10 collection paths. Collection paths must be specified as absolute paths; relative paths are not supported. When InputType=0 or InputType=2, collection paths support exact match and wildcard mode. Wildcards only support **, *, and ?, but you can configure at most one ** wildcard. When InputType=1, you do not need to configure the collection path list.
- pause int
- Collection configuration status. 0: Running. 1: Paused.
- project_
id str - ID of the project to which the collection configuration belongs.
- project_
name str - Name of the project to which the collection configuration belongs
- rule_
id str - Collection configuration ID.
- rule_
name str - Collection configuration name. Please refer to the resource naming rules. Must be unique within a log topic.
- topic_
id str - Log topic ID to which the collection configuration belongs.
- topic_
name str - Name of the log topic to which the collection configuration belongs.
- user_
define_ Rulerule User Define Rule Args - User-defined collection rules.
- container
Rule Property Map - Container log collection rules.
- create
Time String - Time when the collection configuration was created.
- exclude
Paths List<Property Map> - extract
Rule Property Map - Log extraction rules. Note: This parameter is required if LogType is set to any type other than minimalistlog or jsonlog.
- host
Group List<Property Map>Infos - input
Type Number - Collection type. 0: (Default) Host log file. 1: K8s container stdout. 2: K8s container internal log file.
- log
Sample String - Log sample. Maximum length is 3000 characters. Log sample content must match the collection mode. Single-line full-text mode and JSON mode do not require a log sample. Other modes require a log sample, and the content must match the collection mode.
- log
Type String - Collection mode. minimalistlog: (Default) Single-line full-text mode. jsonlog: JSON mode. delimiterlog: Delimiter mode. multilinelog: Multi-line full-text mode. fullregex_log: Full regex mode.
- modify
Time String - Collection configuration modification time.
- paths List<String>
- Collection path list. You can create up to 10 collection paths. Collection paths must be specified as absolute paths; relative paths are not supported. When InputType=0 or InputType=2, collection paths support exact match and wildcard mode. Wildcards only support **, *, and ?, but you can configure at most one ** wildcard. When InputType=1, you do not need to configure the collection path list.
- pause Number
- Collection configuration status. 0: Running. 1: Paused.
- project
Id String - ID of the project to which the collection configuration belongs.
- project
Name String - Name of the project to which the collection configuration belongs
- rule
Id String - Collection configuration ID.
- rule
Name String - Collection configuration name. Please refer to the resource naming rules. Must be unique within a log topic.
- topic
Id String - Log topic ID to which the collection configuration belongs.
- topic
Name String - Name of the log topic to which the collection configuration belongs.
- user
Define Property MapRule - User-defined collection rules.
Supporting Types
RuleContainerRule, RuleContainerRuleArgs
- Container
Name stringRegex - Container name to collect. If no container name is specified, all containers in the machine group will be collected. Supports regex matching; for example, setting the container name to ^(container-test)$ will collect all containers named container-test.
-
List<Volcengine.
Rule Container Rule Env Tag> - Exclude
Container List<Volcengine.Env Regexes Rule Container Rule Exclude Container Env Regex> - Exclude
Container List<Volcengine.Label Regexes Rule Container Rule Exclude Container Label Regex> - Include
Container List<Volcengine.Env Regexes Rule Container Rule Include Container Env Regex> - Include
Container List<Volcengine.Label Regexes Rule Container Rule Include Container Label Regex> - Kubernetes
Rule Volcengine.Rule Container Rule Kubernetes Rule - Kubernetes container collection rules.
- Stream string
- Collection information. stdout: Collects container standard output (stdout). stderr: Collects container standard error (stderr). all: Collects both container standard output (stdout) and standard error (stderr).
- Container
Name stringRegex - Container name to collect. If no container name is specified, all containers in the machine group will be collected. Supports regex matching; for example, setting the container name to ^(container-test)$ will collect all containers named container-test.
-
[]Rule
Container Rule Env Tag - Exclude
Container []RuleEnv Regexes Container Rule Exclude Container Env Regex - Exclude
Container []RuleLabel Regexes Container Rule Exclude Container Label Regex - Include
Container []RuleEnv Regexes Container Rule Include Container Env Regex - Include
Container []RuleLabel Regexes Container Rule Include Container Label Regex - Kubernetes
Rule RuleContainer Rule Kubernetes Rule - Kubernetes container collection rules.
- Stream string
- Collection information. stdout: Collects container standard output (stdout). stderr: Collects container standard error (stderr). all: Collects both container standard output (stdout) and standard error (stderr).
- container
Name StringRegex - Container name to collect. If no container name is specified, all containers in the machine group will be collected. Supports regex matching; for example, setting the container name to ^(container-test)$ will collect all containers named container-test.
-
List<Rule
Container Rule Env Tag> - exclude
Container List<RuleEnv Regexes Container Rule Exclude Container Env Regex> - exclude
Container List<RuleLabel Regexes Container Rule Exclude Container Label Regex> - include
Container List<RuleEnv Regexes Container Rule Include Container Env Regex> - include
Container List<RuleLabel Regexes Container Rule Include Container Label Regex> - kubernetes
Rule RuleContainer Rule Kubernetes Rule - Kubernetes container collection rules.
- stream String
- Collection information. stdout: Collects container standard output (stdout). stderr: Collects container standard error (stderr). all: Collects both container standard output (stdout) and standard error (stderr).
- container
Name stringRegex - Container name to collect. If no container name is specified, all containers in the machine group will be collected. Supports regex matching; for example, setting the container name to ^(container-test)$ will collect all containers named container-test.
-
Rule
Container Rule Env Tag[] - exclude
Container RuleEnv Regexes Container Rule Exclude Container Env Regex[] - exclude
Container RuleLabel Regexes Container Rule Exclude Container Label Regex[] - include
Container RuleEnv Regexes Container Rule Include Container Env Regex[] - include
Container RuleLabel Regexes Container Rule Include Container Label Regex[] - kubernetes
Rule RuleContainer Rule Kubernetes Rule - Kubernetes container collection rules.
- stream string
- Collection information. stdout: Collects container standard output (stdout). stderr: Collects container standard error (stderr). all: Collects both container standard output (stdout) and standard error (stderr).
- container_
name_ strregex - Container name to collect. If no container name is specified, all containers in the machine group will be collected. Supports regex matching; for example, setting the container name to ^(container-test)$ will collect all containers named container-test.
-
Sequence[Rule
Container Rule Env Tag] - exclude_
container_ Sequence[Ruleenv_ regexes Container Rule Exclude Container Env Regex] - exclude_
container_ Sequence[Rulelabel_ regexes Container Rule Exclude Container Label Regex] - include_
container_ Sequence[Ruleenv_ regexes Container Rule Include Container Env Regex] - include_
container_ Sequence[Rulelabel_ regexes Container Rule Include Container Label Regex] - kubernetes_
rule RuleContainer Rule Kubernetes Rule - Kubernetes container collection rules.
- stream str
- Collection information. stdout: Collects container standard output (stdout). stderr: Collects container standard error (stderr). all: Collects both container standard output (stdout) and standard error (stderr).
- container
Name StringRegex - Container name to collect. If no container name is specified, all containers in the machine group will be collected. Supports regex matching; for example, setting the container name to ^(container-test)$ will collect all containers named container-test.
- List<Property Map>
- exclude
Container List<Property Map>Env Regexes - exclude
Container List<Property Map>Label Regexes - include
Container List<Property Map>Env Regexes - include
Container List<Property Map>Label Regexes - kubernetes
Rule Property Map - Kubernetes container collection rules.
- stream String
- Collection information. stdout: Collects container standard output (stdout). stderr: Collects container standard error (stderr). all: Collects both container standard output (stdout) and standard error (stderr).
RuleContainerRuleEnvTag, RuleContainerRuleEnvTagArgs
RuleContainerRuleExcludeContainerEnvRegex, RuleContainerRuleExcludeContainerEnvRegexArgs
RuleContainerRuleExcludeContainerLabelRegex, RuleContainerRuleExcludeContainerLabelRegexArgs
RuleContainerRuleIncludeContainerEnvRegex, RuleContainerRuleIncludeContainerEnvRegexArgs
RuleContainerRuleIncludeContainerLabelRegex, RuleContainerRuleIncludeContainerLabelRegexArgs
RuleContainerRuleKubernetesRule, RuleContainerRuleKubernetesRuleArgs
-
List<Volcengine.
Rule Container Rule Kubernetes Rule Annotation Tag> - Enable
All boolLabel Tag - Whether to add all Kubernetes Labels as log tags to the original log data. When enabled, the log service adds fields for all Labels in the Kubernetes Pod to the logs. For example, if the Pod contains Label source=DC and destination=CS, the logs will include fields tagsource__: DC and **tag**destination__: CS.
- Exclude
Pod List<Volcengine.Annotation Regexes Rule Container Rule Kubernetes Rule Exclude Pod Annotation Regex> - Exclude
Pod List<Volcengine.Label Regexes Rule Container Rule Kubernetes Rule Exclude Pod Label Regex> - Include
Pod List<Volcengine.Annotation Regexes Rule Container Rule Kubernetes Rule Include Pod Annotation Regex> - Include
Pod List<Volcengine.Label Regexes Rule Container Rule Kubernetes Rule Include Pod Label Regex> -
List<Volcengine.
Rule Container Rule Kubernetes Rule Label Tag> - Namespace
Name stringRegex - Name of the Kubernetes Namespace to collect. If no Namespace name is specified, all containers will be collected. Namespace names support regular expression matching. For example, if you set the Namespace name to ^(tcp|udp)$, it will collect all containers under the tcp and udp namespaces.
- Pod
Name stringRegex - Pod name is used to specify the Pod whose containers will be collected. If no Pod name is specified, all containers will be collected. Pod name supports regular expression matching. For example, setting the Pod name to ^(http.*)$ collects all containers under Pods whose names start with http.
- Workload
Name stringRegex - Specify the container to collect by workload name. If no workload name is specified, all containers are collected. Workload names support regular expressions. For example, setting the workload name to ^(http.*)$ collects all containers under workloads starting with http.
- Workload
Type string - Specify the container to collect by workload type. Only one type can be selected. If no type is specified, containers of all types will be collected. Supported workload types: Deployment: stateless workload StatefulSet: stateful workload DaemonSet: daemon process Job: task CronJob: scheduled task
-
[]Rule
Container Rule Kubernetes Rule Annotation Tag - Enable
All boolLabel Tag - Whether to add all Kubernetes Labels as log tags to the original log data. When enabled, the log service adds fields for all Labels in the Kubernetes Pod to the logs. For example, if the Pod contains Label source=DC and destination=CS, the logs will include fields tagsource__: DC and **tag**destination__: CS.
- Exclude
Pod []RuleAnnotation Regexes Container Rule Kubernetes Rule Exclude Pod Annotation Regex - Exclude
Pod []RuleLabel Regexes Container Rule Kubernetes Rule Exclude Pod Label Regex - Include
Pod []RuleAnnotation Regexes Container Rule Kubernetes Rule Include Pod Annotation Regex - Include
Pod []RuleLabel Regexes Container Rule Kubernetes Rule Include Pod Label Regex -
[]Rule
Container Rule Kubernetes Rule Label Tag - Namespace
Name stringRegex - Name of the Kubernetes Namespace to collect. If no Namespace name is specified, all containers will be collected. Namespace names support regular expression matching. For example, if you set the Namespace name to ^(tcp|udp)$, it will collect all containers under the tcp and udp namespaces.
- Pod
Name stringRegex - Pod name is used to specify the Pod whose containers will be collected. If no Pod name is specified, all containers will be collected. Pod name supports regular expression matching. For example, setting the Pod name to ^(http.*)$ collects all containers under Pods whose names start with http.
- Workload
Name stringRegex - Specify the container to collect by workload name. If no workload name is specified, all containers are collected. Workload names support regular expressions. For example, setting the workload name to ^(http.*)$ collects all containers under workloads starting with http.
- Workload
Type string - Specify the container to collect by workload type. Only one type can be selected. If no type is specified, containers of all types will be collected. Supported workload types: Deployment: stateless workload StatefulSet: stateful workload DaemonSet: daemon process Job: task CronJob: scheduled task
-
List<Rule
Container Rule Kubernetes Rule Annotation Tag> - enable
All BooleanLabel Tag - Whether to add all Kubernetes Labels as log tags to the original log data. When enabled, the log service adds fields for all Labels in the Kubernetes Pod to the logs. For example, if the Pod contains Label source=DC and destination=CS, the logs will include fields tagsource__: DC and **tag**destination__: CS.
- exclude
Pod List<RuleAnnotation Regexes Container Rule Kubernetes Rule Exclude Pod Annotation Regex> - exclude
Pod List<RuleLabel Regexes Container Rule Kubernetes Rule Exclude Pod Label Regex> - include
Pod List<RuleAnnotation Regexes Container Rule Kubernetes Rule Include Pod Annotation Regex> - include
Pod List<RuleLabel Regexes Container Rule Kubernetes Rule Include Pod Label Regex> -
List<Rule
Container Rule Kubernetes Rule Label Tag> - namespace
Name StringRegex - Name of the Kubernetes Namespace to collect. If no Namespace name is specified, all containers will be collected. Namespace names support regular expression matching. For example, if you set the Namespace name to ^(tcp|udp)$, it will collect all containers under the tcp and udp namespaces.
- pod
Name StringRegex - Pod name is used to specify the Pod whose containers will be collected. If no Pod name is specified, all containers will be collected. Pod name supports regular expression matching. For example, setting the Pod name to ^(http.*)$ collects all containers under Pods whose names start with http.
- workload
Name StringRegex - Specify the container to collect by workload name. If no workload name is specified, all containers are collected. Workload names support regular expressions. For example, setting the workload name to ^(http.*)$ collects all containers under workloads starting with http.
- workload
Type String - Specify the container to collect by workload type. Only one type can be selected. If no type is specified, containers of all types will be collected. Supported workload types: Deployment: stateless workload StatefulSet: stateful workload DaemonSet: daemon process Job: task CronJob: scheduled task
-
Rule
Container Rule Kubernetes Rule Annotation Tag[] - enable
All booleanLabel Tag - Whether to add all Kubernetes Labels as log tags to the original log data. When enabled, the log service adds fields for all Labels in the Kubernetes Pod to the logs. For example, if the Pod contains Label source=DC and destination=CS, the logs will include fields tagsource__: DC and **tag**destination__: CS.
- exclude
Pod RuleAnnotation Regexes Container Rule Kubernetes Rule Exclude Pod Annotation Regex[] - exclude
Pod RuleLabel Regexes Container Rule Kubernetes Rule Exclude Pod Label Regex[] - include
Pod RuleAnnotation Regexes Container Rule Kubernetes Rule Include Pod Annotation Regex[] - include
Pod RuleLabel Regexes Container Rule Kubernetes Rule Include Pod Label Regex[] -
Rule
Container Rule Kubernetes Rule Label Tag[] - namespace
Name stringRegex - Name of the Kubernetes Namespace to collect. If no Namespace name is specified, all containers will be collected. Namespace names support regular expression matching. For example, if you set the Namespace name to ^(tcp|udp)$, it will collect all containers under the tcp and udp namespaces.
- pod
Name stringRegex - Pod name is used to specify the Pod whose containers will be collected. If no Pod name is specified, all containers will be collected. Pod name supports regular expression matching. For example, setting the Pod name to ^(http.*)$ collects all containers under Pods whose names start with http.
- workload
Name stringRegex - Specify the container to collect by workload name. If no workload name is specified, all containers are collected. Workload names support regular expressions. For example, setting the workload name to ^(http.*)$ collects all containers under workloads starting with http.
- workload
Type string - Specify the container to collect by workload type. Only one type can be selected. If no type is specified, containers of all types will be collected. Supported workload types: Deployment: stateless workload StatefulSet: stateful workload DaemonSet: daemon process Job: task CronJob: scheduled task
-
Sequence[Rule
Container Rule Kubernetes Rule Annotation Tag] - enable_
all_ boollabel_ tag - Whether to add all Kubernetes Labels as log tags to the original log data. When enabled, the log service adds fields for all Labels in the Kubernetes Pod to the logs. For example, if the Pod contains Label source=DC and destination=CS, the logs will include fields tagsource__: DC and **tag**destination__: CS.
- exclude_
pod_ Sequence[Ruleannotation_ regexes Container Rule Kubernetes Rule Exclude Pod Annotation Regex] - exclude_
pod_ Sequence[Rulelabel_ regexes Container Rule Kubernetes Rule Exclude Pod Label Regex] - include_
pod_ Sequence[Ruleannotation_ regexes Container Rule Kubernetes Rule Include Pod Annotation Regex] - include_
pod_ Sequence[Rulelabel_ regexes Container Rule Kubernetes Rule Include Pod Label Regex] -
Sequence[Rule
Container Rule Kubernetes Rule Label Tag] - namespace_
name_ strregex - Name of the Kubernetes Namespace to collect. If no Namespace name is specified, all containers will be collected. Namespace names support regular expression matching. For example, if you set the Namespace name to ^(tcp|udp)$, it will collect all containers under the tcp and udp namespaces.
- pod_
name_ strregex - Pod name is used to specify the Pod whose containers will be collected. If no Pod name is specified, all containers will be collected. Pod name supports regular expression matching. For example, setting the Pod name to ^(http.*)$ collects all containers under Pods whose names start with http.
- workload_
name_ strregex - Specify the container to collect by workload name. If no workload name is specified, all containers are collected. Workload names support regular expressions. For example, setting the workload name to ^(http.*)$ collects all containers under workloads starting with http.
- workload_
type str - Specify the container to collect by workload type. Only one type can be selected. If no type is specified, containers of all types will be collected. Supported workload types: Deployment: stateless workload StatefulSet: stateful workload DaemonSet: daemon process Job: task CronJob: scheduled task
- List<Property Map>
- enable
All BooleanLabel Tag - Whether to add all Kubernetes Labels as log tags to the original log data. When enabled, the log service adds fields for all Labels in the Kubernetes Pod to the logs. For example, if the Pod contains Label source=DC and destination=CS, the logs will include fields tagsource__: DC and **tag**destination__: CS.
- exclude
Pod List<Property Map>Annotation Regexes - exclude
Pod List<Property Map>Label Regexes - include
Pod List<Property Map>Annotation Regexes - include
Pod List<Property Map>Label Regexes - List<Property Map>
- namespace
Name StringRegex - Name of the Kubernetes Namespace to collect. If no Namespace name is specified, all containers will be collected. Namespace names support regular expression matching. For example, if you set the Namespace name to ^(tcp|udp)$, it will collect all containers under the tcp and udp namespaces.
- pod
Name StringRegex - Pod name is used to specify the Pod whose containers will be collected. If no Pod name is specified, all containers will be collected. Pod name supports regular expression matching. For example, setting the Pod name to ^(http.*)$ collects all containers under Pods whose names start with http.
- workload
Name StringRegex - Specify the container to collect by workload name. If no workload name is specified, all containers are collected. Workload names support regular expressions. For example, setting the workload name to ^(http.*)$ collects all containers under workloads starting with http.
- workload
Type String - Specify the container to collect by workload type. Only one type can be selected. If no type is specified, containers of all types will be collected. Supported workload types: Deployment: stateless workload StatefulSet: stateful workload DaemonSet: daemon process Job: task CronJob: scheduled task
RuleContainerRuleKubernetesRuleAnnotationTag, RuleContainerRuleKubernetesRuleAnnotationTagArgs
RuleContainerRuleKubernetesRuleExcludePodAnnotationRegex, RuleContainerRuleKubernetesRuleExcludePodAnnotationRegexArgs
RuleContainerRuleKubernetesRuleExcludePodLabelRegex, RuleContainerRuleKubernetesRuleExcludePodLabelRegexArgs
RuleContainerRuleKubernetesRuleIncludePodAnnotationRegex, RuleContainerRuleKubernetesRuleIncludePodAnnotationRegexArgs
RuleContainerRuleKubernetesRuleIncludePodLabelRegex, RuleContainerRuleKubernetesRuleIncludePodLabelRegexArgs
RuleContainerRuleKubernetesRuleLabelTag, RuleContainerRuleKubernetesRuleLabelTagArgs
RuleExcludePath, RuleExcludePathArgs
RuleExtractRule, RuleExtractRuleArgs
- Begin
Regex string - Regular expression that the first line of the log must match. Valid only when LogType is multilinelog or fullregexlog. Must be a valid regular expression.
- Delimiter string
- Log delimiter. Valid only when LogType is delimiter_log.
- Enable
Nanosecond bool - Enable nanosecond precision time. When enabled, log time parsing will include and report nanosecond precision. true: Enable nanosecond precision time. false: Disable nanosecond precision time.
- Filter
Key List<Volcengine.Regexes Rule Extract Rule Filter Key Regex> - Keys List<string>
- List of log field names (Key). This is only valid when LogType is delimiterlog or fullregexlog. You can configure up to 100 field names. When LogType is delimiterlog, field names must be unique and cannot all be empty. When LogType is fullregexlog, field names must be unique and cannot be empty.
- Log
Regex string - The entire log must match the specified regular expression. This is only valid when the collected log type is fullregex_log. Must be a valid regular expression.
- Log
Template Volcengine.Rule Extract Rule Log Template - Automatically extract log fields based on the specified log template
- Quote string
- Quoting character. Content wrapped by a quoting character will not be split but parsed as a complete field. Only valid when LogType is delimiter_log.
- Time
Extract stringRegex - Regular expression for extracting time, used to extract the time value from the TimeKey field and parse it as the collection time
- Time
Format string - Parsing format for the time field. If you use a specific time field in the log as the log timestamp, you must provide both TimeKey and TimeFormat. TimeKey and TimeFormat must be used together.
- Time
Key string - Name of the log time field. If you want to use a specific time field in the log as the log timestamp, you need to specify both TimeKey and TimeFormat. TimeKey and TimeFormat must be provided together.
- Time
Sample string - Time sample. Used to check whether the entered time parsing format is correct.
- Time
Zone string - Time zone. Supports machine time zone (default) and custom time zone. Custom time zone supports GMT and UTC. GMT format: GMT+08:00. UTC format: Asia/Shanghai.
- Un
Match stringLog Key - Key name for unmatched logs.
- Un
Match boolUp Load Switch - Switch for uploading unmatched logs.
- Begin
Regex string - Regular expression that the first line of the log must match. Valid only when LogType is multilinelog or fullregexlog. Must be a valid regular expression.
- Delimiter string
- Log delimiter. Valid only when LogType is delimiter_log.
- Enable
Nanosecond bool - Enable nanosecond precision time. When enabled, log time parsing will include and report nanosecond precision. true: Enable nanosecond precision time. false: Disable nanosecond precision time.
- Filter
Key []RuleRegexes Extract Rule Filter Key Regex - Keys []string
- List of log field names (Key). This is only valid when LogType is delimiterlog or fullregexlog. You can configure up to 100 field names. When LogType is delimiterlog, field names must be unique and cannot all be empty. When LogType is fullregexlog, field names must be unique and cannot be empty.
- Log
Regex string - The entire log must match the specified regular expression. This is only valid when the collected log type is fullregex_log. Must be a valid regular expression.
- Log
Template RuleExtract Rule Log Template - Automatically extract log fields based on the specified log template
- Quote string
- Quoting character. Content wrapped by a quoting character will not be split but parsed as a complete field. Only valid when LogType is delimiter_log.
- Time
Extract stringRegex - Regular expression for extracting time, used to extract the time value from the TimeKey field and parse it as the collection time
- Time
Format string - Parsing format for the time field. If you use a specific time field in the log as the log timestamp, you must provide both TimeKey and TimeFormat. TimeKey and TimeFormat must be used together.
- Time
Key string - Name of the log time field. If you want to use a specific time field in the log as the log timestamp, you need to specify both TimeKey and TimeFormat. TimeKey and TimeFormat must be provided together.
- Time
Sample string - Time sample. Used to check whether the entered time parsing format is correct.
- Time
Zone string - Time zone. Supports machine time zone (default) and custom time zone. Custom time zone supports GMT and UTC. GMT format: GMT+08:00. UTC format: Asia/Shanghai.
- Un
Match stringLog Key - Key name for unmatched logs.
- Un
Match boolUp Load Switch - Switch for uploading unmatched logs.
- begin
Regex String - Regular expression that the first line of the log must match. Valid only when LogType is multilinelog or fullregexlog. Must be a valid regular expression.
- delimiter String
- Log delimiter. Valid only when LogType is delimiter_log.
- enable
Nanosecond Boolean - Enable nanosecond precision time. When enabled, log time parsing will include and report nanosecond precision. true: Enable nanosecond precision time. false: Disable nanosecond precision time.
- filter
Key List<RuleRegexes Extract Rule Filter Key Regex> - keys List<String>
- List of log field names (Key). This is only valid when LogType is delimiterlog or fullregexlog. You can configure up to 100 field names. When LogType is delimiterlog, field names must be unique and cannot all be empty. When LogType is fullregexlog, field names must be unique and cannot be empty.
- log
Regex String - The entire log must match the specified regular expression. This is only valid when the collected log type is fullregex_log. Must be a valid regular expression.
- log
Template RuleExtract Rule Log Template - Automatically extract log fields based on the specified log template
- quote String
- Quoting character. Content wrapped by a quoting character will not be split but parsed as a complete field. Only valid when LogType is delimiter_log.
- time
Extract StringRegex - Regular expression for extracting time, used to extract the time value from the TimeKey field and parse it as the collection time
- time
Format String - Parsing format for the time field. If you use a specific time field in the log as the log timestamp, you must provide both TimeKey and TimeFormat. TimeKey and TimeFormat must be used together.
- time
Key String - Name of the log time field. If you want to use a specific time field in the log as the log timestamp, you need to specify both TimeKey and TimeFormat. TimeKey and TimeFormat must be provided together.
- time
Sample String - Time sample. Used to check whether the entered time parsing format is correct.
- time
Zone String - Time zone. Supports machine time zone (default) and custom time zone. Custom time zone supports GMT and UTC. GMT format: GMT+08:00. UTC format: Asia/Shanghai.
- un
Match StringLog Key - Key name for unmatched logs.
- un
Match BooleanUp Load Switch - Switch for uploading unmatched logs.
- begin
Regex string - Regular expression that the first line of the log must match. Valid only when LogType is multilinelog or fullregexlog. Must be a valid regular expression.
- delimiter string
- Log delimiter. Valid only when LogType is delimiter_log.
- enable
Nanosecond boolean - Enable nanosecond precision time. When enabled, log time parsing will include and report nanosecond precision. true: Enable nanosecond precision time. false: Disable nanosecond precision time.
- filter
Key RuleRegexes Extract Rule Filter Key Regex[] - keys string[]
- List of log field names (Key). This is only valid when LogType is delimiterlog or fullregexlog. You can configure up to 100 field names. When LogType is delimiterlog, field names must be unique and cannot all be empty. When LogType is fullregexlog, field names must be unique and cannot be empty.
- log
Regex string - The entire log must match the specified regular expression. This is only valid when the collected log type is fullregex_log. Must be a valid regular expression.
- log
Template RuleExtract Rule Log Template - Automatically extract log fields based on the specified log template
- quote string
- Quoting character. Content wrapped by a quoting character will not be split but parsed as a complete field. Only valid when LogType is delimiter_log.
- time
Extract stringRegex - Regular expression for extracting time, used to extract the time value from the TimeKey field and parse it as the collection time
- time
Format string - Parsing format for the time field. If you use a specific time field in the log as the log timestamp, you must provide both TimeKey and TimeFormat. TimeKey and TimeFormat must be used together.
- time
Key string - Name of the log time field. If you want to use a specific time field in the log as the log timestamp, you need to specify both TimeKey and TimeFormat. TimeKey and TimeFormat must be provided together.
- time
Sample string - Time sample. Used to check whether the entered time parsing format is correct.
- time
Zone string - Time zone. Supports machine time zone (default) and custom time zone. Custom time zone supports GMT and UTC. GMT format: GMT+08:00. UTC format: Asia/Shanghai.
- un
Match stringLog Key - Key name for unmatched logs.
- un
Match booleanUp Load Switch - Switch for uploading unmatched logs.
- begin_
regex str - Regular expression that the first line of the log must match. Valid only when LogType is multilinelog or fullregexlog. Must be a valid regular expression.
- delimiter str
- Log delimiter. Valid only when LogType is delimiter_log.
- enable_
nanosecond bool - Enable nanosecond precision time. When enabled, log time parsing will include and report nanosecond precision. true: Enable nanosecond precision time. false: Disable nanosecond precision time.
- filter_
key_ Sequence[Ruleregexes Extract Rule Filter Key Regex] - keys Sequence[str]
- List of log field names (Key). This is only valid when LogType is delimiterlog or fullregexlog. You can configure up to 100 field names. When LogType is delimiterlog, field names must be unique and cannot all be empty. When LogType is fullregexlog, field names must be unique and cannot be empty.
- log_
regex str - The entire log must match the specified regular expression. This is only valid when the collected log type is fullregex_log. Must be a valid regular expression.
- log_
template RuleExtract Rule Log Template - Automatically extract log fields based on the specified log template
- quote str
- Quoting character. Content wrapped by a quoting character will not be split but parsed as a complete field. Only valid when LogType is delimiter_log.
- time_
extract_ strregex - Regular expression for extracting time, used to extract the time value from the TimeKey field and parse it as the collection time
- time_
format str - Parsing format for the time field. If you use a specific time field in the log as the log timestamp, you must provide both TimeKey and TimeFormat. TimeKey and TimeFormat must be used together.
- time_
key str - Name of the log time field. If you want to use a specific time field in the log as the log timestamp, you need to specify both TimeKey and TimeFormat. TimeKey and TimeFormat must be provided together.
- time_
sample str - Time sample. Used to check whether the entered time parsing format is correct.
- time_
zone str - Time zone. Supports machine time zone (default) and custom time zone. Custom time zone supports GMT and UTC. GMT format: GMT+08:00. UTC format: Asia/Shanghai.
- un_
match_ strlog_ key - Key name for unmatched logs.
- un_
match_ boolup_ load_ switch - Switch for uploading unmatched logs.
- begin
Regex String - Regular expression that the first line of the log must match. Valid only when LogType is multilinelog or fullregexlog. Must be a valid regular expression.
- delimiter String
- Log delimiter. Valid only when LogType is delimiter_log.
- enable
Nanosecond Boolean - Enable nanosecond precision time. When enabled, log time parsing will include and report nanosecond precision. true: Enable nanosecond precision time. false: Disable nanosecond precision time.
- filter
Key List<Property Map>Regexes - keys List<String>
- List of log field names (Key). This is only valid when LogType is delimiterlog or fullregexlog. You can configure up to 100 field names. When LogType is delimiterlog, field names must be unique and cannot all be empty. When LogType is fullregexlog, field names must be unique and cannot be empty.
- log
Regex String - The entire log must match the specified regular expression. This is only valid when the collected log type is fullregex_log. Must be a valid regular expression.
- log
Template Property Map - Automatically extract log fields based on the specified log template
- quote String
- Quoting character. Content wrapped by a quoting character will not be split but parsed as a complete field. Only valid when LogType is delimiter_log.
- time
Extract StringRegex - Regular expression for extracting time, used to extract the time value from the TimeKey field and parse it as the collection time
- time
Format String - Parsing format for the time field. If you use a specific time field in the log as the log timestamp, you must provide both TimeKey and TimeFormat. TimeKey and TimeFormat must be used together.
- time
Key String - Name of the log time field. If you want to use a specific time field in the log as the log timestamp, you need to specify both TimeKey and TimeFormat. TimeKey and TimeFormat must be provided together.
- time
Sample String - Time sample. Used to check whether the entered time parsing format is correct.
- time
Zone String - Time zone. Supports machine time zone (default) and custom time zone. Custom time zone supports GMT and UTC. GMT format: GMT+08:00. UTC format: Asia/Shanghai.
- un
Match StringLog Key - Key name for unmatched logs.
- un
Match BooleanUp Load Switch - Switch for uploading unmatched logs.
RuleExtractRuleFilterKeyRegex, RuleExtractRuleFilterKeyRegexArgs
RuleExtractRuleLogTemplate, RuleExtractRuleLogTemplateArgs
RuleHostGroupInfo, RuleHostGroupInfoArgs
- Host
Group stringId - Machine group ID
- Host
Group stringId - Machine group ID
- host
Group StringId - Machine group ID
- host
Group stringId - Machine group ID
- host_
group_ strid - Machine group ID
- host
Group StringId - Machine group ID
RuleUserDefineRule, RuleUserDefineRuleArgs
- Advanced
Volcengine.
Rule User Define Rule Advanced - The Advanced parameter is used for extended configuration. After enabling extended configuration, you can customize advanced behaviors of LogCollector, such as when to release file handles. Note: If multiple release conditions are specified, the handle is released and log file monitoring ends as soon as any condition is met.
- Enable
Host boolGroup Label - Whether to upload the label information of the host group to the log service. The default is off. true: LogCollector uploads the label information of the host group to the specified field. You can specify the field name in the HostGroupLabelKey parameter. false (default): Host group label information is not uploaded.
- Enable
Hostname bool - Upload the hostname field. Default is disabled. true: Add a field to the original log to record the source hostname. Specify the hostname field name using HostnameKey. false: (default) Do not add the hostname field.
- Enable
Raw boolLog - Upload raw logs. true: Upload raw logs. false (default): Do not upload raw logs.
- Fields
List<Volcengine.
Rule User Define Rule Field> - Host
Group stringLabel Key - Field name used to store machine group label information
- Hostname
Key string - Hostname field name. Required only when EnableHostname is true.
- Ignore
Older int - Ignore log files that have not been updated for a specified period (in hours).
- Multi
Collects stringType - Allow multiple log file collections. Empty: Use log file ID (including file inode, device, and checksum of the first N bytes) to uniquely identify the log file. RuleID: Use collection rule ID and log file ID to uniquely identify the log file. TopicIDRuleName: Use log topic ID, collection rule name, and log file ID to uniquely identify the log file.
- Parse
Path Volcengine.Rule Rule User Define Rule Parse Path Rule - Rule for parsing the collection path. After setting the rule, fields in the collection path are extracted using the specified regular expression and added as metadata to the log data. Note: This parameter is not supported when collecting container standard output.
- Plugin
Volcengine.
Rule User Define Rule Plugin - LogCollector plugin configuration. After enabling plugin configuration, you can add one or more LogCollector processor plugins to parse logs with complex or variable structures.
- Raw
Log stringKey - Name of the raw log field. Only effective when EnableRawLog is set to true. RawLogKey defaults to raw, meaning the original log data will be encapsulated in the raw field and uploaded to the log service along with the parsed log data.
-
Volcengine.
Rule User Define Rule Shard Hash Key - Rules for routing log partitions. If this parameter is not set, logs are written using the default load balancing mode, and packets are written to any available Shard. If this parameter is set, logs are collected using the HashKey routing Shard mode, and the log service writes data to the Shard containing the specified Key value
- Tail
Files bool - LogCollector collection policy, which specifies whether LogCollector collects incremental logs or full logs. Default is false, meaning full log collection. true: incremental collection. LogCollector only collects newly added content in the file. When new logs are written to monitored log files, LogCollector triggers log collection. For first-time collection, LogCollector automatically determines the collection position based on the incremental threshold TailSizeKb you specify. If the new file size does not exceed the incremental threshold, collection starts from the beginning of the file. If the new file size exceeds the incremental threshold, collection starts from the position at the end of the file minus the incremental threshold, collecting only incremental logs. For subsequent collections, LogCollector determines the collection position based on Checkpoint and continues collecting. false: (default) full collection. LogCollector collects logs from the beginning of each file, including historical log data.
- Tail
Size intKb - Backtracking threshold for incremental collection, in KiB. When LogCollector uses incremental collection, for the first collection of a log file: If the new log file size does not exceed the TailSizeKb value, collection starts from the beginning of the file. If the new log file size exceeds the TailSizeKb value, collection starts from the position that is TailSizeKb from the end of the file.
- Advanced
Rule
User Define Rule Advanced - The Advanced parameter is used for extended configuration. After enabling extended configuration, you can customize advanced behaviors of LogCollector, such as when to release file handles. Note: If multiple release conditions are specified, the handle is released and log file monitoring ends as soon as any condition is met.
- Enable
Host boolGroup Label - Whether to upload the label information of the host group to the log service. The default is off. true: LogCollector uploads the label information of the host group to the specified field. You can specify the field name in the HostGroupLabelKey parameter. false (default): Host group label information is not uploaded.
- Enable
Hostname bool - Upload the hostname field. Default is disabled. true: Add a field to the original log to record the source hostname. Specify the hostname field name using HostnameKey. false: (default) Do not add the hostname field.
- Enable
Raw boolLog - Upload raw logs. true: Upload raw logs. false (default): Do not upload raw logs.
- Fields
[]Rule
User Define Rule Field - Host
Group stringLabel Key - Field name used to store machine group label information
- Hostname
Key string - Hostname field name. Required only when EnableHostname is true.
- Ignore
Older int - Ignore log files that have not been updated for a specified period (in hours).
- Multi
Collects stringType - Allow multiple log file collections. Empty: Use log file ID (including file inode, device, and checksum of the first N bytes) to uniquely identify the log file. RuleID: Use collection rule ID and log file ID to uniquely identify the log file. TopicIDRuleName: Use log topic ID, collection rule name, and log file ID to uniquely identify the log file.
- Parse
Path RuleRule User Define Rule Parse Path Rule - Rule for parsing the collection path. After setting the rule, fields in the collection path are extracted using the specified regular expression and added as metadata to the log data. Note: This parameter is not supported when collecting container standard output.
- Plugin
Rule
User Define Rule Plugin - LogCollector plugin configuration. After enabling plugin configuration, you can add one or more LogCollector processor plugins to parse logs with complex or variable structures.
- Raw
Log stringKey - Name of the raw log field. Only effective when EnableRawLog is set to true. RawLogKey defaults to raw, meaning the original log data will be encapsulated in the raw field and uploaded to the log service along with the parsed log data.
-
Rule
User Define Rule Shard Hash Key - Rules for routing log partitions. If this parameter is not set, logs are written using the default load balancing mode, and packets are written to any available Shard. If this parameter is set, logs are collected using the HashKey routing Shard mode, and the log service writes data to the Shard containing the specified Key value
- Tail
Files bool - LogCollector collection policy, which specifies whether LogCollector collects incremental logs or full logs. Default is false, meaning full log collection. true: incremental collection. LogCollector only collects newly added content in the file. When new logs are written to monitored log files, LogCollector triggers log collection. For first-time collection, LogCollector automatically determines the collection position based on the incremental threshold TailSizeKb you specify. If the new file size does not exceed the incremental threshold, collection starts from the beginning of the file. If the new file size exceeds the incremental threshold, collection starts from the position at the end of the file minus the incremental threshold, collecting only incremental logs. For subsequent collections, LogCollector determines the collection position based on Checkpoint and continues collecting. false: (default) full collection. LogCollector collects logs from the beginning of each file, including historical log data.
- Tail
Size intKb - Backtracking threshold for incremental collection, in KiB. When LogCollector uses incremental collection, for the first collection of a log file: If the new log file size does not exceed the TailSizeKb value, collection starts from the beginning of the file. If the new log file size exceeds the TailSizeKb value, collection starts from the position that is TailSizeKb from the end of the file.
- advanced
Rule
User Define Rule Advanced - The Advanced parameter is used for extended configuration. After enabling extended configuration, you can customize advanced behaviors of LogCollector, such as when to release file handles. Note: If multiple release conditions are specified, the handle is released and log file monitoring ends as soon as any condition is met.
- enable
Host BooleanGroup Label - Whether to upload the label information of the host group to the log service. The default is off. true: LogCollector uploads the label information of the host group to the specified field. You can specify the field name in the HostGroupLabelKey parameter. false (default): Host group label information is not uploaded.
- enable
Hostname Boolean - Upload the hostname field. Default is disabled. true: Add a field to the original log to record the source hostname. Specify the hostname field name using HostnameKey. false: (default) Do not add the hostname field.
- enable
Raw BooleanLog - Upload raw logs. true: Upload raw logs. false (default): Do not upload raw logs.
- fields
List<Rule
User Define Rule Field> - host
Group StringLabel Key - Field name used to store machine group label information
- hostname
Key String - Hostname field name. Required only when EnableHostname is true.
- ignore
Older Integer - Ignore log files that have not been updated for a specified period (in hours).
- multi
Collects StringType - Allow multiple log file collections. Empty: Use log file ID (including file inode, device, and checksum of the first N bytes) to uniquely identify the log file. RuleID: Use collection rule ID and log file ID to uniquely identify the log file. TopicIDRuleName: Use log topic ID, collection rule name, and log file ID to uniquely identify the log file.
- parse
Path RuleRule User Define Rule Parse Path Rule - Rule for parsing the collection path. After setting the rule, fields in the collection path are extracted using the specified regular expression and added as metadata to the log data. Note: This parameter is not supported when collecting container standard output.
- plugin
Rule
User Define Rule Plugin - LogCollector plugin configuration. After enabling plugin configuration, you can add one or more LogCollector processor plugins to parse logs with complex or variable structures.
- raw
Log StringKey - Name of the raw log field. Only effective when EnableRawLog is set to true. RawLogKey defaults to raw, meaning the original log data will be encapsulated in the raw field and uploaded to the log service along with the parsed log data.
-
Rule
User Define Rule Shard Hash Key - Rules for routing log partitions. If this parameter is not set, logs are written using the default load balancing mode, and packets are written to any available Shard. If this parameter is set, logs are collected using the HashKey routing Shard mode, and the log service writes data to the Shard containing the specified Key value
- tail
Files Boolean - LogCollector collection policy, which specifies whether LogCollector collects incremental logs or full logs. Default is false, meaning full log collection. true: incremental collection. LogCollector only collects newly added content in the file. When new logs are written to monitored log files, LogCollector triggers log collection. For first-time collection, LogCollector automatically determines the collection position based on the incremental threshold TailSizeKb you specify. If the new file size does not exceed the incremental threshold, collection starts from the beginning of the file. If the new file size exceeds the incremental threshold, collection starts from the position at the end of the file minus the incremental threshold, collecting only incremental logs. For subsequent collections, LogCollector determines the collection position based on Checkpoint and continues collecting. false: (default) full collection. LogCollector collects logs from the beginning of each file, including historical log data.
- tail
Size IntegerKb - Backtracking threshold for incremental collection, in KiB. When LogCollector uses incremental collection, for the first collection of a log file: If the new log file size does not exceed the TailSizeKb value, collection starts from the beginning of the file. If the new log file size exceeds the TailSizeKb value, collection starts from the position that is TailSizeKb from the end of the file.
- advanced
Rule
User Define Rule Advanced - The Advanced parameter is used for extended configuration. After enabling extended configuration, you can customize advanced behaviors of LogCollector, such as when to release file handles. Note: If multiple release conditions are specified, the handle is released and log file monitoring ends as soon as any condition is met.
- enable
Host booleanGroup Label - Whether to upload the label information of the host group to the log service. The default is off. true: LogCollector uploads the label information of the host group to the specified field. You can specify the field name in the HostGroupLabelKey parameter. false (default): Host group label information is not uploaded.
- enable
Hostname boolean - Upload the hostname field. Default is disabled. true: Add a field to the original log to record the source hostname. Specify the hostname field name using HostnameKey. false: (default) Do not add the hostname field.
- enable
Raw booleanLog - Upload raw logs. true: Upload raw logs. false (default): Do not upload raw logs.
- fields
Rule
User Define Rule Field[] - host
Group stringLabel Key - Field name used to store machine group label information
- hostname
Key string - Hostname field name. Required only when EnableHostname is true.
- ignore
Older number - Ignore log files that have not been updated for a specified period (in hours).
- multi
Collects stringType - Allow multiple log file collections. Empty: Use log file ID (including file inode, device, and checksum of the first N bytes) to uniquely identify the log file. RuleID: Use collection rule ID and log file ID to uniquely identify the log file. TopicIDRuleName: Use log topic ID, collection rule name, and log file ID to uniquely identify the log file.
- parse
Path RuleRule User Define Rule Parse Path Rule - Rule for parsing the collection path. After setting the rule, fields in the collection path are extracted using the specified regular expression and added as metadata to the log data. Note: This parameter is not supported when collecting container standard output.
- plugin
Rule
User Define Rule Plugin - LogCollector plugin configuration. After enabling plugin configuration, you can add one or more LogCollector processor plugins to parse logs with complex or variable structures.
- raw
Log stringKey - Name of the raw log field. Only effective when EnableRawLog is set to true. RawLogKey defaults to raw, meaning the original log data will be encapsulated in the raw field and uploaded to the log service along with the parsed log data.
-
Rule
User Define Rule Shard Hash Key - Rules for routing log partitions. If this parameter is not set, logs are written using the default load balancing mode, and packets are written to any available Shard. If this parameter is set, logs are collected using the HashKey routing Shard mode, and the log service writes data to the Shard containing the specified Key value
- tail
Files boolean - LogCollector collection policy, which specifies whether LogCollector collects incremental logs or full logs. Default is false, meaning full log collection. true: incremental collection. LogCollector only collects newly added content in the file. When new logs are written to monitored log files, LogCollector triggers log collection. For first-time collection, LogCollector automatically determines the collection position based on the incremental threshold TailSizeKb you specify. If the new file size does not exceed the incremental threshold, collection starts from the beginning of the file. If the new file size exceeds the incremental threshold, collection starts from the position at the end of the file minus the incremental threshold, collecting only incremental logs. For subsequent collections, LogCollector determines the collection position based on Checkpoint and continues collecting. false: (default) full collection. LogCollector collects logs from the beginning of each file, including historical log data.
- tail
Size numberKb - Backtracking threshold for incremental collection, in KiB. When LogCollector uses incremental collection, for the first collection of a log file: If the new log file size does not exceed the TailSizeKb value, collection starts from the beginning of the file. If the new log file size exceeds the TailSizeKb value, collection starts from the position that is TailSizeKb from the end of the file.
- advanced
Rule
User Define Rule Advanced - The Advanced parameter is used for extended configuration. After enabling extended configuration, you can customize advanced behaviors of LogCollector, such as when to release file handles. Note: If multiple release conditions are specified, the handle is released and log file monitoring ends as soon as any condition is met.
- enable_
host_ boolgroup_ label - Whether to upload the label information of the host group to the log service. The default is off. true: LogCollector uploads the label information of the host group to the specified field. You can specify the field name in the HostGroupLabelKey parameter. false (default): Host group label information is not uploaded.
- enable_
hostname bool - Upload the hostname field. Default is disabled. true: Add a field to the original log to record the source hostname. Specify the hostname field name using HostnameKey. false: (default) Do not add the hostname field.
- enable_
raw_ boollog - Upload raw logs. true: Upload raw logs. false (default): Do not upload raw logs.
- fields
Sequence[Rule
User Define Rule Field] - host_
group_ strlabel_ key - Field name used to store machine group label information
- hostname_
key str - Hostname field name. Required only when EnableHostname is true.
- ignore_
older int - Ignore log files that have not been updated for a specified period (in hours).
- multi_
collects_ strtype - Allow multiple log file collections. Empty: Use log file ID (including file inode, device, and checksum of the first N bytes) to uniquely identify the log file. RuleID: Use collection rule ID and log file ID to uniquely identify the log file. TopicIDRuleName: Use log topic ID, collection rule name, and log file ID to uniquely identify the log file.
- parse_
path_ Rulerule User Define Rule Parse Path Rule - Rule for parsing the collection path. After setting the rule, fields in the collection path are extracted using the specified regular expression and added as metadata to the log data. Note: This parameter is not supported when collecting container standard output.
- plugin
Rule
User Define Rule Plugin - LogCollector plugin configuration. After enabling plugin configuration, you can add one or more LogCollector processor plugins to parse logs with complex or variable structures.
- raw_
log_ strkey - Name of the raw log field. Only effective when EnableRawLog is set to true. RawLogKey defaults to raw, meaning the original log data will be encapsulated in the raw field and uploaded to the log service along with the parsed log data.
-
Rule
User Define Rule Shard Hash Key - Rules for routing log partitions. If this parameter is not set, logs are written using the default load balancing mode, and packets are written to any available Shard. If this parameter is set, logs are collected using the HashKey routing Shard mode, and the log service writes data to the Shard containing the specified Key value
- tail_
files bool - LogCollector collection policy, which specifies whether LogCollector collects incremental logs or full logs. Default is false, meaning full log collection. true: incremental collection. LogCollector only collects newly added content in the file. When new logs are written to monitored log files, LogCollector triggers log collection. For first-time collection, LogCollector automatically determines the collection position based on the incremental threshold TailSizeKb you specify. If the new file size does not exceed the incremental threshold, collection starts from the beginning of the file. If the new file size exceeds the incremental threshold, collection starts from the position at the end of the file minus the incremental threshold, collecting only incremental logs. For subsequent collections, LogCollector determines the collection position based on Checkpoint and continues collecting. false: (default) full collection. LogCollector collects logs from the beginning of each file, including historical log data.
- tail_
size_ intkb - Backtracking threshold for incremental collection, in KiB. When LogCollector uses incremental collection, for the first collection of a log file: If the new log file size does not exceed the TailSizeKb value, collection starts from the beginning of the file. If the new log file size exceeds the TailSizeKb value, collection starts from the position that is TailSizeKb from the end of the file.
- advanced Property Map
- The Advanced parameter is used for extended configuration. After enabling extended configuration, you can customize advanced behaviors of LogCollector, such as when to release file handles. Note: If multiple release conditions are specified, the handle is released and log file monitoring ends as soon as any condition is met.
- enable
Host BooleanGroup Label - Whether to upload the label information of the host group to the log service. The default is off. true: LogCollector uploads the label information of the host group to the specified field. You can specify the field name in the HostGroupLabelKey parameter. false (default): Host group label information is not uploaded.
- enable
Hostname Boolean - Upload the hostname field. Default is disabled. true: Add a field to the original log to record the source hostname. Specify the hostname field name using HostnameKey. false: (default) Do not add the hostname field.
- enable
Raw BooleanLog - Upload raw logs. true: Upload raw logs. false (default): Do not upload raw logs.
- fields List<Property Map>
- host
Group StringLabel Key - Field name used to store machine group label information
- hostname
Key String - Hostname field name. Required only when EnableHostname is true.
- ignore
Older Number - Ignore log files that have not been updated for a specified period (in hours).
- multi
Collects StringType - Allow multiple log file collections. Empty: Use log file ID (including file inode, device, and checksum of the first N bytes) to uniquely identify the log file. RuleID: Use collection rule ID and log file ID to uniquely identify the log file. TopicIDRuleName: Use log topic ID, collection rule name, and log file ID to uniquely identify the log file.
- parse
Path Property MapRule - Rule for parsing the collection path. After setting the rule, fields in the collection path are extracted using the specified regular expression and added as metadata to the log data. Note: This parameter is not supported when collecting container standard output.
- plugin Property Map
- LogCollector plugin configuration. After enabling plugin configuration, you can add one or more LogCollector processor plugins to parse logs with complex or variable structures.
- raw
Log StringKey - Name of the raw log field. Only effective when EnableRawLog is set to true. RawLogKey defaults to raw, meaning the original log data will be encapsulated in the raw field and uploaded to the log service along with the parsed log data.
- Property Map
- Rules for routing log partitions. If this parameter is not set, logs are written using the default load balancing mode, and packets are written to any available Shard. If this parameter is set, logs are collected using the HashKey routing Shard mode, and the log service writes data to the Shard containing the specified Key value
- tail
Files Boolean - LogCollector collection policy, which specifies whether LogCollector collects incremental logs or full logs. Default is false, meaning full log collection. true: incremental collection. LogCollector only collects newly added content in the file. When new logs are written to monitored log files, LogCollector triggers log collection. For first-time collection, LogCollector automatically determines the collection position based on the incremental threshold TailSizeKb you specify. If the new file size does not exceed the incremental threshold, collection starts from the beginning of the file. If the new file size exceeds the incremental threshold, collection starts from the position at the end of the file minus the incremental threshold, collecting only incremental logs. For subsequent collections, LogCollector determines the collection position based on Checkpoint and continues collecting. false: (default) full collection. LogCollector collects logs from the beginning of each file, including historical log data.
- tail
Size NumberKb - Backtracking threshold for incremental collection, in KiB. When LogCollector uses incremental collection, for the first collection of a log file: If the new log file size does not exceed the TailSizeKb value, collection starts from the beginning of the file. If the new log file size exceeds the TailSizeKb value, collection starts from the position that is TailSizeKb from the end of the file.
RuleUserDefineRuleAdvanced, RuleUserDefineRuleAdvancedArgs
- Close
Eof bool - After reading to the end of the log file, choose whether to release the file handle. Default is false.
- Close
Inactive int - Wait time to release log file handle. If no new logs are written to the log file within the specified time, the handle for that log file is released. Unit: seconds. Range: 1–300 seconds. Default: 60 seconds.
- Close
Removed bool - Release the file handle after the log file is removed. Default is false.
- Close
Renamed bool - Release the file handle after the log file is renamed. Default is false.
- Close
Timeout int - Maximum monitoring duration for LogCollector log files, in seconds. The default is 0 seconds, meaning LogCollector does not limit the monitoring duration for log files. Timing starts when LogCollector begins monitoring the log file. Once the specified duration is exceeded, LogCollector immediately releases the file handle and stops monitoring, regardless of whether the log file has been fully read.
- No
Line intTerminator Eof Max Time - Maximum wait time when LogCollector does not detect a line break, in seconds. The default is 5s. Timing starts when LogCollector begins reading the log file. If no line break is detected within the specified time, LogCollector sends the logs in the buffer. If the file write interval is long, a complete log entry may be split into two parts and written separately. Adjust this parameter based on your log write interval.
- Close
Eof bool - After reading to the end of the log file, choose whether to release the file handle. Default is false.
- Close
Inactive int - Wait time to release log file handle. If no new logs are written to the log file within the specified time, the handle for that log file is released. Unit: seconds. Range: 1–300 seconds. Default: 60 seconds.
- Close
Removed bool - Release the file handle after the log file is removed. Default is false.
- Close
Renamed bool - Release the file handle after the log file is renamed. Default is false.
- Close
Timeout int - Maximum monitoring duration for LogCollector log files, in seconds. The default is 0 seconds, meaning LogCollector does not limit the monitoring duration for log files. Timing starts when LogCollector begins monitoring the log file. Once the specified duration is exceeded, LogCollector immediately releases the file handle and stops monitoring, regardless of whether the log file has been fully read.
- No
Line intTerminator Eof Max Time - Maximum wait time when LogCollector does not detect a line break, in seconds. The default is 5s. Timing starts when LogCollector begins reading the log file. If no line break is detected within the specified time, LogCollector sends the logs in the buffer. If the file write interval is long, a complete log entry may be split into two parts and written separately. Adjust this parameter based on your log write interval.
- close
Eof Boolean - After reading to the end of the log file, choose whether to release the file handle. Default is false.
- close
Inactive Integer - Wait time to release log file handle. If no new logs are written to the log file within the specified time, the handle for that log file is released. Unit: seconds. Range: 1–300 seconds. Default: 60 seconds.
- close
Removed Boolean - Release the file handle after the log file is removed. Default is false.
- close
Renamed Boolean - Release the file handle after the log file is renamed. Default is false.
- close
Timeout Integer - Maximum monitoring duration for LogCollector log files, in seconds. The default is 0 seconds, meaning LogCollector does not limit the monitoring duration for log files. Timing starts when LogCollector begins monitoring the log file. Once the specified duration is exceeded, LogCollector immediately releases the file handle and stops monitoring, regardless of whether the log file has been fully read.
- no
Line IntegerTerminator Eof Max Time - Maximum wait time when LogCollector does not detect a line break, in seconds. The default is 5s. Timing starts when LogCollector begins reading the log file. If no line break is detected within the specified time, LogCollector sends the logs in the buffer. If the file write interval is long, a complete log entry may be split into two parts and written separately. Adjust this parameter based on your log write interval.
- close
Eof boolean - After reading to the end of the log file, choose whether to release the file handle. Default is false.
- close
Inactive number - Wait time to release log file handle. If no new logs are written to the log file within the specified time, the handle for that log file is released. Unit: seconds. Range: 1–300 seconds. Default: 60 seconds.
- close
Removed boolean - Release the file handle after the log file is removed. Default is false.
- close
Renamed boolean - Release the file handle after the log file is renamed. Default is false.
- close
Timeout number - Maximum monitoring duration for LogCollector log files, in seconds. The default is 0 seconds, meaning LogCollector does not limit the monitoring duration for log files. Timing starts when LogCollector begins monitoring the log file. Once the specified duration is exceeded, LogCollector immediately releases the file handle and stops monitoring, regardless of whether the log file has been fully read.
- no
Line numberTerminator Eof Max Time - Maximum wait time when LogCollector does not detect a line break, in seconds. The default is 5s. Timing starts when LogCollector begins reading the log file. If no line break is detected within the specified time, LogCollector sends the logs in the buffer. If the file write interval is long, a complete log entry may be split into two parts and written separately. Adjust this parameter based on your log write interval.
- close_
eof bool - After reading to the end of the log file, choose whether to release the file handle. Default is false.
- close_
inactive int - Wait time to release log file handle. If no new logs are written to the log file within the specified time, the handle for that log file is released. Unit: seconds. Range: 1–300 seconds. Default: 60 seconds.
- close_
removed bool - Release the file handle after the log file is removed. Default is false.
- close_
renamed bool - Release the file handle after the log file is renamed. Default is false.
- close_
timeout int - Maximum monitoring duration for LogCollector log files, in seconds. The default is 0 seconds, meaning LogCollector does not limit the monitoring duration for log files. Timing starts when LogCollector begins monitoring the log file. Once the specified duration is exceeded, LogCollector immediately releases the file handle and stops monitoring, regardless of whether the log file has been fully read.
- no_
line_ intterminator_ eof_ max_ time - Maximum wait time when LogCollector does not detect a line break, in seconds. The default is 5s. Timing starts when LogCollector begins reading the log file. If no line break is detected within the specified time, LogCollector sends the logs in the buffer. If the file write interval is long, a complete log entry may be split into two parts and written separately. Adjust this parameter based on your log write interval.
- close
Eof Boolean - After reading to the end of the log file, choose whether to release the file handle. Default is false.
- close
Inactive Number - Wait time to release log file handle. If no new logs are written to the log file within the specified time, the handle for that log file is released. Unit: seconds. Range: 1–300 seconds. Default: 60 seconds.
- close
Removed Boolean - Release the file handle after the log file is removed. Default is false.
- close
Renamed Boolean - Release the file handle after the log file is renamed. Default is false.
- close
Timeout Number - Maximum monitoring duration for LogCollector log files, in seconds. The default is 0 seconds, meaning LogCollector does not limit the monitoring duration for log files. Timing starts when LogCollector begins monitoring the log file. Once the specified duration is exceeded, LogCollector immediately releases the file handle and stops monitoring, regardless of whether the log file has been fully read.
- no
Line NumberTerminator Eof Max Time - Maximum wait time when LogCollector does not detect a line break, in seconds. The default is 5s. Timing starts when LogCollector begins reading the log file. If no line break is detected within the specified time, LogCollector sends the logs in the buffer. If the file write interval is long, a complete log entry may be split into two parts and written separately. Adjust this parameter based on your log write interval.
RuleUserDefineRuleField, RuleUserDefineRuleFieldArgs
RuleUserDefineRuleParsePathRule, RuleUserDefineRuleParsePathRuleArgs
- Keys List<string>
- Field name list. The log service uses a regular expression (Regex) to parse the path sample (PathSample) into multiple fields. Keys specify the name of each field. You can configure up to 100 field names. Field names cannot be empty or duplicated.
- Path
Sample string - Sample collection path for actual scenarios. The sample collection path must be an absolute path. Wildcards *, ?, ** are not allowed in the path sample.
- Regex string
- Regular expression used to extract the path field. Must match the sample collection path, otherwise extraction will fail
- Keys []string
- Field name list. The log service uses a regular expression (Regex) to parse the path sample (PathSample) into multiple fields. Keys specify the name of each field. You can configure up to 100 field names. Field names cannot be empty or duplicated.
- Path
Sample string - Sample collection path for actual scenarios. The sample collection path must be an absolute path. Wildcards *, ?, ** are not allowed in the path sample.
- Regex string
- Regular expression used to extract the path field. Must match the sample collection path, otherwise extraction will fail
- keys List<String>
- Field name list. The log service uses a regular expression (Regex) to parse the path sample (PathSample) into multiple fields. Keys specify the name of each field. You can configure up to 100 field names. Field names cannot be empty or duplicated.
- path
Sample String - Sample collection path for actual scenarios. The sample collection path must be an absolute path. Wildcards *, ?, ** are not allowed in the path sample.
- regex String
- Regular expression used to extract the path field. Must match the sample collection path, otherwise extraction will fail
- keys string[]
- Field name list. The log service uses a regular expression (Regex) to parse the path sample (PathSample) into multiple fields. Keys specify the name of each field. You can configure up to 100 field names. Field names cannot be empty or duplicated.
- path
Sample string - Sample collection path for actual scenarios. The sample collection path must be an absolute path. Wildcards *, ?, ** are not allowed in the path sample.
- regex string
- Regular expression used to extract the path field. Must match the sample collection path, otherwise extraction will fail
- keys Sequence[str]
- Field name list. The log service uses a regular expression (Regex) to parse the path sample (PathSample) into multiple fields. Keys specify the name of each field. You can configure up to 100 field names. Field names cannot be empty or duplicated.
- path_
sample str - Sample collection path for actual scenarios. The sample collection path must be an absolute path. Wildcards *, ?, ** are not allowed in the path sample.
- regex str
- Regular expression used to extract the path field. Must match the sample collection path, otherwise extraction will fail
- keys List<String>
- Field name list. The log service uses a regular expression (Regex) to parse the path sample (PathSample) into multiple fields. Keys specify the name of each field. You can configure up to 100 field names. Field names cannot be empty or duplicated.
- path
Sample String - Sample collection path for actual scenarios. The sample collection path must be an absolute path. Wildcards *, ?, ** are not allowed in the path sample.
- regex String
- Regular expression used to extract the path field. Must match the sample collection path, otherwise extraction will fail
RuleUserDefineRulePlugin, RuleUserDefineRulePluginArgs
- Processors string
- LogCollector plugin. For the list of supported plugins and parameter descriptions, see LogCollector plugin overview.
- Processors string
- LogCollector plugin. For the list of supported plugins and parameter descriptions, see LogCollector plugin overview.
- processors String
- LogCollector plugin. For the list of supported plugins and parameter descriptions, see LogCollector plugin overview.
- processors string
- LogCollector plugin. For the list of supported plugins and parameter descriptions, see LogCollector plugin overview.
- processors str
- LogCollector plugin. For the list of supported plugins and parameter descriptions, see LogCollector plugin overview.
- processors String
- LogCollector plugin. For the list of supported plugins and parameter descriptions, see LogCollector plugin overview.
RuleUserDefineRuleShardHashKey, RuleUserDefineRuleShardHashKeyArgs
- Hash
Key string - HashKey of the log group, used to specify the shard to which the current log group will be written. The value range for this parameter is [00000000000000000000000000000000-ffffffffffffffffffffffffffffffff).
- Hash
Key string - HashKey of the log group, used to specify the shard to which the current log group will be written. The value range for this parameter is [00000000000000000000000000000000-ffffffffffffffffffffffffffffffff).
- hash
Key String - HashKey of the log group, used to specify the shard to which the current log group will be written. The value range for this parameter is [00000000000000000000000000000000-ffffffffffffffffffffffffffffffff).
- hash
Key string - HashKey of the log group, used to specify the shard to which the current log group will be written. The value range for this parameter is [00000000000000000000000000000000-ffffffffffffffffffffffffffffffff).
- hash_
key str - HashKey of the log group, used to specify the shard to which the current log group will be written. The value range for this parameter is [00000000000000000000000000000000-ffffffffffffffffffffffffffffffff).
- hash
Key String - HashKey of the log group, used to specify the shard to which the current log group will be written. The value range for this parameter is [00000000000000000000000000000000-ffffffffffffffffffffffffffffffff).
Import
$ pulumi import volcenginecc:tls/rule:Rule example "rule_id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcenginecc volcengine/pulumi-volcenginecc
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
volcengineccTerraform Provider.
published on Thursday, Apr 23, 2026 by Volcengine
