aliyun/alibabacloud-aiops-skills/alibabacloud-elasticsearch-log-config-generator

Claude Code and agent skill by aliyun/alibabacloud-aiops-skills

Trust tier 3
  • community
  • ext:[{"type":"config","description":"Configuration overrides"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when the user needs to generate a log collection configuration file (OpenTelemetry Collector or Elastic Beats / Filebeat) that writes logs to Alibaba Cloud Elasticsearch or self-managed Elasticsearch. Covers file logs, log API ingestion (OTLP / HTTP webhook), and Kafka log topics. Also matches natural requests such as: write a filebeat.yml, generate an otelcol config, send logs to ES, collect nginx or Java application logs to Elasticsearch, or sync Kafka logs to ES. Always output one configuration file targeting Elasticsearch; never mix technology stacks or emit non-ES outputs.

Install

npx vskill@latest install aliyun/alibabacloud-aiops-skills/alibabacloud-elasticsearch-log-config-generator

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as aliyun/alibabacloud-aiops-skills/alibabacloud-elasticsearch-log-config-generator.

Log Collection Configuration Generator (Elasticsearch)

Scope

This skill generates exactly one valid configuration file that collects log data and sends it to Elasticsearch. It supports two technology stacks, and each request must choose exactly one:

  • OpenTelemetry Collector (otelcol-contrib) - use filelogreceiver, otlpreceiver, or kafkareceiver with elasticsearchexporter.
  • Elastic Beats / Filebeat - use filestream, kafka, or http_endpoint input with output.elasticsearch.
Hard Constraints
  1. Generate only one configuration per request. Do not concatenate or batch multiple configurations.
  2. Use exactly one technology stack. Never mix OpenTelemetry components and Filebeat sections in the same file.
  3. Confirm before generating. Do not generate YAML until the user has answered the Step 1 technology stack confirmation question in a separate reply.
  4. The output must be Elasticsearch. Never use Kafka, S3, Logstash-only, files, or any other non-Elasticsearch destination as the final output.
  5. Logs only. Inputs must be log-shaped sources: files, log webhooks, or Kafka topics that contain logs. If the user asks for a clearly different non-log input, refuse and explain why.
  6. No Syslog or Fluent forward input sources. Do not generate collector or Filebeat listener configurations for Syslog or Fluent forward protocols. If the user asks for Syslog or Fluent forward as the source, refuse and ask them to choose file, OTLP, HTTP webhook, or Kafka log ingestion instead.
  7. Use local knowledge first. Authoritative references live in the references/ directory next to this SKILL.md. When a component option is covered locally, do not search the web; read the matching file under references/.
  8. Keep the design minimal. Generate only fields requested by the user or required for the file to load. For common but optional features such as batching, retries, or ILM, recommend them and wait for explicit user confirmation before adding them.
  9. Never inline secrets. Reference all secrets through ${env:VAR} for OTel or ${VAR} for Filebeat.

Local References (Prefer Over Web Search)

Before writing YAML, read the matching file under references/ to verify field names and defaults. The list below is complete. If the required option is not covered, ask the user before writing it.

Security And RAM Permissions
  • references/ram-policies.md - declares required_permissions for Alibaba Cloud RAM review.
OpenTelemetry Collector - references/opentelemetry/

Components:

  • 01-configuration-basics.md - top-level structure, pipelines, environment variables, TLS.
  • 02-filelogreceiver.md - file tailing: include/exclude, multiline, operators, storage.
  • 03-elasticsearchexporter.md - endpoint/endpoints/cloudid, authentication, mapping mode, index, sending_queue.
  • 04-kafkareceiver.md - Kafka log ingestion, SASL, encoding.
  • 05-otlpreceiver.md - OTLP gRPC/HTTP log endpoints.
  • 06-batchprocessor.md - batching.
  • 07-attributesprocessor.md - add/delete/mask/extract attributes, log filtering.
  • 08-resourcedetectionprocessor.md - host, cloud, and k8s metadata.
  • 09-transformprocessor.md - OTTL transforms, including setting elastic.mapping.mode.
  • 12-filestorage-extension.md - persistent offsets and queues.

Transitive references used by the components above and already localized under hard constraint #5:

  • 13-confighttp.md - shared HTTP client/server configuration: compression algorithms gzip/zstd/snappy/zlib/deflate/lz4, compression_params.level, headers, timeouts, keep-alive, CORS, maximum body size. Used by elasticsearchexporter and otlpreceiver/http.
  • 14-configtls.md - TLS settings: ca_file, cert_file, key_file, min_version, insecure_skip_verify, mTLS client_ca_file, TPM. Used by confighttp and configgrpc.
  • 15-configauth.md - authentication extension wiring with auth.authenticator: <ext-name> and common client/server authentication extensions.
  • 16-configgrpc.md - gRPC client/server settings: max_recv_msg_size_mib, keepalive, compression, balancer_name. Used by otlpreceiver/grpc.
  • 17-exporterhelper.md - sending_queue, including persistent queues with storage, retry_on_failure, timeout, and batcher. Inherited by elasticsearchexporter.
  • 18-ottl-overview.md - OpenTelemetry Transformation Language (OTTL) overview, statements, and contexts. Used by transformprocessor and filterprocessor.
  • 19-ottl-functions.md - OTTL syntax and the full editor/converter catalog: set, replace_pattern, IsMatch, ParseJSON, and more.
  • 20-ottl-log-paths.md - ottllog context paths such as log.body, log.severity_number, attributes, and SEVERITY_NUMBER_* enums.
  • 21-stanza-operators-overview.md - operator catalog and shared fields. Used in the operators: block of filelogreceiver.
  • 22-stanza-json_parser.md - JSON parser operator, including embedded timestamp: and severity:.
  • 23-stanza-regex_parser.md - regex parser with named captures.
  • 24-stanza-recombine.md - multiline recombination for stack traces and records with date prefixes.
  • 25-stanza-timestamp.md - strptime, gotime, epoch layouts, and timezone handling.
  • 26-stanza-severity.md - severity tokens and mapping syntax.
  • 36-stanza-key_value_parser.md - key-value parser operator: delimiter, pair_delimiter.
  • 37-stanza-csv_parser.md - CSV parser with static or dynamic headers, lazy_quotes, and ignore_quotes.
  • 38-stanza-container.md - container runtime parser: auto, docker, crio, containerd; extracts K8s metadata from file paths.
  • 39-resourcedetection-detectors.md - option tables for detectors such as env, ec2, eks, aks, k8snode, kubeadm, gcp, azure, docker, openshift, and heroku; companion to 08-resourcedetectionprocessor.md.
  • 40-auth-extensions.md - basicauth, bearertokenauth, and headers_setter extensions, wired through 15-configauth.md.

Common processors and connectors to load only when the user asks for the related capability:

  • 27-memorylimiterprocessor.md - memory_limiter; must be first in every pipeline. Covers check_interval, limit_mib, spike_limit_mib, and soft/hard limit behavior.
  • 28-filterprocessor.md - drop logs by OTTL conditions: log_conditions, error_mode, contexts.
  • 29-k8sattributesprocessor.md - enrich logs with K8s pod, namespace, and node metadata: auth_type, passthrough, extract.metadata, pod_association; includes RBAC snippets.
  • 30-redactionprocessor.md - allow-listed fields plus regex masking or hashing: allowed_keys, blocked_values, hash_function.
  • 31-resourceprocessor.md - lightweight resource attribute operations: INSERT/UPDATE/UPSERT/DELETE/HASH/EXTRACT, from_attribute, from_context.
  • 32-groupbyattrsprocessor.md - regroup log records by matching Resource attributes with keys; an empty list compacts records.
  • 33-logdedupprocessor.md - merge duplicate logs within a window: interval, log_count_attribute, conditions, include_fields/exclude_fields.
  • 34-routingconnector.md - route to multiple downstream pipelines. This is a connector, not a processor, and replaces the deprecated routingprocessor.
Filebeat - references/beats/

Components:

  • 01-filebeat-configuration-overview.md - top-level layout and validation commands.
  • 02-input-filestream.md - modern file input: id, paths, parsers, file_identity.
  • 03-input-kafka.md - Kafka input.
  • 04-input-http_endpoint.md - HTTP webhook input.
  • 05-output-elasticsearch.md - ES output, ILM interaction, conditional indexes, preset, conditional pipelines: mapping.
  • 06-processors.md - overview, ordering, when: filters, common processor catalog.
  • 07-ssl.md - TLS / mTLS.
  • 08-ilm.md - ILM policy management.
  • 09-template.md - index templates.
  • 14-filebeat-general-settings.md - top-level settings: name, tags, fields, fields_under_root, processors, max_procs, timestamp.precision.

Processors, deep reference:

  • 13-filebeat-processors-detail.md - option tables for the most common processors: add_host_metadata, add_cloud_metadata, add_kubernetes_metadata with RBAC, add_docker_metadata, decode_json_fields, dissect with tokenizer modifiers, timestamp with Go layouts, fingerprint, script, drop_event, and the field modification family: add_fields, drop_fields, rename, copy_fields, convert, truncate_fields, urldecode, replace, extract_array.
  • 15-filebeat-processors-extra.md - community_id, decode_xml, decode_cef, decompress_gzip_field, registered_domain, append, move_fields, add_observer_metadata off-host.

Filestream parsers to load when parsers: is needed under 02-input-filestream.md:

  • 16-filestream-parsers.md - multiline with pattern / count / while_pattern, ndjson, container with auto / docker / cri, and include_message; includes combined stack examples.

Transitive references:

  • 11-conditions.md - processor when: / if: condition syntax: equals, contains, regexp, range, network, has_fields, or/and/not.
  • 12-internal-queue.md - queue.mem default and queue.disk settings, capacity tuning knobs.
  • 17-setup-and-monitoring.md - setup.kibana, logging.* including file rotation and systemd journald defaults, monitoring.* internal collection, and http.* status endpoints.
Templates - assets/templates/

When a template matches the user's requested input, prefer modifying that template instead of writing from scratch:

  • otel-filelog-to-es.yaml
  • otel-kafka-to-es.yaml
  • otel-otlp-to-es.yaml
  • filebeat-filestream-to-es.yaml
  • filebeat-kafka-to-es.yaml
  • filebeat-http_endpoint-to-es.yaml

Required Workflow

Execute the following steps in order. Do not skip steps. If any required parameter is unknown at a step, ask the user explicitly at that step.

Step 1 - Choose The Technology Stack

Ask the user:

Which collection configuration do you want to generate? (1) OpenTelemetry Collector (2) Elastic Filebeat. Choose exactly one; this request will produce one configuration file.

Wait for an explicit answer in a separate user reply. Even if the initial user request names Filebeat, OpenTelemetry, filebeat.yml, otelcol, or a stack-specific input, do not treat that as the Step 1 confirmation.

Do not generate YAML in the same response that asks for the technology stack confirmation. Stop after the question above unless the current conversation already contains a direct answer to that confirmation question from an earlier turn.

Step 2 - Determine The Log Input Source

Ask for the applicable input. Allowed log inputs by stack:

Technology stackAllowed inputs
OpenTelemetryfilelog (file), otlp (gRPC/HTTP log API), kafka (log topic)
Filebeatfilestream (file), kafka (log topic), http_endpoint (webhook)

If the user asks for another type, such as database input, prometheus metrics, or vmware events, refuse and explain that it is outside this skill's log collection scope.

Collect the minimum required fields:

  • Files: absolute glob path; whether to backfill existing content (start_at: beginning / first-start behavior); multiline pattern if needed.
  • OTLP: listen address and port; whether TLS or an authentication extension is required.
  • Kafka: brokers, topic(s), protocol_version, group_id, authentication with SASL mechanism and credentials, TLS.
  • HTTP webhook: listen port, URL path, authentication with basic / shared header / HMAC, TLS.
Step 3 - Determine The Elasticsearch Destination

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
225
Repository forks
28
7-day trend score
27

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 30 Aug 2026, 3 months ago.

Extension points

  • configConfiguration overrides

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/aliyun/alibabacloud-aiops-skills/alibabacloud-elasticsearch-log-config-generator/badge)](https://verified-skill.com/skills/aliyun/alibabacloud-aiops-skills/alibabacloud-elasticsearch-log-config-generator)

Something wrong with this skill or its page? Tell us.