Replies: 1 comment
-
loongcollector守护进程的配置 apiVersion: apps/v1
kind: DaemonSet
metadata:
annotations:
deprecated.daemonset.template.generation: "7"
creationTimestamp: 2025-09-05T04:39:52Z
generation: 7
labels:
k8s-app: loongcollector-ds
name: loongcollector-ds
namespace: loongcollector
resourceVersion: "1346898"
uid: d42de1b0-1a7b-4e0d-8912-3f03e6a5c7fa
spec:
revisionHistoryLimit: 10
selector:
matchLabels:
k8s-app: loongcollector-ds
template:
metadata:
annotations:
kubectl.kubernetes.io/restartedAt: 2025-09-05T05:18:04Z
creationTimestamp: null
labels:
k8s-app: loongcollector-ds
spec:
containers:
- env:
- name: ALIYUN_LOG_ENV_TAGS
value: _node_name_|_node_ip_
- name: _node_name_
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
- name: _node_ip_
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.hostIP
- name: cpu_usage_limit
value: "1"
- name: mem_usage_limit
value: "512"
image: sls-opensource-registry.cn-shanghai.cr.aliyuncs.com/loongcollector-community-edition/loongcollector:3.1.4
imagePullPolicy: IfNotPresent
name: loongcollector
resources:
limits:
cpu: "1"
memory: 1Gi
requests:
cpu: 400m
memory: 384Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var/run
name: run
- mountPath: /logtail_host
mountPropagation: HostToContainer
name: root
readOnly: true
- mountPath: /usr/local/loongcollector/data
name: checkpoint
- mountPath: /usr/local/loongcollector/conf/continuous_pipeline_config/local
name: user-config
readOnly: true
dnsPolicy: ClusterFirstWithHostNet
hostNetwork: true
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
tolerations:
- operator: Exists
volumes:
- hostPath:
path: /var/run
type: Directory
name: run
- hostPath:
path: /
type: Directory
name: root
- hostPath:
path: /etc/loongcollector-loongcollector-ds/checkpoint
type: DirectoryOrCreate
name: checkpoint
- configMap:
defaultMode: 420
name: loongcollector-user-configmap
name: user-config
updateStrategy:
rollingUpdate:
maxSurge: 0
maxUnavailable: 1
type: RollingUpdate
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
loongcollector:3.1.4
使用文档中的示例:
``
样例
采集
/home/test-log/
路径下的multiline.log
文件,并按行首正则进行多行切分。实际输出
2025-09-05 05:18:38 {"content":"[2022-03-03 18:00:00] xxx1","time":"1757049517"}
2025-09-05 05:18:38 {"content":"yyyyy","time":"1757049517"}
2025-09-05 05:18:38 {"content":"zzzzzz","time":"1757049517"}
2025-09-05 05:18:38 {"content":"[2022-03-03 18:00:01] xxx2","time":"1757049517"}
2025-09-05 05:18:38 {"content":"yyyyy","time":"1757049517"}
2025-09-05 05:18:38 {"content":"zzzzzz","time":"1757049517"}
Beta Was this translation helpful? Give feedback.
All reactions