Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
belimawr opened this issue Feb 28, 2025 · 1 comment
Open
Labels
needs_team Indicates that the issue/PR needs a Team:* label

Comments

@belimawr
Copy link
Contributor

belimawr commented Feb 28, 2025

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
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Feb 28, 2025
@botelastic
Copy link

botelastic bot commented Feb 28, 2025

This issue doesn't have a Team:<team> label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_team Indicates that the issue/PR needs a Team:* label
Projects
None yet
Development

No branches or pull requests

1 participant