[8.19](backport #47905) [Filebeat] Correctly report V2 inputs as failed to the Manager #48058
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed commit message
Checklist
stresstest.shscript to run them under stress conditions and race detector to verify their stability../changelog/fragmentsusing the changelog tool.## Disruptive User Impact## Author's ChecklistHow to test this PR locally
Run the tests
Manual test
1. Download Elastic Agent snapthost
Make sure to download the latest snapshot in the correct version for your OS/Architecture
2. Build Agentbeat
3. Extract Elastic Agent and copy the Agentbeat binary
4. Copy the Agentbeat binary you built, replacing the one from the archive
5.Create a log file for Filestream to ingest
Using flog
6.Create the
elastic-agent.ymlThe connection credentials to Elasticsearch are irrelevant, no data will be shipped, so they can point to an inexistent Elasticsearch host.
elastic-agent.yml
7.Look for the logs showing Filestream and Cel input failing
Filestream:
{ "@timestamp": "2025-12-08T09:56:57.403-0500", "component": { "id": "filestream-default", "state": "HEALTHY" }, "ecs.version": "1.6.0", "log": { "source": "elastic-agent" }, "log.level": "warn", "log.origin": { "file.line": 1040, "file.name": "coordinator/coordinator.go", "function": "github.com/elastic/elastic-agent/internal/pkg/agent/application/coordinator.logComponentStateChange" }, "message": "Unit state changed filestream-default-filestream-unit-id (HEALTHY->DEGRADED): Harvester for Filestream input \"filestream-input-id\" failed: error while connecting to output with pipeline: unexpected INVALID_CONFIG_KEY option in processors.6.add_fields", "unit": { "id": "filestream-default-filestream-unit-id", "old_state": "HEALTHY", "state": "DEGRADED", "type": "input" } }Cel:
{ "@timestamp": "2025-12-08T09:56:57.761-0500", "component": { "id": "cel-default", "state": "HEALTHY" }, "ecs.version": "1.6.0", "log": { "source": "elastic-agent" }, "log.level": "error", "log.origin": { "file.line": 1040, "file.name": "coordinator/coordinator.go", "function": "github.com/elastic/elastic-agent/internal/pkg/agent/application/coordinator.logComponentStateChange" }, "message": "Unit state changed cel-default-cel-unit-id (HEALTHY->FAILED): Input 'cel' failed with: input cel-input-id failed: unexpected INVALID_CONFIG_KEY option in processors.6.add_fields", "unit": { "id": "cel-default-cel-unit-id", "old_state": "HEALTHY", "state": "FAILED", "type": "input" } }8.Look at the Elastic Agent status
The Filestream input must be in a degraded state and Cel in a failed state. Both inputs must have errored with
Related issues
## Use cases## Screenshots## LogsThis is an automatic backport of pull request #47905 done by Mergify.