// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; import * as utilities from "./utilities"; /** * Extracts structured fields out of a single text field within a document. You choose which field to extract matched fields from, as well as the grok pattern you expect will match. A grok pattern is like a regular expression that supports aliased expressions that can be reused. * * This processor comes packaged with many [reusable patterns](https://github.com/elastic/elasticsearch/blob/master/libs/grok/src/main/resources/patterns). * * If you need help building patterns to match your logs, you will find the [Grok Debugger](https://www.elastic.co/guide/en/kibana/master/xpack-grokdebugger.html) tool quite useful! [The Grok Constructor](https://grokconstructor.appspot.com/) is also a useful tool. * * See: https://www.elastic.co/guide/en/elasticsearch/reference/current/grok-processor.html */ export function elasticsearchIngestProcessorGrok(args: ElasticsearchIngestProcessorGrokArgs, opts?: pulumi.InvokeOptions): Promise { if (!opts) { opts = {} } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); return pulumi.runtime.invoke("elasticstack:index/elasticsearchIngestProcessorGrok:ElasticsearchIngestProcessorGrok", { "description": args.description, "ecsCompatibility": args.ecsCompatibility, "field": args.field, "if": args.if, "ignoreFailure": args.ignoreFailure, "ignoreMissing": args.ignoreMissing, "onFailures": args.onFailures, "patternDefinitions": args.patternDefinitions, "patterns": args.patterns, "tag": args.tag, "traceMatch": args.traceMatch, }, opts); } /** * A collection of arguments for invoking ElasticsearchIngestProcessorGrok. */ export interface ElasticsearchIngestProcessorGrokArgs { /** * Description of the processor. */ description?: string; /** * Must be disabled or v1. If v1, the processor uses patterns with Elastic Common Schema (ECS) field names. **NOTE:** Supported only starting from version of Elasticsearch **7.16.x**. */ ecsCompatibility?: string; /** * The field to use for grok expression parsing */ field: string; /** * Conditionally execute the processor */ if?: string; /** * Ignore failures for the processor. */ ignoreFailure?: boolean; /** * If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document */ ignoreMissing?: boolean; /** * Handle failures for the processor. */ onFailures?: string[]; /** * A map of pattern-name and pattern tuples defining custom patterns to be used by the current processor. Patterns matching existing names will override the pre-existing definition. */ patternDefinitions?: {[key: string]: string}; /** * An ordered list of grok expression to match and extract named captures with. Returns on the first expression in the list that matches. */ patterns: string[]; /** * Identifier for the processor. */ tag?: string; /** * when true, `_ingest._grok_match_index` will be inserted into your matched document’s metadata with the index into the pattern found in `patterns` that matched. */ traceMatch?: boolean; } /** * A collection of values returned by ElasticsearchIngestProcessorGrok. */ export interface ElasticsearchIngestProcessorGrokResult { /** * Description of the processor. */ readonly description?: string; /** * Must be disabled or v1. If v1, the processor uses patterns with Elastic Common Schema (ECS) field names. **NOTE:** Supported only starting from version of Elasticsearch **7.16.x**. */ readonly ecsCompatibility?: string; /** * The field to use for grok expression parsing */ readonly field: string; /** * Internal identifier of the resource */ readonly id: string; /** * Conditionally execute the processor */ readonly if?: string; /** * Ignore failures for the processor. */ readonly ignoreFailure?: boolean; /** * If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document */ readonly ignoreMissing?: boolean; /** * JSON representation of this data source. */ readonly json: string; /** * Handle failures for the processor. */ readonly onFailures?: string[]; /** * A map of pattern-name and pattern tuples defining custom patterns to be used by the current processor. Patterns matching existing names will override the pre-existing definition. */ readonly patternDefinitions?: {[key: string]: string}; /** * An ordered list of grok expression to match and extract named captures with. Returns on the first expression in the list that matches. */ readonly patterns: string[]; /** * Identifier for the processor. */ readonly tag?: string; /** * when true, `_ingest._grok_match_index` will be inserted into your matched document’s metadata with the index into the pattern found in `patterns` that matched. */ readonly traceMatch?: boolean; } export function elasticsearchIngestProcessorGrokOutput(args: ElasticsearchIngestProcessorGrokOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply(a => elasticsearchIngestProcessorGrok(a, opts)) } /** * A collection of arguments for invoking ElasticsearchIngestProcessorGrok. */ export interface ElasticsearchIngestProcessorGrokOutputArgs { /** * Description of the processor. */ description?: pulumi.Input; /** * Must be disabled or v1. If v1, the processor uses patterns with Elastic Common Schema (ECS) field names. **NOTE:** Supported only starting from version of Elasticsearch **7.16.x**. */ ecsCompatibility?: pulumi.Input; /** * The field to use for grok expression parsing */ field: pulumi.Input; /** * Conditionally execute the processor */ if?: pulumi.Input; /** * Ignore failures for the processor. */ ignoreFailure?: pulumi.Input; /** * If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document */ ignoreMissing?: pulumi.Input; /** * Handle failures for the processor. */ onFailures?: pulumi.Input[]>; /** * A map of pattern-name and pattern tuples defining custom patterns to be used by the current processor. Patterns matching existing names will override the pre-existing definition. */ patternDefinitions?: pulumi.Input<{[key: string]: pulumi.Input}>; /** * An ordered list of grok expression to match and extract named captures with. Returns on the first expression in the list that matches. */ patterns: pulumi.Input[]>; /** * Identifier for the processor. */ tag?: pulumi.Input; /** * when true, `_ingest._grok_match_index` will be inserted into your matched document’s metadata with the index into the pattern found in `patterns` that matched. */ traceMatch?: pulumi.Input; }