Predefined EQL Functions
A list of functions that are available in the EQL.
The conversion functions are typically used when adding a new data model, or when you need to define new columns, where the expressions for new columns can use conversion functions to convert between data types and combine them using various operators. For instructions on how to add a new data model, see Creating a Data Model in Graphical Mode.
Conversion functions
String Functions
The smart list functions are usually used in filter expressions and data model.
For examples of these functions in SQL and EQL queries, see Search Examples.
Comparison Functions
Math Functions
Conditional Functions
| Function Name | Arguments | Returns | 
|---|---|---|
| IIF | Condition, then, else | Returns the value of the 'then' clause if the condition is true, otherwise the value of the 'else' clause.
				 Example: 
				    | 
                        
Time functions
The following time functions are available:- seconds (timestamp, [multiplier])
 - minutes (timestamp, [multiplier])
 - hours (timestamp, [multiplier])
 - days (timestamp, [multiplier])
 - weeks (timestamp, [multiplier])
 - months (timestamp, [multiplier])
 - years (timestamp, [multiplier])
 
Each function returns the value of the specified 
		  timestamp parameter truncated to the corresponding time unit (seconds, minutes, hours, and so on). 
		
If the optional parameter 
		  multiplier is specified, then the function creates a time bucket of the specified units and with the precision of the multiplier, and returns the truncated timestamp at the start of the time interval specified by 
		  multiplier. 
		
seconds(sys_eventTime, 10)
This function creates a time bucket of 10 seconds, and returns the truncated timestamp out of the specified 
		  sys_eventTime at the start of the 10-second interval. That is, if the value of sys_eventTime is "2020-06-26 10:57:24", then it truncates the value to "2020-06-26 10:57:20". 
		
Miscellaneous Functions
| Function Name | Arguments | Returns | 
|---|---|---|
geoiplookup
                                    By using this function within SQL and EQL queries, you can search logs that originated from a particular geographical area such as location, country, city, postal code, and so on. You can use the function in Advanced Search and Advanced Dashboards.  | 
                                
                                    
 In the 
					  The 
					  
  | 
                                 Returns the geographical information of a specified IPv4 or IPv6 address. Returns the country name if the 
				  field_option parameter is not specified. 
				  Note: To use this function, the MaxMind database must be available on your appliance. If any errors are displayed, contact your administrator. 
				    | 
                            
matchcidr
                                    You can use the function within SQL, EQL, and ECL queries, and in turn, in other functionality that make use of these queries.  | 
                                
                                    
 In the 
					  In the 
					  The 
					   | 
                                
                                    
  | 
                            
extractIPs
                                    You can use the function within SQL, EQL, and ECL queries, and in turn, in the   | 
                                
                                    
 The input list of IP addresses can contain IPv4, IPv6, or IPv6 compressed addresses.  | 
                                Returns a list of IP addresses as a comma-separated string; or an empty string if no IP addresses are found within the input string. | 
For examples of 
		geoiplookup and 
		matchcidr functions in SQL and EQL queries, see 
		Search Examples.