-
Notifications
You must be signed in to change notification settings - Fork 160
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
No data for Kafka output under topic for System integration. #4254
Comments
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
FYI @cavokz |
@manishgupta-qasource Please review. |
Secondary review for this ticket is Done |
@amolnater-qasource I wanted to double-check that's not due to something broken on the kafka server side, although no new developments happened actually. I quickly tried steps 1 and 2 (only with user/pass auth, not TLS client certificate or unauthenticated accesses). With 8.12.1 things are working as I left them about one month ago whereas with 8.13-snapshot indeed they are not. |
elastic/beats#37902 removed supports for the Use of the outputs:
242deaa3-241e-4e06-b526-22b6903b1ce0:
broker_timeout: 30
client_id: Elastic
compression: none
headers: []
hosts:
- amol-nater-kafka.qasource.elastic.dev:9094
partition:
random:
group_events: 1
required_acks: 1
ssl:
certificate: <REDACTED>
key: <REDACTED>
verification_mode: full
timeout: 30
topics:
- topic: qastest
type: kafka
version: 2.6.0 The only place you can detect this error is in the logs, which look like they actually create the Kafka output but with an empty topic. This is not an intuitive way to fail. @belimawr can we get creating the output to fail completely instead? {"log.level":"error","@timestamp":"2024-02-14T10:56:12.479Z","message":"Dropping event: no topic could be selected","component":{"binary":"filebeat","dataset":"elastic_agent.filebeat","id":"log-242deaa3-241e-4e06-b526-22b6903b1ce0","type":"log"},"log":{"source":"log-242deaa3-241e-4e06-b526-22b6903b1ce0"},"ecs.version":"1.6.0","log.logger":"kafka","log.origin":{"file.line":172,"file.name":"kafka/client.go","function":"github.com/elastic/beats/v7/libbeat/outputs/kafka.(*client).Publish"},"service.name":"filebeat","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2024-02-14T10:56:12.479Z","message":"Dropping event: no topic could be selected","component":{"binary":"filebeat","dataset":"elastic_agent.filebeat","id":"log-242deaa3-241e-4e06-b526-22b6903b1ce0","type":"log"},"log":{"source":"log-242deaa3-241e-4e06-b526-22b6903b1ce0"},"log.logger":"kafka","log.origin":{"file.line":172,"file.name":"kafka/client.go","function":"github.com/elastic/beats/v7/libbeat/outputs/kafka.(*client).Publish"},"service.name":"filebeat","ecs.version":"1.6.0","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2024-02-14T10:56:12.479Z","message":"Dropping event: no topic could be selected","component":{"binary":"filebeat","dataset":"elastic_agent.filebeat","id":"log-242deaa3-241e-4e06-b526-22b6903b1ce0","type":"log"},"log":{"source":"log-242deaa3-241e-4e06-b526-22b6903b1ce0"},"ecs.version":"1.6.0","log.logger":"kafka","log.origin":{"file.line":172,"file.name":"kafka/client.go","function":"github.com/elastic/beats/v7/libbeat/outputs/kafka.(*client).Publish"},"service.name":"filebeat","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2024-02-14T10:56:12.479Z","message":"Dropping event: no topic could be selected","component":{"binary":"filebeat","dataset":"elastic_agent.filebeat","id":"log-242deaa3-241e-4e06-b526-22b6903b1ce0","type":"log"},"log":{"source":"log-242deaa3-241e-4e06-b526-22b6903b1ce0"},"service.name":"filebeat","ecs.version":"1.6.0","log.logger":"kafka","log.origin":{"file.line":172,"file.name":"kafka/client.go","function":"github.com/elastic/beats/v7/libbeat/outputs/kafka.(*client).Publish"},"ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2024-02-14T10:56:12.479Z","message":"Dropping event: no topic could be selected","component":{"binary":"filebeat","dataset":"elastic_agent.filebeat","id":"log-242deaa3-241e-4e06-b526-22b6903b1ce0","type":"log"},"log":{"source":"log-242deaa3-241e-4e06-b526-22b6903b1ce0"},"log.logger":"kafka","log.origin":{"file.line":172,"file.name":"kafka/client.go","function":"github.com/elastic/beats/v7/libbeat/outputs/kafka.(*client).Publish"},"service.name":"filebeat","ecs.version":"1.6.0","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2024-02-14T10:56:12.479Z","message":"Dropping event: no topic could be selected","component":{"binary":"filebeat","dataset":"elastic_agent.filebeat","id":"log-242deaa3-241e-4e06-b526-22b6903b1ce0","type":"log"},"log":{"source":"log-242deaa3-241e-4e06-b526-22b6903b1ce0"},"log.origin":{"file.line":172,"file.name":"kafka/client.go","function":"github.com/elastic/beats/v7/libbeat/outputs/kafka.(*client).Publish"},"service.name":"filebeat","ecs.version":"1.6.0","log.logger":"kafka","ecs.version":"1.6.0"} I think if we failed creating the output it would also show as unhealthy in the agent component state, right now it is healthy but non-functional which is obviously confusing. - id: log-242deaa3-241e-4e06-b526-22b6903b1ce0
state:
message: 'Healthy: communicating with pid ''17099'''
state: 2
units:
input-log-242deaa3-241e-4e06-b526-22b6903b1ce0-logfile-system-1c348fe2-55ff-42c1-99c6-4558df1c6cab:
message: Healthy
state: 2
output-log-242deaa3-241e-4e06-b526-22b6903b1ce0:
message: Healthy
state: 2 |
Hi @cavokz We have revalidated Kafka with SSL auth on 8.12.1 and found this issue reproducible there too. Observations:
However, it is sending data for System integration when configured with Kafka Username/Password auth, also confirmed by you too. Agent Logs: Please let us know if we are missing anything here. |
TL;DR: Yes, we can add some validation for empty string as topic. Long answer: However, I cannot validate is whether the topic is valid. A topic like When working on my PR I tried to find the topic name restrictions, but the best I could find was a StackOverflow pointing to the source code: https://stackoverflow.com/questions/37062904/what-are-apache-kafka-topic-name-limitations |
The I looked at your diagnostics and the Kafka cluster is not reachable:
It looks like the host configuration you have is incorrect. Looking at the diagnostics that is what is configured:
Is that the correct host and port? Is Kafka running? |
@belimawr Yes, that is the correct host and port where kafka is running. If we are adding Elastic Defend we are getting the data for same configuration. |
I tried the System integration on 8.12.0 with all the three authentication methods, I see output coming in all the three cases. I'll check again 8.12.1 but so far the testing infra seems to work as expected. |
That's interesting. Well the logs clearly show connection issues from Filebeat and Metricbeat to Kafka, we just need to find out why this is happening. One thing that you can do to test is to get the There are some small modifications needed, using
Then you can stop the Elastic-Agent, go to
It will log to stdout/stderr That should help troubleshoot any communication issues with the output. |
👍 assigning this to @belimawr to make this change. |
Hi Team, Observations:
Agent Logs: Build details: Please let us know if we are missing anything here. |
@nfritts could someone from your team investigate the Endpoint degraded state please? |
Yep, I'll see if @brian-mckinney can take a look at it. |
I just took a deep look at this. The diagnostics did not contain the endpoint log for some reason, but it did contain the configuration and the policy response which was enough to figure out the problem. We were not aware that the behavior of the output changed on beats, and Endpoint still looks for the I will put in a PR today to fix this on our end and link it here when I do. |
Endpoint PR: https://github.com/elastic/endpoint-dev/pull/14244 |
Hi Team, We have revalidated this issue on latest 8.13.0 BC4 kibana cloud environment and found it fixed now. Observations:
Build details: Hence, we are closing this issue and marking as QA:Validated. |
Kibana Build details:
Host OS: Linux
Preconditions:
Steps to reproduce:
Earlier was working fine under Kafka output error is displayed for Elastic Defend on 8.12.0 BC2. #3936 (comment)
kafka-topic.txt
Related to previous issue:
#3936
Screenshot:

Expected Result:
Data under Kafka topic for System integration should be available.
Logs:
elastic-agent-diagnostics-2024-02-14T11-01-47Z-00.zip
The text was updated successfully, but these errors were encountered: