Uppercase
Synopsis
Converts string values to their uppercase equivalent.
Schema
- uppercase:
field: <ident>
fields: <string[]>
exclude: <string[]>
uppercase_keys: <boolean>
description: <text>
if: <script>
ignore_failure: <boolean>
ignore_missing: <boolean>
on_failure: <processor[]>
on_success: <processor[]>
tag: <string>
target_field: <ident>
Configuration
The following fields are used to define the processor:
| Field | Required | Default | Description |
|---|---|---|---|
field | Y* | - | Field containing the string to convert. Required in value mode; ignored when uppercase_keys is true |
uppercase_keys | N | false | Switch to key mode: uppercase the field NAMES matched by fields instead of a value |
fields | N | ["*"] | Key mode only. Glob patterns naming the keys to rename — * for all root keys, prefix.* for the keys of one nested object. Defaults to every root key |
exclude | N | - | Key mode only. Glob patterns for keys to leave alone, applied after fields |
description | N | - | Explanatory note |
if | N | - | Condition to run |
ignore_failure | N | false | See Handling Failures |
ignore_missing | N | false | If true, quietly exit if field doesn't exist |
on_failure | N | - | See Handling Failures |
on_success | N | - | See Handling Success |
tag | N | - | Identifier |
disabled | N | false | When true, the processor is skipped and the event continues to the next one. Lets you take a processor out of the path without removing its configuration |
target_field | N | field | Field to store the converted value(s) |
* = Either field or uppercase_keys: true must be given. With neither, the processor fails with either field or fields with uppercase_keys must be specified.
Details
The processor can handle both single string fields and arrays of strings. When processing an array, it converts each element to uppercase.
note
The processor uses the standard string uppercase conversion rules of the Go programming language, which handles Unicode characters appropriately.
warning
If the field contains non-string values, the processor will fail unless ignore_failure is set to true.