Skip to content

Missing input ID warning is emitted for all inputs when using autodiscover #42969

Open
@belimawr

Description

The missing input ID warning meant for the Filestream input is being emitted to all inputs without an ID whenever autodiscover is used.

This is just a log warning, the input is started as expected.

Steps to Reproduce:

  1. Start Filebeat with the following configuration
    filebeat.autodiscover.providers:
      - type: docker
        hints.enabled: true
        hints.default_config:
          type: log
          paths:
            - /tmp/flog.log
          fields:
            foo: ${data.container.id}
    
    queue.mem:
      flush.timeout: 0
    
    output.discard:
      enabled: true
  2. You will see the following warning log
{
  "log.level": "warn",
  "@timestamp": "2025-02-28T16:36:19.405-0500",
  "log.logger": "input",
  "log.origin": {
    "function": "github.com/elastic/beats/v7/filebeat/input/v2/compat.(*factory).CheckConfig",
    "file.name": "compat/compat.go",
    "file.line": 81
  },
  "message": "input V2 factory.CheckConfig failed to clone config before checking it. Original config will be checked, it might trigger an input duplication warning: failed to get 'id': missing field accessing 'id'",
  "service.name": "filebeat",
  "original_config": "{\n  \"fields\": {\n    \"foo\": \"d5062d3af164a2a57d0e9bed5c201dc7a7e0f6814a59665b0973d8fba35fe432\"\n  },\n  \"paths\": [\n    \"/tmp/flog.log\"\n  ],\n  \"type\": \"log\"\n}",
  "ecs.version": "1.6.0"
}

Workaround

While this is just a log warning and the input is still started as expected. The log warning can be ignored or if you want to suppress it, just add and ID to every input. For the example reproducing it will look like:

filebeat.autodiscover.providers:
  - type: docker
    hints.enabled: true
    hints.default_config:
      type: log
      id: foo-bar-${data.container.id}
      paths:
        - /tmp/flog.log
      fields:
        foo: ${data.container.id}

queue.mem:
  flush.timeout: 0

output.discard:
  enabled: true

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs_teamIndicates that the issue/PR needs a Team:* label

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions