Skip to content

Conversation

@andrewkroh
Copy link
Member

@andrewkroh andrewkroh commented Oct 10, 2024

Add ingest processor definitions for community_id, fingerprint, network_direction, and registered_domain processors. All parameters and descriptions were scraped from the 8.16 docs.

Add ip to the list of types supported by the convert processor.

Add ecs_compatibility to grok processor.

Add output_format to date processor.

Related issues

@github-actions
Copy link
Contributor

Following you can find the validation results for the APIs you have changed.

API Status Request Response
ingest.delete_geoip_database 🟢 1/1 1/1
ingest.delete_pipeline 🟢 15/15 15/15
ingest.geo_ip_stats 🟢 1/1 1/1
ingest.get_geoip_database 🟢 6/6 6/6
ingest.get_pipeline 🟢 22/22 22/22
ingest.processor_grok 🟢 1/1 1/1
ingest.put_geoip_database 🟢 3/3 3/3
ingest.put_pipeline 🟢 59/59 59/59
ingest.simulate 🟢 10/10 10/10

You can validate these APIs yourself by using the make validate target.

@andrewkroh andrewkroh marked this pull request as ready for review October 10, 2024 23:34
Copy link
Member

@flobernd flobernd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contributing to the spec 🙂

I left some comments.

@flobernd
Copy link
Member

flobernd commented Oct 11, 2024

I just noticed that we have a Ip (_types.Ip) alias defined which we should probably as well use instead of just string for all fields that represent an IP address.

/**
* Object field containing extracted domain components. If an empty string,
* the processor adds components to the document’s root.
* @server-default <empty string>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@flobernd, What should I do here? The docs say the default is an empty string. Should I remove this entirely, change it to "", something else?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't have a way to represent an empty string at the moment. This is something that we should probably improve in the future. cc @swallez @pquentin @l-trotta

We can remove the @server_default annotation for now.

* constructed with template snippets. Must specify only one of
* internal_networks or internal_networks_field.
*/
internal_networks: string[]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the one field that is almost an IP address where would could use the Ip[] type. But that would be inaccurate because the values can be a IP or a CIDR. Should I create a type alias for CIDR somewhere such that the type can be (Ip | CIDR)[]?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refresh my memory. Is xxx.xxx.xxx.xxx without a slash a valid CIDR notation that defaults to /32?

In any way, I think it's fine keeping just string[] in this case.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refresh my memory. Is xxx.xxx.xxx.xxx without a slash a valid CIDR notation that defaults to /32?

Yes, that's how the processor is behaving for ipv4. I didn't check it, but for ipv6 I would expect similar behavior just using /128 to indicate that it's matching one address.

@andrewkroh andrewkroh force-pushed the bugfix/missing-processors branch from e853e2f to 4982c5f Compare October 11, 2024 18:20
@github-actions
Copy link
Contributor

Following you can find the validation results for the APIs you have changed.

API Status Request Response
ingest.delete_geoip_database 🟢 1/1 1/1
ingest.delete_pipeline 🟢 15/15 15/15
ingest.geo_ip_stats 🟢 1/1 1/1
ingest.get_geoip_database 🟢 6/6 6/6
ingest.get_pipeline 🟢 22/22 22/22
ingest.processor_grok 🟢 1/1 1/1
ingest.put_geoip_database 🟢 3/3 3/3
ingest.put_pipeline 🟢 59/59 59/59
ingest.simulate 🟢 10/10 10/10

You can validate these APIs yourself by using the make validate target.

@andrewkroh
Copy link
Member Author

With this change, all of the processors and parameters used across elastic/integrations ingest pipelines are accounted for in the spec.

@flobernd
Copy link
Member

Hi @andrewkroh, thanks for updating the PR. Looks good now 🙂

Let's just remove the @server_default <empty string> tag and we should be good to go. cc @pquentin @l-trotta if you want to have a second look.

@github-actions
Copy link
Contributor

Following you can find the validation results for the APIs you have changed.

API Status Request Response
ingest.delete_geoip_database 🟢 1/1 1/1
ingest.delete_pipeline 🟢 15/15 15/15
ingest.geo_ip_stats 🟢 1/1 1/1
ingest.get_geoip_database 🟢 6/6 6/6
ingest.get_pipeline 🟢 22/22 22/22
ingest.processor_grok 🟢 1/1 1/1
ingest.put_geoip_database 🟢 3/3 3/3
ingest.put_pipeline 🟢 59/59 59/59
ingest.simulate 🟢 10/10 10/10

You can validate these APIs yourself by using the make validate target.

@andrewkroh andrewkroh requested a review from flobernd October 14, 2024 14:15
Copy link
Contributor

@l-trotta l-trotta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! thank you

@andrewkroh andrewkroh merged commit d1857ea into main Oct 14, 2024
6 checks passed
@andrewkroh andrewkroh deleted the bugfix/missing-processors branch October 14, 2024 15:01
github-actions bot pushed a commit that referenced this pull request Oct 14, 2024
…rocessors (#3011)

Add ingest processor definitions for `community_id`, `fingerprint`, `network_direction`, and `registered_domain` processors. All parameters and descriptions were scraped from the 8.16 docs.

Add `ip` to the list of types supported by the `convert` processor.

Add `ecs_compatibility` to grok processor.

Add `output_format` to date processor.

Related issues

- Fixes #2309
- Fixes #2553
- Fixes #2593
- Fixes #2617

(cherry picked from commit d1857ea)
l-trotta pushed a commit that referenced this pull request Oct 14, 2024
…rocessors (#3011) (#3018)

Add ingest processor definitions for `community_id`, `fingerprint`, `network_direction`, and `registered_domain` processors. All parameters and descriptions were scraped from the 8.16 docs.

Add `ip` to the list of types supported by the `convert` processor.

Add `ecs_compatibility` to grok processor.

Add `output_format` to date processor.

Related issues

- Fixes #2309
- Fixes #2553
- Fixes #2593
- Fixes #2617

(cherry picked from commit d1857ea)

Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

4 participants