Skip to content

This workflow guides you through creating a package to parse and clean log events. To this end, you scaffold a Tenzir package and build user-defined operators.

Complete each numbered step in order. Each step includes:

  • Results: What you should have when done
  • Resources: Guides and references to help you

Start with a deep understanding of the sample data given.

Results:

  • Context around the given samples
  • Name of the vendor and product for the package

Resources:

  • Internet: search for extra samples to better understand product and vendor.

Set up the directory structure and manifest file for your package.

Results:

  • A package for vendor acme
  • A package manifest: acme/package.yaml
  • Event samples in acme/tests/inputs

Resources:

Create user-defined operators for parsing and cleaning. Use the testing framework to validate each step of work.

Resources:

The parsing operator translates unstructured into structured data. This is only needed when the data is not yet parsed, i.e., a raw string, or when it contains fields that are not yet parsed, e.g., a JSON with payload field.

Results:

  • Operator: acme::product::parse
  • Test(s): acme/tests/product/parse.{tql,txt}

Resources:

The cleaning operator ensures semantically rich types, replaces sentinel values, and ensures a proper schema if feasible.

Results:

  • Operator: acme::product::clean
  • Test(s): acme/tests/product/clean.{tql,txt}

Resources:

Add end-to-end examples that showcase how to use the operators. These examples should reflect the collection method that is typical for the given vendor-product combination, e.g.,

from_* {
acme::product::parse
acme::product::clean
}

Results:

  • A few examples that show how to use the operators in the package

Resources:

Update the package manifest with accurate descriptions reflecting the final implementation. Review operators for idiomatic TQL patterns. Verify all tests pass.

Results:

  • TQL code adheres to idiomatic best practices
  • All tests pass
  • Updated and descriptive package manifest

Last updated: