Logo K8s Opentelemetry Collector Troubleshooting

K8s Opentelemetry Collector Troubleshooting

Tổ chức
k8s-servant
k8s-opentelemetry-collector-troubleshooting

Dùng khi telemetry (trace, metric, log) không đi qua OpenTelemetry Collector trên Kubernetes: collector gặp sự cố khi khởi động ("invalid configuration", "references receiver ... which is not configured", "unknown type"); ứng dụng nhận lỗi "connection refused" trên cổng 4317 hoặc 4318 (receiver đang lắng nghe trên localhost hoặc không nằm trong pipeline); exporter gặp lỗi ("Exporting failed. Will retry the request after interval", "Exporting failed. Dropping data.", "sending queue is full", "no children to pick from"); memory_limiter từ chối dữ liệu; k8s_attributes thiếu RBAC; hoặc OpenTelemetry Operator không tạo collector hay không chèn auto-instrumentation. Kiểm tra bằng kubectl get, logs và metric riêng của collector, rồi đề xuất cách khắc phục. Chỉ đọc trước và hỏi bạn trước khi thay đổi bất cứ điều gì.

Tổng quan

Nhà phát hànhk8s-servant
Kho mãk8s-skills
Tên kỹ năngk8s-opentelemetry-collector-troubleshooting
Sao
36
Bản fork
7
Tệp đi kèm
2
Giấy phépApache-2.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 2 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được k8s-servant công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI K8s Opentelemetry Collector Troubleshooting trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/k8s-servant/k8s-skills/tree/main/skills/k8s-opentelemetry-collector-troubleshooting
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/k8s-servant/k8s-skills.git /tmp/k8s-skills
mkdir -p .claude/skills
cp -r /tmp/k8s-skills/skills/k8s-opentelemetry-collector-troubleshooting .claude/skills/k8s-opentelemetry-collector-troubleshooting
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật K8s Opentelemetry Collector Troubleshooting trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp K8s Opentelemetry Collector Troubleshooting ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng K8s Opentelemetry Collector Troubleshooting với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

OpenTelemetry Collector troubleshooting

Find out why telemetry does not pass through the OpenTelemetry Collector, and propose a fix. Read first, ask before changing. Run the investigation commands freely. Run a command under an "Ask first" line only after the user approves that exact command; if your credentials do not allow it, give it to the user to run. Never run a "Proposed fix"; hand it to the user.

A collector's config defines receivers (OTLP on 4317 for gRPC and 4318 for HTTP, Prometheus, ...), processors (memory_limiter, batch, k8s_attributes, ...), exporters (otlp_grpc, otlp_http, debug, ...) and extensions (health_check, ...), and then the service.pipelines that connect them. A component that no pipeline uses is not started at all, without a warning. The collector checks the config at start and exits with Error: ... when it is invalid. At run time it logs failed exports with the exporter's name and the error. Collectors often run as an agent (DaemonSet, sidecar) that forwards to a gateway (Deployment), so follow the data hop by hop.

The commands use placeholders: my-namespace, my-collector (the collector workload, its ConfigMap and Service), my-backend (where it exports to) and my-app (an application that sends telemetry). Replace them with the real names. Never read Secrets. Exporters and auth extensions can carry API keys and tokens in headers: read the receivers, the pipelines and each exporter's endpoint, never dump whole exporters or extensions blocks, and never repeat a header value. Do not use print-config: it resolves ${env:...} values, which may come from Secrets.

When to use

  • Traces, metrics or logs are missing at the backend.
  • The collector pods crash, restart, or are OOMKilled.
  • Applications log export errors to the collector (connection refused, timeouts).
  • The OpenTelemetry Operator's collector or auto-instrumentation does not appear.

Hand-offs, by skill name. When the evidence points elsewhere, continue with that skill; if it is not installed, keep going with the steps here and tell the user which skill would help:

  • The collector's Service has no endpoints, or a NetworkPolicy blocks it: k8s-network-troubleshooting.
  • The backend refuses the data (Loki 400 or 429, Prometheus remote write errors): k8s-loki-troubleshooting, k8s-prometheus-troubleshooting.
  • k8s_attributes or the operator is refused by RBAC: k8s-rbac-troubleshooting.
  • The operator's webhook certificate comes from cert-manager and is not issued: k8s-cert-manager-troubleshooting.

Investigate

Work through the steps in order. Stop when you have the cause and its evidence.

1. See the collector and the application. A crash points to the config; an application error names what it could not reach.

bash
kubectl get pods -n my-namespace -o wide
kubectl logs -n my-namespace deployment/my-app --tail=20
kubectl get services,endpointslices -n my-namespace

2. Read the collector's log, current and before the last restart: config errors, the endpoints its receivers listen on (Starting GRPC server, Starting HTTP server), and export failures.

bash
kubectl logs -n my-namespace deployment/my-collector --tail=100
kubectl logs -n my-namespace deployment/my-collector --previous --tail=30
kubectl logs -n my-namespace deployment/my-collector --tail=500 | grep -E 'error|warn|Starting (GRPC|HTTP) server|Exporting failed'

3. Read the config's pipelines, receivers and exporter endpoints, not the whole config.

