If you use Logtail to collect logs, you can use the processor_drop plug-in to drop log fields. This topic describes the parameters of the processor_drop plug-in. This topic also provides examples on how to configure the plug-in.

Important You can use form configuration to add Logtail plug-ins only if you select Kubernetes - Standard Output in the Import Data section.

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.

Usage notes

Important Only Logtail V0.16.28 or later supports the processor_drop plug-in.

Form configuration

  • Parameters
    Set Processor Type to Drop Field. Then, configure other parameters based on the following table.
    ParameterDescription
    Drop FieldThe field to drop. You can specify multiple fields.
  • Configuration example
    The following example shows how to drop the aaa1 and aaa2 fields from a log.
    • Raw log
      "aaa1":"value1"
      "aaa2":"value2"
      "aaa3":"value3"
    • Logtail plug-in configuration for data processing Drop fields
    • Results
      "aaa3":"value3"

Editor configuration in JSON

  • Parameters
    Set type to processor_drop. Then, configure other parameters in detail based on the following table.
    ParameterTypeRequiredDescription
    DropKeysString arrayYesThe field to drop. You can specify multiple fields.
  • Configuration example
    The following example shows how to drop the aaa1 and aaa2 fields from a log.
    • Raw log
      "aaa1":"value1"
      "aaa2":"value2"
      "aaa3":"value3"
    • Logtail plug-in configuration for data processing
      {
        "processors":[
          {
            "type":"processor_drop",
            "detail": {
              "DropKeys": ["aaa1","aaa2"]
            }
          }
        ]
      }
    • Results
      "aaa3":"value3"