Skip to content

Commit d1857ea

Browse files
authored
Add community_id, fingerprint, network_direction, registered_domain processors (#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
1 parent 7610041 commit d1857ea

File tree

2 files changed

+201
-2
lines changed

2 files changed

+201
-2
lines changed

specification/_doc_ids/table.csv

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ cluster-stats,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/c
7878
cluster-update-settings,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cluster-update-settings.html
7979
cluster,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cluster.html
8080
common-options,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/common-options.html
81+
community-id-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/community-id-processor.html
8182
connector-sync-job-cancel,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cancel-connector-sync-job-api.html
8283
connector-sync-job-delete,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/delete-connector-sync-job-api.html
8384
connector-sync-job-get,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/get-connector-sync-job-api.html
@@ -157,6 +158,7 @@ fail-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/
157158
field-and-document-access-control,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/field-and-document-access-control.html
158159
field-usage-stats,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/field-usage-stats.html
159160
find-structure,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/find-structure.html
161+
fingerprint-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/fingerprint-processor.html
160162
foreach-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/foreach-processor.html
161163
fuzziness,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/common-options.html#fuzziness
162164
gap-policy,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/search-aggregations-pipeline.html#gap-policy
@@ -329,6 +331,7 @@ modules-scripting,https://www.elastic.co/guide/en/elasticsearch/reference/{branc
329331
modules-snapshots,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/modules-snapshots.html
330332
monitor-elasticsearch-cluster,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/monitor-elasticsearch-cluster.html
331333
multi-fields,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/multi-fields.html
334+
network-direction-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/network-direction-processor.html
332335
node-roles,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/modules-node.html#node-roles
333336
paginate-search-results,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/paginate-search-results.html
334337
painless-contexts,https://www.elastic.co/guide/en/elasticsearch/painless/{branch}/painless-contexts.html
@@ -407,6 +410,7 @@ query-dsl,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/query
407410
realtime,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/docs-get.html#realtime
408411
redact-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/redact-processor.html
409412
regexp-syntax,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/regexp-syntax.html
413+
registered-domain-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/registered-domain-processor.html
410414
remove-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/remove-processor.html
411415
rename-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/rename-processor.html
412416
reroute-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/reroute-processor.html

specification/ingest/_types/Processors.ts

Lines changed: 197 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ export class ProcessorContainer {
5555
* @doc_id ingest-circle-processor
5656
*/
5757
circle?: CircleProcessor
58+
/**
59+
* Computes the Community ID for network flow data as defined in the
60+
* Community ID Specification. You can use a community ID to correlate network
61+
* events related to a single flow.
62+
* @doc_id community-id-processor
63+
*/
64+
community_id?: CommunityIDProcessor
5865
/**
5966
* Converts a field in the currently ingested document to a different type, such as converting a string to an integer.
6067
* If the field value is an array, all members will be converted.
@@ -106,6 +113,12 @@ export class ProcessorContainer {
106113
* @doc_id fail-processor
107114
*/
108115
fail?: FailProcessor
116+
/**
117+
* Computes a hash of the document’s content. You can use this hash for
118+
* content fingerprinting.
119+
* @doc_id fingerprint-processor
120+
*/
121+
fingerprint?: FingerprintProcessor
109122
/**
110123
* Runs an ingest processor on each element of an array or object.
111124
* @doc_id foreach-processor
@@ -169,6 +182,12 @@ export class ProcessorContainer {
169182
* @doc_id lowercase-processor
170183
*/
171184
lowercase?: LowercaseProcessor
185+
/**
186+
* Calculates the network direction given a source IP address, destination IP
187+
* address, and a list of internal networks.
188+
* @doc_id network-direction-processor
189+
*/
190+
network_direction?: NetworkDirectionProcessor
172191
/**
173192
* Executes another pipeline.
174193
* @doc_id pipeline-processor
@@ -181,6 +200,14 @@ export class ProcessorContainer {
181200
* @doc_id redact-processor
182201
*/
183202
redact?: RedactProcessor
203+
/**
204+
* Extracts the registered domain (also known as the effective top-level
205+
* domain or eTLD), sub-domain, and top-level domain from a fully qualified
206+
* domain name (FQDN). Uses the registered domains defined in the Mozilla
207+
* Public Suffix List.
208+
* @doc_id registered-domain-processor
209+
*/
210+
registered_domain?: RegisteredDomainProcessor
184211
/**
185212
* Removes existing fields.
186213
* If one field doesn’t exist, an exception will be thrown.
@@ -528,13 +555,77 @@ export class CircleProcessor extends ProcessorBase {
528555
target_field?: Field
529556
}
530557

558+
export class CommunityIDProcessor extends ProcessorBase {
559+
/**
560+
* Field containing the source IP address.
561+
* @server_default source.ip
562+
*/
563+
source_ip?: Field
564+
/**
565+
* Field containing the source port.
566+
* @server_default source.port
567+
*/
568+
source_port?: Field
569+
/**
570+
* Field containing the destination IP address.
571+
* @server_default destination.ip
572+
*/
573+
destination_ip?: Field
574+
/**
575+
* Field containing the destination port.
576+
* @server_default destination.port
577+
*/
578+
destination_port?: Field
579+
/**
580+
* Field containing the IANA number.
581+
* @server_default network.iana_number
582+
*/
583+
iana_number?: Field
584+
/**
585+
* Field containing the ICMP type.
586+
* @server_default icmp.type
587+
*/
588+
icmp_type?: Field
589+
/**
590+
* Field containing the ICMP code.
591+
* @server_default icmp.code
592+
*/
593+
icmp_code?: Field
594+
/**
595+
* Field containing the transport protocol name or number. Used only when the
596+
* iana_number field is not present. The following protocol names are currently
597+
* supported: eigrp, gre, icmp, icmpv6, igmp, ipv6-icmp, ospf, pim, sctp, tcp, udp
598+
* @server_default network.transport
599+
*/
600+
transport?: Field
601+
/**
602+
* Output field for the community ID.
603+
* @server_default network.community_id
604+
*/
605+
target_field?: Field
606+
/**
607+
* Seed for the community ID hash. Must be between 0 and 65535 (inclusive). The
608+
* seed can prevent hash collisions between network domains, such as a staging
609+
* and production network that use the same addressing scheme.
610+
* @server_default 0
611+
*/
612+
seed?: integer
613+
/**
614+
* If true and any required fields are missing, the processor quietly exits
615+
* without modifying the document.
616+
* @server_default true
617+
*/
618+
ignore_missing?: boolean
619+
}
620+
531621
export enum ConvertType {
532622
integer,
533623
long,
534-
float,
535624
double,
536-
string,
625+
float,
537626
boolean,
627+
ip,
628+
string,
538629
auto
539630
}
540631

@@ -662,6 +753,12 @@ export class DateProcessor extends ProcessorBase {
662753
* @server_default UTC
663754
*/
664755
timezone?: string
756+
/**
757+
* The format to use when writing the date to target_field. Must be a valid
758+
* java time pattern.
759+
* @server_default yyyy-MM-dd'T'HH:mm:ss.SSSXXX
760+
*/
761+
output_format?: string
665762
}
666763

667764
export class DissectProcessor extends ProcessorBase {
@@ -756,6 +853,44 @@ export class FailProcessor extends ProcessorBase {
756853
message: string
757854
}
758855

856+
export enum FingerprintDigest {
857+
md5 = 'MD5',
858+
sha1 = 'SHA-1',
859+
sha256 = 'SHA-256',
860+
sha512 = 'SHA-512',
861+
murmurHash3 = 'MurmurHash3'
862+
}
863+
864+
export class FingerprintProcessor extends ProcessorBase {
865+
/**
866+
* Array of fields to include in the fingerprint. For objects, the processor
867+
* hashes both the field key and value. For other fields, the processor hashes
868+
* only the field value.
869+
*/
870+
fields: Fields
871+
/**
872+
* Output field for the fingerprint.
873+
* @server_default fingerprint
874+
*/
875+
target_field?: Field
876+
/**
877+
* Salt value for the hash function.
878+
*/
879+
salt?: string
880+
/**
881+
* The hash method used to compute the fingerprint. Must be one of MD5, SHA-1,
882+
* SHA-256, SHA-512, or MurmurHash3.
883+
* @server_default SHA-1
884+
*/
885+
method?: FingerprintDigest
886+
/**
887+
* If true, the processor ignores any missing fields. If all fields are
888+
* missing, the processor silently exits without modifying the document.
889+
* @server_default false
890+
*/
891+
ignore_missing?: boolean
892+
}
893+
759894
export class ForeachProcessor extends ProcessorBase {
760895
/**
761896
* Field containing array or object values.
@@ -773,6 +908,12 @@ export class ForeachProcessor extends ProcessorBase {
773908
}
774909

775910
export class GrokProcessor extends ProcessorBase {
911+
/**
912+
* Must be disabled or v1. If v1, the processor uses patterns with Elastic
913+
* Common Schema (ECS) field names.
914+
* @server_default disabled
915+
*/
916+
ecs_compatibility?: string
776917
/**
777918
* The field to use for grok expression parsing.
778919
*/
@@ -1046,6 +1187,42 @@ export class LowercaseProcessor extends ProcessorBase {
10461187
target_field?: Field
10471188
}
10481189

1190+
export class NetworkDirectionProcessor extends ProcessorBase {
1191+
/**
1192+
* Field containing the source IP address.
1193+
* @server_default source.ip
1194+
*/
1195+
source_ip?: Field
1196+
/**
1197+
* Field containing the destination IP address.
1198+
* @server_default destination.ip
1199+
*/
1200+
destination_ip?: Field
1201+
/**
1202+
* Output field for the network direction.
1203+
* @server_default network.direction
1204+
*/
1205+
target_field?: Field
1206+
/**
1207+
* List of internal networks. Supports IPv4 and IPv6 addresses and ranges in
1208+
* CIDR notation. Also supports the named ranges listed below. These may be
1209+
* constructed with template snippets. Must specify only one of
1210+
* internal_networks or internal_networks_field.
1211+
*/
1212+
internal_networks?: string[]
1213+
/**
1214+
* A field on the given document to read the internal_networks configuration
1215+
* from.
1216+
*/
1217+
internal_networks_field?: Field
1218+
/**
1219+
* If true and any required fields are missing, the processor quietly exits
1220+
* without modifying the document.
1221+
* @server_default true
1222+
*/
1223+
ignore_missing?: boolean
1224+
}
1225+
10491226
export class PipelineProcessor extends ProcessorBase {
10501227
/**
10511228
* The name of the pipeline to execute.
@@ -1102,6 +1279,24 @@ export class RedactProcessor extends ProcessorBase {
11021279
trace_redact?: boolean
11031280
}
11041281

1282+
export class RegisteredDomainProcessor extends ProcessorBase {
1283+
/**
1284+
* Field containing the source FQDN.
1285+
*/
1286+
field: Field
1287+
/**
1288+
* Object field containing extracted domain components. If an empty string,
1289+
* the processor adds components to the document’s root.
1290+
*/
1291+
target_field?: Field
1292+
/**
1293+
* If true and any required fields are missing, the processor quietly exits
1294+
* without modifying the document.
1295+
* @server_default true
1296+
*/
1297+
ignore_missing?: boolean
1298+
}
1299+
11051300
export class RemoveProcessor extends ProcessorBase {
11061301
/**
11071302
* Fields to be removed. Supports template snippets.

0 commit comments

Comments
 (0)