Skip to main content
rito
Staff
Staff
September 3, 2025

Technical Tip: Predefined functions for arithmetic calculations in FortiAnalyzer v7.6.4 and later

  • September 3, 2025
  • 0 replies
  • 204 views
Description This article describes how to perform arithmetic calculations using custom parsers in FortiAnalyzer.
Scope FortiAnalyzer v7.6.4 and later.
Solution

FortiAnalyzer's custom parser now supports arithmetic operations as part of its predefined functions. These functions are used in the custom parser as binary operations.


Each function takes two arguments: 'l' and 'r'.
'l' represents the left-hand side of the expression, and 'r' represents the right-hand side.


These arguments are used in the function calls as shown below.

 

Newly Added Functions:

 

 add(l, r)  minus(l, r)  multiply(l, r)  divide(l, r)


For each function, the following examples demonstrate how to apply arithmetic operations when l = 20 and r = 4:

 

 l = 20,  r = 4,  <various> = add(l, r)       //this result is <various> = 24  <various> = minus(l, r)     //this result is <various> = 16  <various> = multiply(l, r)  //this result is <various> = 80  <various> = divide(l, r)    //this result is <various> = 5

 

  • The variables l and r can be assigned real numbers as well as other variables.
  • <various> can be replaced with any variable name, for example, 'calc-result'.

 

    Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
    Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!