Replies: 1 comment
-
csv only one line example /vtrhub-root/run/containerd/io.containerd.runtime.v2.task/k8s.io/60f44274863752b24ad2dee72e538a5aa0bd7883f02d6c09c4d4686818ff8835/rootfs/home/admin/logs/dwdwd11/pressure-log.log,"{""node_ip"":""11.166.3"",""host_name"":""10.11.177.32"",""tenant_id"":""2"",""workspace_id"":""3"",""pod_ip"":""10.11.177.32"",""pod_name"":""-cell-gz00a-tr55l-bx9tg"",""pod_labels"":{""app.kubernetes.io/instance"":""-gz00a"",""app.kubernetes.io/name"":""jjj"",""..io/app-instance"":""-gz00a"",""..io/app-service"":""dwdwd11"","".dwdwd.io/bg-group"":""0"","".dwdwd.io/cell"":""gz00a"","".dwdwd.io/cluster"":""-allsit-cn-local-import-cluster-11005636"","".dwdwd.io/container-service-token"":"-f8c77-"","".dwdwd.io/control"":""true"","".dwdwd.io/pod-number"":""0"","".dwdwd.io/service-available"":"""","".dwdwd.io/source"":""lhc"","".dwdwd.io/techstack"":""dwdwd1122"","".dwdwd.io/techstackversion"":""null"","".dwdwd.io/tenant"":"""","".dwdwd.io/topology"":""gz00a"","".dwdwd.io/version"":""dwdwd11-cell-gz00a-tr55l-6d966f6654"","".dwdwd.io/vpc"":"""","".dwdwd.io/workspace"":""allsit-cn-local"","".dwdwd.io/workspace-group"":""allsit"","".dwdwd.io/zone"":""gz00a"","".dwdwd.io/zone_id"":""cn-local-ake"",""controller-revision-hash"":""dwdwd11-cell-gz00a-tr55l-6d966f6654"",""meta.k8s.alipay.com/delivery-workload"":""paascore-ext""},""app_name"":""dwdwd11"",""file_name"":""/home/admin/logs/dwdwd11/pressure-log.log"",""collect_rule"":{""encoding"":{""charset"":""utf8""},""read_from"":""beginning"",""multiline"":{""mode"":""halt_before"",""start_pattern"":"""",""condition_pattern"":""""},""big_line_rule"":{""max_line_bytes"":307200}},""config_file_name"":""file_4313756edbcdac94a0b771d641987380a58c016c93e57ba461f2a48ea46f29e2.toml"",""last_config_file_name"":"""",""rinse_rule"":{""timestamp_style"":""NormalMs"",""white_filter"":[],""black_filter"":[],""from_time"":""2025-04-09 19:02:25""},""status"":""OPEN"",""version"":0,""task_name"":""dwdwd11_/home/admin/logs/dwdwd11/pressure-log.log"",""operate"":""ADD"",""success"":true,""real_file_name"":""/vtrhub-root/run/containerd/io.containerd.runtime.v2.task/k8s.io/60f44274863752b24ad2dee72e538a5aa0bd7883f02d6c09c4d4686818ff8835/rootfs/home/admin/logs/dwdwd11/pressure-log.log"",""pod_id"":""cd0a52c7-1442-4088-9a6a-a27024876a68""}" |
Beta Was this translation helpful? Give feedback.
-
How much file collection speed can Vector handle with 1 CPU at maximum? I noticed that when the speed reaches 6MB/s, my CPU usage hits 100%. The agent is deployed as a DaemonSet, and this performance is somewhat surprising to me. Below is my configuration—are there any optimization suggestions?
[transforms.add_tag]
type = "remap"
inputs = ["file_*"]
source = '''
row = get_enrichment_table_record!("collect_csv",
{
"realFileName": .file
},
case_sensitive: false)
config = parse_json!(row.config)
.rinse_rule = config.rinse_rule
.log = .message
.collect_host_name = config.host_name
.collect_host_ip = config.node_ip
.pod_ip = config.pod_ip
.pod_name = config.pod_name
.pod_labels = config.pod_labels
.tenant_id = config.tenant_id
.workspace_id = config.workspace_id
.log_filename = config.file_name
.app_name = config.app_name
.collect_time = format_timestamp!(now(), "%Y-%m-%d %H:%M:%S", timezone: "Asia/Shanghai")
.task_name = config.task_name
'''
[sinks.aggregator]
type = "vector"
inputs = ["add_tag"]
address = "rinse_address:6000"
data_dir = '/etc/vtrhub/data_dir/'
api.enabled = true
api.address = '127.0.0.1:8686'
api.playground = false
acknowledgements = true
enrichment_tables.collect_csv.type = 'file'
enrichment_tables.collect_csv.file.path = '/etc/vtrhub/csv/collect.csv'
enrichment_tables.collect_csv.file.encoding.type = 'csv'
timezone='Asia/Shanghai'
type="file"
include=["/vtrhub-root/run/containerd/io.containerd.runtime.v2.task/k8s.io/60f44274863752b24ad2dee72e538a5aa0bd7883f02d6c09c4d4686818ff8835/rootfs/home/admin/logs/rmsdemo/pressure-log.log"]
max_line_bytes = 307200
read_from = "beginning"
rotate_wait_secs = 1200
offset_key="offset"
[encoding]
charset = "utf8"
[fingerprint]
strategy = 'device_and_inode'
Beta Was this translation helpful? Give feedback.
All reactions