If you use Logtail to collect logs, you can use the processor_base64_encoding, processor_base64_decoding, or processor_md5 plug-in to encode and decode field values. This topic describes the parameters of the processor_base64_encoding, processor_base64_decoding, and processor_md5 plug-ins. This topic also provides examples on how to configure the plug-ins.
Entry point
If you want to use a Logtail plug-in to process logs, you can add a Logtail plug-in configuration when you create or modify a Logtail configuration. For more information, see Entry point.
Base64 encoding
You can use the processor_base64_encoding plug-in to encode field values.
Form configuration
Set the Processor Type parameter to BASE64 (Encoding). The following table describes the parameters.
Parameter | Description |
Original Field | The name of the original field. |
New Field | The name of the new filed to which the encoded value is assigned. |
Report Original Field Missing Error | If you select this option and a raw log does not contain the specified original field, an error is reported. |
Editor configuration in JSON
The following table describes the parameters that you can configure in the detail parameter if you set the type parameter to processor_base64_encoding.
Parameter | Type | Required | Description |
SourceKey | String | Yes | The name of the original field. |
NewKey | String | Yes | The name of the new filed to which the encoded value is assigned. |
NoKeyError | Boolean | No | Specifies whether to report an error if a raw log does not contain the specified original field. Valid values:
|
Base64 decoding
You can use the processor_base64_decoding plug-in to decode field values.
Form configuration
Set the Processor Type parameter to BASE64 (Decoding). The following table describes the parameters.
Parameter | Description |
Original Field | The name of the original field. |
New Field | The name of the new field to which the decoded value is assigned. |
Report Original Field Missing Error | If you select this option and a raw log does not contain the specified original field, an error is reported. |
Report Decoding Failure Error | If you select this option and the decoding fails, an error is reported. |
Editor configuration in JSON
The following table describes the parameters that you can configure in the detail parameter if you set the type parameter to processor_base64_decoding.
Parameter | Type | Required | Description |
SourceKey | String | Yes | The name of the original field. |
NewKey | String | Yes | The name of the new field to which the decoded value is assigned. |
NoKeyError | Boolean | No | Specifies whether to report an error if a raw log does not contain the specified original field. Valid values:
|
DecodeError | Boolean | No | Specifies whether to report an error if the decoding fails. Valid values:
|
MD5 encoding
You can use the processor_md5 plug-in to encode data by using the MD5 algorithm.
Form configuration
Set the Processor Type parameter to MD5. The following table describes the parameters.
Parameter | Description |
Original Field | The name of the original field. |
New Field | The name of the new filed to which the encoded value is assigned. |
Report Original Field Missing Error | If you select this option and a raw log does not contain the specified original field, an error is reported. |
Editor configuration in JSON
The following table describes the parameters that you can configure in the detail parameter if you set the type parameter to processor_md5.
Parameter | Type | Required | Description |
SourceKey | String | Yes | The name of the original field. |
MD5Key | String | Yes | The name of the new filed to which the encoded value is assigned. |
NoKeyError | Boolean | No | Specifies whether to report an error if a raw log does not contain the specified original field. Valid values:
|