Network community_id processor for ingest pipelines#66534
Network community_id processor for ingest pipelines#66534danhermann merged 4 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/es-core-features (Team:Core/Features) |
|
@andrewkroh, I would appreciate a look at this to see if it meets the criteria for #55685. I did replicate all the unit tests for the Beats community_id processor to verify that this processor produces the same values, so I'm reasonably confident about it in that regard. |
|
cc: @elastic/es-ui in case Kibana auto-complete needs to be updated with this new processor. |
|
Thanks @danhermann. I've opened elastic/kibana#86321 to track changes needed in Kibana. Can you also share the available options for this processor? |
Yes, I'll open a separate PR with the docs for this processor that will include all its available options. I'll tag you on that one when I open it. |
andrewkroh
left a comment
There was a problem hiding this comment.
This looks great. Just a minor comment from me.
|
|
||
| Flow flow = new Flow(); | ||
| try { | ||
| flow.source = InetAddress.getByName(sourceIpAddrString); |
There was a problem hiding this comment.
I'm worried that this could potentially perform network calls to lookup IP addresses from names.
Luckily we have a utility for this that's safe. Can you use that package here?
| return transportNumber; | ||
| } | ||
|
|
||
| public static Transport fromNumber(int transportNumber) { |
There was a problem hiding this comment.
Not sure if this is a worth it, so feel free to ignore. To ensure that fromNumber stays up-to-date with all the enum transportNumbers it might be useful to have test that checks the all the Transport.values() work with fromNumber without exception.
|
@alisonelizabeth, the processor's options are documented here: #66592 |
Thanks, @andrewkroh! I've made both changes that you suggested. |
martijnvg
left a comment
There was a problem hiding this comment.
For processors added in ingest-common module there is a yaml test (Ingest common installed) that ensures that processors are correct wired up. Maybe we should have such a test for the xpack ingest module as well? Then we verify that uri_parts and community_id processors have correctly been wired up and can be used in pipelines.
Ingest integration LGTM.
| import static org.elasticsearch.ingest.ConfigurationUtils.newConfigurationException; | ||
| import static org.elasticsearch.ingest.ConfigurationUtils.readBooleanProperty; | ||
|
|
||
| public class CommunityIdProcessor extends AbstractProcessor { |
|
@elasticmachine update branch |
|
Thanks, @martijnvg! I'll open another PR with the module yaml test that you suggested. |
Adds a processor that computes the community_id for flow data according to the Community ID Specification.
For example:
populates the
network.community_idfield as below:Closes #55685