Math Processor - logzio/sawmill GitHub Wiki
Math [math]
This processor allows you to run mathematical functions on one or more fields, and output the value to a new field.
- targetField
- expression
Examples
{
"steps": [
{
"math": {
"config": {
"targetField": "message_slot.DispatchDurationMs",
"expression": "{{message_slot.DispatchDurationMs}} - {{message_slot.DequeueDurationMs}}"
}
}
}
]
}
{
"steps": [
{
"math": {
"config": {
"targetField": "SuccessRatio",
"expression": "{{number1}} / {{number2}}"
}
}
}
]
}
{
"steps": [
{
"math": {
"config": {
"targetField": "SuccessRatio",
"expression": "({{message_slot.DispatchDurationMs}} * 1024) * 1024"
}
}
}
]
}
{
"steps": [
{
"math": {
"config": {
"targetField": "SuccessRatio",
"expression": "({{message_slot.DispatchDurationMs}} / 1024) * ({{lmessage_slot.DispatchDurationMs}} / 1000)"
}
}
}
]
}