Multiply
Synopsis
Multiplies two numeric values together and returns the result.
Schema
- multiply:
field: <ident>
left_operand: <string>
right_operand: <string>
description: <text>
if: <script>
ignore_failure: <boolean>
ignore_missing: <boolean>
on_failure: <processor[]>
on_success: <processor[]>
tag: <string>
Configuration
The following fields are used to define the processor:
Field | Required | Default | Description |
---|---|---|---|
field | Y | - | Target field to store the multiplication result |
left_operand | Y | - | First factor - can be a literal value or field reference |
right_operand | Y | - | Second factor - can be a literal value or field reference |
description | N | - | Explanatory note |
if | N | - | Condition to run |
ignore_failure | N | false | Continue processing if multiplication fails |
ignore_missing | N | false | Skip if referenced fields don't exist |
on_failure | N | - | Error handling processors |
on_success | N | - | Success handling processors |
tag | N | - | Identifier |
Details
Multiplies two numeric values together and stores the result in the target field. The processor can use literal values or extract values from existing fields in the log entry.
Numeric values are automatically converted to appropriate types for multiplication. The processor accepts both literal values and field references for operands.
The processor is useful for scaling values, performing unit conversions, calculating derived metrics, and implementing various mathematical transformations.
Be aware of potential numerical precision issues when multiplying very large numbers or numbers with many decimal places. The processor uses floating-point arithmetic which has inherent precision limitations.
Examples
Basic
Multiplying two literal values... |
|
calculates and stores the result: |
|
Units
Converting bytes to kilobytes... |
|
performs unit conversion: |
|
Areas
Calculating rectangle area from dimensions... |
|
computes the geometric property: |
|
Scaling
Normalizing percentages to 0-1 scale... |
|
transforms percentage values to decimal: |
|
Compound
Calculating volume from radius... |
|
implements a multi-step formula calculation: |
|