2026-01-27同步
This commit is contained in:
57
OpenTelemetry/Collector_v3/05-otel-gateway.yaml
Normal file
57
OpenTelemetry/Collector_v3/05-otel-gateway.yaml
Normal file
@@ -0,0 +1,57 @@
|
||||
apiVersion: opentelemetry.io/v1beta1
|
||||
kind: OpenTelemetryCollector
|
||||
metadata:
|
||||
name: otel-gateway
|
||||
namespace: monitoring
|
||||
spec:
|
||||
mode: deployment
|
||||
image: otel/opentelemetry-collector-contrib:0.144.0
|
||||
replicas: 1
|
||||
serviceAccount: otel-collector-sa
|
||||
env:
|
||||
- name: K8S_NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
config:
|
||||
receivers:
|
||||
otlp:
|
||||
protocols:
|
||||
grpc:
|
||||
endpoint: 0.0.0.0:4317
|
||||
http:
|
||||
endpoint: 0.0.0.0:4318
|
||||
k8s_cluster:
|
||||
collection_interval: 30s
|
||||
k8s_events: {}
|
||||
|
||||
processors:
|
||||
batch:
|
||||
send_batch_size: 1000
|
||||
timeout: 10s
|
||||
resourcedetection:
|
||||
detectors: [env, system, k8snode]
|
||||
|
||||
exporters:
|
||||
debug:
|
||||
verbosity: detailed
|
||||
|
||||
otlp_http/prometheus:
|
||||
endpoint: "http://10.0.0.38:9090/api/v1/otlp"
|
||||
|
||||
elasticsearch:
|
||||
endpoints: ["http://10.0.0.38:9200"]
|
||||
logs_index: "k8s-test-cluster-events"
|
||||
user: "elastic"
|
||||
password: "-0NiIBOJGn2CATuPWzNc"
|
||||
|
||||
service:
|
||||
pipelines:
|
||||
metrics:
|
||||
receivers: [otlp, k8s_cluster]
|
||||
processors: [resourcedetection, batch]
|
||||
exporters: [otlp_http/prometheus]
|
||||
logs:
|
||||
receivers: [k8s_events]
|
||||
processors: [batch]
|
||||
exporters: [elasticsearch, debug]
|
||||
Reference in New Issue
Block a user