-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Packetbeat includes nil IP fields when a DNS query is interrupted #21495
Comments
Pinging @elastic/siem (Team:SIEM) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Possible revisit this on 7.X roadmap? |
Just stumbled upon the same issue |
|
In the case of an incomplete response, miekg/dns allows an empty IP to be packed into an answer; case 0 below:
The converse is also true, meaning that we can receive an empty IP in an answer. This is then rendered as Given that the record is a dropped repetition, I think it's reasonable to omit the IP from the record. It would be good if someone who has seen this on their installations could confirm that the successful query is actually indexed. |
This problem does not only occur in case of an dropped repetition, I also see it in other cases but haven't found a explanation yet. But it seems to me that if a clients tries method:UPDATE and he's not authorized for that, that it leads also to this behaviour. For example:
I've seen such indexing errors also with the 'related.ip' field. To me it looks like it would be reasonable to remove any field which is mapped as IP adress if does not contain a valid IP address. |
I don't find the "method" field in the documentation by the way... |
Thanks for providing that. The places in that output look like pretty reasonable places to have a non-present IP. The change I have prepared will prevent those from being emitted. I will look into the documentation. |
There are situations with DNS packets, that Packetbeat includes null IP fields in the documents, causing mapping errors when ingesting in Elasticsearch.
This has been reported with events that contain the message
Another query with the same DNS ID from this client was received so this query was closed without receiving a response
.In this case it seems that Packetbeat is including a
resolved_ip
field with a list with a single nil value ("resolved_ip": [ "<nil>" ]
), and also a<nil>
value in therelated.ip
field.This causes errors like
failed to parse field [dns.resolved_ip] of type [ip] in document with id 'EcpU5XQBHte-Y-A36w7t'. Preview of field's value: '<nil>'", "caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"'<nil>' is not an IP string literal.
The text was updated successfully, but these errors were encountered: