Configuration overview
NXLog Agent uses an Apache-style, file-based configuration system comprised of blocks and directives. Any configuration files must use either the ANSI or UTF-8 without BOM encoding.
You can configure NXLog Agent instances from NXLog Platform by using the configuration builder or text editor. See Create your first NXLog Agent configuration in the NXLog Platform User Guide for an introduction to the NXLog Agent configuration.
Configuration components
The following is an overview of the NXLog Agent configuration components. Refer to Data processing overview for more information.
Constants
You can use constant values throughout the configuration. They’re typically used for directory paths, filenames, hostnames, or regular expressions. |
|
Directives
Global directives control the overall NXLog Agent behavior. These include settings related to logging, batching, caching, and date format. |
|
Extensions
Use extension modules to process telemetry data, such as parsing or formatting records. You can add multiple instances of the same extension module. |
|
Input
Add input module instances to collect or receive telemetry data from your sources. You can parse records into structured data, add or remove fields, and transform them into the required output format. |
|
Multiple lines
A directive and its value must be specified on the same line, but the value can span multiple lines.
Values spanning multiple lines must have the newline escaped with a backslash (\) as shown below.
<Extension csv>
Module xm_csv
Fields $Version, $Device_Vendor, $Device_Product, $Device_Version, \
$Signature_ID, $Name, $Severity, $_Extension
</Extension>
The backslash must be the last character before the end of the line character, either CR (carriage return) or LF (line feed).
|
Regular expressions and multiple lines
For NXLog Agent 6.8 and older, regular expressions must always be defined in a single line, as they are handled by a specific parser that does not recognize backslashes as line breaks. |