Checksum
Synopsis
Calculates cryptographic and non-cryptographic checksums of field values.
Schema
- checksum:
field: <ident>
algorithm: <string>
target_field: <string>
output_format: <string>
include_fields: <array>
exclude_fields: <array>
uppercase: <boolean>
description: <text>
if: <script>
ignore_failure: <boolean>
ignore_missing: <boolean>
on_failure: <processor[]>
on_success: <processor[]>
tag: <string>
Configuration
The following fields are used to define the processor:
| Field | Required | Default | Description |
|---|---|---|---|
field | Y | - | Source field containing data to checksum |
algorithm | Y | - | Checksum algorithm (crc32, crc64, adler32, fnv32, fnv64, fnv128, md5, sha1, sha256, sha512) |
target_field | N | {field}_{algorithm} | Target field to store checksum result |
output_format | N | hex | hex, decimal or base64. base64 only takes effect for the 32-bit checksums — crc32, crc32c, crc32k and adler32. Every other algorithm returns hex regardless |
include_fields | N | - | Array of fields to include for object checksums |
exclude_fields | N | - | Array of fields to exclude from object checksums |
uppercase | N | false | Output checksum in uppercase format |
description | N | - | Explanatory note |
if | N | - | Condition to run |
ignore_failure | N | false | Continue processing if checksum calculation fails |
ignore_missing | N | false | Skip processing if referenced field doesn't exist |
on_failure | N | - | See Handling Failures |
on_success | N | - | See Handling Success |
tag | N | - | Identifier |
disabled | N | false | When true, the processor is skipped and the event continues to the next one. Lets you take a processor out of the path without removing its configuration |
Details
Calculates checksums using various algorithms ranging from simple CRC checksums to cryptographic hashes like SHA-256. The processor supports different data types including strings, byte arrays, objects, and arrays.
The processor handles multiple algorithm types including non-cryptographic checksums (CRC32, CRC64, Adler32, FNV variants) and cryptographic hashes (MD5, SHA-1, SHA-2 family). For object checksums, it can selectively include or exclude specific fields.
Object fields are formatted as field:value pairs joined with pipes (|). Alphabetical ordering applies only when include_fields is not set — with include_fields, fields are taken in the order you list them, so two configurations listing the same fields in a different order produce different checksums.
Output is hexadecimal by default.
decimal falls back to hexadecimal for any hash wider than 64 bits — the MD5, SHA-1, SHA-2, SHA-3 and FNV-128 algorithms — because the value cannot be held in a 64-bit integer.
base64 is narrower still: it is honoured only by the 32-bit checksums (crc32, crc32c, crc32k, adler32). For the 64-bit CRCs and for every hash algorithm the request is silently ignored and hexadecimal is returned.
MD5 and SHA-1 algorithms are considered cryptographically weak and should only be used for non-security purposes like data integrity verification or deduplication.
Examples
Basic File Checksum
Calculating SHA-256 checksum of file content... | |
generates cryptographic hash: | |
Object Checksum with Field Selection
Creating checksum from specific object fields... | |
calculates checksum from selected fields: | |
Fast CRC Verification
Using fast CRC32 for data verification... | |
produces numeric CRC value: | |
Array Content Checksum
Checksumming array data for deduplication... | |
the array is joined with no separator, and | |
Configuration Integrity Check
Verifying configuration integrity with excluded sensitive fields... | |
creates integrity hash without sensitive data: | |