bash
kubectl get deployment my-collector -n my-namespace -o jsonpath='{.spec.template.spec.containers[0].args}{"\n"}{range .spec.template.spec.volumes[*]}{.name}{" "}{.configMap.name}{.secret.secretName}{"\n"}{end}'
kubectl get configmap my-collector -n my-namespace -o jsonpath='{.data.config\.yaml}' | grep -E '^ *(receivers|exporters|processors|pipelines|protocols|grpc|http|endpoint|traces|metrics|logs):'

4. If the OpenTelemetry Operator manages the collector, read its resource and its status.

bash
kubectl get opentelemetrycollectors,instrumentations -A
kubectl get opentelemetrycollector my-collector -n my-namespace -o jsonpath='{.spec.mode}{" "}{.spec.image}{"\n"}{.spec.config.service}{"\n"}{range .status.conditions[*]}{.type}={.status} {.reason}: {.message}{"\n"}{end}'
kubectl get events -n my-namespace --field-selector involvedObject.kind=OpenTelemetryCollector

5. Open the matching reference and follow its steps:

What you seeReference
A crash at start, config errors, components not in a pipeline, localhost receivers, ports and protocolsreferences/config-and-receivers.md
Export failures, retries, queues, memory_limiter, k8s_attributes, internal metrics, the operator and auto-instrumentationreferences/export-and-operator.md

Read the results

What the common findings mean (collector 0.163):

  • Error: invalid configuration: service::pipelines::logs: references receiver "otlp/app" which is not configured: a pipeline names a component that has no definition (a typo, or a missing /name suffix). The collector exits; CrashLoopBackOff.
  • unknown type: "..." for id: "..." (valid values: [...]): a component type this distribution does not include, or a misspelled one. The core image has fewer components than contrib and k8s.
  • Applications get connection refused from the collector's Service, and the log shows Starting GRPC server {"endpoint": "127.0.0.1:4317"} (or no such line for that receiver): the receiver listens on localhost only; 0.0.0.0 shows as [::]:4317. Since v0.104.0 the OTLP receiver defaults to localhost; in Kubernetes it needs endpoint: 0.0.0.0:4317 (or the pod IP). A receiver missing from every pipeline gives the same symptom and logs no Starting line at all.
  • Exporting failed. Will retry the request after interval. with "error": "rpc error: code = Unavailable desc = no children to pick from": the gRPC exporter's endpoint resolves to no address (a misspelled or missing Service); gRPC does not say "no such host". connection refused or context deadline exceeded instead means the name resolves but nothing answers (the backend is down, a wrong port, a NetworkPolicy). Logged at info level; data waits in the queue until retries run out (Dropping data., no more retries left).
  • Exporting failed. Rejecting data. with sending queue is full: the backend is too slow or down for longer than the queue holds.
  • Memory usage is above soft limit. Refusing data.: the memory_limiter protects the collector; senders get data refused due to high memory usage and retry.

State the cause in one sentence, then the evidence you saw (the log line, the config entry, the application's error), then the proposed fix.

Proposed fix

Show each fix to the user before running it: what it changes and how to undo it. A collector's config is shared by every application that sends to it: never change it yourself; hand it to the user as a proposed fix. Prefer fixing the source (the Helm values, the OpenTelemetryCollector resource, the manifest in Git). The collector reads its config at start, so a changed ConfigMap needs a restart (the operator rolls its collectors itself). Write each undo with the values you found.

Fix the config in its source, apply it and restart the collector:

Proposed fix: review before running. The agent does not run this.

bash
kubectl apply -f my-collector-config.yaml
kubectl rollout restart deployment/my-collector -n my-namespace
# Undo: kubectl apply -f my-collector-config-before.yaml, then restart my-collector again

Once the collector works, restart an application whose client gave up, so it retries:

Ask first: the agent runs this only after the user approves it.

bash
kubectl rollout restart deployment/my-app -n my-namespace
# Undo: none needed; the restart only recreates the pods with the same template

Sources

Checked against the OpenTelemetry documentation and the collector source (core and contrib v0.163.0, distribution v0.163.2) and the operator v0.162.0:

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI K8s Opentelemetry Collector Troubleshooting làm được gì?

Dùng khi telemetry (trace, metric, log) không đi qua OpenTelemetry Collector trên Kubernetes: collector gặp sự cố khi khởi động ("invalid configuration", "references receiver ... which is not configured", "unknown type"); ứng dụng nhận lỗi "connection refused" trên cổng 4317 hoặc 4318 (receiver đang lắng nghe trên localhost hoặc không nằm trong pipeline); exporter gặp lỗi ("Exporting failed. Will retry the request after interval", "Exporting failed. Dropping data.", "sending queue is full", "no children to pick from"); memory_limiter từ chối dữ liệu; k8s_attributes thiếu RBAC; hoặc OpenTele...

Vì sao nên dùng K8s Opentelemetry Collector Troubleshooting trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. K8s Opentelemetry Collector Troubleshooting là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài K8s Opentelemetry Collector Troubleshooting trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/k8s-servant/k8s-skills/tree/main/skills/k8s-opentelemetry-collector-troubleshooting. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng K8s Opentelemetry Collector Troubleshooting?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng K8s Opentelemetry Collector Troubleshooting với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng K8s Opentelemetry Collector Troubleshooting với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI K8s Opentelemetry Collector Troubleshooting có miễn phí không?

Có. Kỹ năng này được k8s-servant phát hành trên GitHub theo giấy phép Apache-2.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