Script
Synopsis
Executes custom scripts and optimized built-in functions to transform and manipulate log data.
Schema
script:
- source: <string>
- lang: <string>
- params: <map[string]any>
- function: <string>
- description: <text>
- if: <script>
- id: <ident>
- ignore_failure: <boolean>
- on_failure: <processor[]>
- on_success: <processor[]>
- tag: <string>
Configuration
Field | Required | Default | Description |
---|---|---|---|
source | Y | - | Inline script code |
lang | N | "painless" | Scripting language ("painless" , "golang" , or "vmetric" ) |
params | N | - | Map of parameters available to the script |
function | N | - | Name of predefined function for vmetric mode |
description | N | - | Explanatory note |
if | N | - | Condition to run |
ignore_failure | N | false | See Handling Failures |
on_failure | N | - | See Handling Failures |
on_success | N | - | See Handling Success |
tag | N | - | Identifier |
Details
The processor supports three scripting modes: