mirror of
https://github.com/zoriya/snow.git
synced 2025-12-05 23:06:23 +00:00
Add k8sattributes
This commit is contained in:
24
apps/otel/otel-rbac.yaml
Normal file
24
apps/otel/otel-rbac.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: otel-collector
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["pods", "namespaces", "nodes"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["apps"]
|
||||
resources: ["deployments", "statefulsets", "daemonsets", "replicasets"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: otel-collector
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: otel-collector
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: otel-collector
|
||||
namespace: otel
|
||||
@@ -54,6 +54,15 @@ spec:
|
||||
send_batch_size: 2000
|
||||
send_batch_max_size: 2000
|
||||
timeout: 5s
|
||||
k8sattributes:
|
||||
extract:
|
||||
metadata:
|
||||
- k8s.namespace.name
|
||||
- k8s.pod.name
|
||||
- k8s.pod.start_time
|
||||
- k8s.pod.uid
|
||||
- k8s.deployment.name
|
||||
- k8s.node.name
|
||||
|
||||
exporters:
|
||||
debug:
|
||||
@@ -90,13 +99,13 @@ spec:
|
||||
pipelines:
|
||||
traces:
|
||||
receivers: [otlp]
|
||||
processors: [memory_limiter, batch]
|
||||
processors: [k8sattributes, memory_limiter, batch]
|
||||
exporters: [clickhouse]
|
||||
metrics:
|
||||
receivers: [otlp] #[otlp, hostmetrics]
|
||||
processors: [memory_limiter, batch]
|
||||
processors: [k8sattributes, memory_limiter, batch]
|
||||
exporters: [debug, clickhouse]
|
||||
logs:
|
||||
receivers: [otlp]
|
||||
processors: [memory_limiter, batch]
|
||||
processors: [k8sattributes, memory_limiter, batch]
|
||||
exporters: [clickhouse]
|
||||
|
||||
Reference in New Issue
Block a user