Comments (8)
是不是 pod 一定得制定 volumes,同时必须value 类型是 emptyDir 和 hostPath 这两类的其中一种才能采集到 容器内的日志。
如果 pod 完全不配置 volumes: 这种pod容器内的日志可以采集到吗
volumes:
- emptyDir: {}
name: log
volumes:
- hostPath:
path: /data/log
type: ""
from loggie.
源码看起来,pod如果没有配置 volumes 就无法使用采集容器内的日志的。是这样吗? 是受限的的pod,需要pod 有配置 volumes 才可以采集是吧?
from loggie.
函数看球来也是一定要判断,empty和 hostpath才可以
from loggie.
比如下面的测试 demo pod,什么volume 都没有配置,能不能使用 loggie 采集到 容器内的日志。
apiVersion: apps/v1
kind: Deployment
metadata:
name: ebiz-deployment
labels:
app: ebiz-app
spec:
replicas: 3
selector:
matchLabels:
app: ebiz-app
template:
metadata:
labels:
app: ebiz-app
spec:
containers:
- name: ebiz
image: docker.io/xdatcloud/demo:latest
from loggie.
pod没有挂载volume的情况下,我们内部版本支持从docker rootfs采集日志,但是需要挂载docker sock,下个小版本,我们考虑使用更好的方案去支持一下。
from loggie.
另外我们有一些用pvc 挂在的pod,这种日志能采集得了吗?
volumeMounts:
- mountPath: /cassandra_data
name: cassandra-data
volumeClaimTemplates:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
volume.beta.kubernetes.io/storage-class: fast
name: cassandra-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Gi
storageClassName: fast
volumeMode: Filesystem
status:
phase: Pending
from loggie.
👍,期待做好。
这个容器内日志采集,确实是一个非常**特色的场景,**内现在完全不按 12 因素来执行,这个采集如果能统一有个解决方案就好了。
from loggie.
Fixed by: #208
from loggie.
Related Issues (20)
- logconfig 在节点不更新
- Loggie传输到ES的时候支持配置别名么? HOT 1
- encoding
- 应用pod重启后,loggie无法采集 HOT 2
- source file stop failed HOT 1
- 关于日志告警的问题 HOT 3
- go test -race检测到DATA RACE
- branch main pkg/source/file/watch.go:321, your have drop the function of Pre-allocation offset
- 可以支持采集非 K8S 容器的 stdout 日志吗? HOT 1
- 老版本k8s 创建crd失败 HOT 2
- [Critical] HOW TO PARSE JSON LOGS USING LOGGIE HOT 2
- Regex in transformer lost key body and him value
- ack fail: “append state exist”
- Loggie, version 1.4.0, collected using the hostpath method. When the target container has multiple mounting addresses with the same prefix, only the first path is matched based on the prefix
- Use Sink's file to save log!
- retry interceptor goroutine blocking
- dropEvent not commit offset
- 支持日志解析,解析出来的字段可以并转换为数组
- windows日志采集扫描不到path
- loggie采集容器内的日志会和标准输出的日志混合,如何做切分。loki版本loki-stack-2.10.2 ,loggie版本1.4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loggie.