CPID
Synopsis
Generates a CPID (Common Process ID) according to RFC 9562.
Schema
- cpid:
hostname_field: <ident>
process_id_field: <ident>
time_field: <ident>
target_field: <ident>
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 |
---|---|---|---|
hostname_field | Y | - | Field containing the hostname or system identifier |
process_id_field | Y | - | Field containing the process ID |
time_field | Y | - | Field containing the process creation time |
target_field | N | process.common_id | Field where the generated CPID will be stored |
description | N | - | Explanatory note |
if | N | - | Condition to run |
ignore_failure | N | false | Continue processing if generation fails |
ignore_missing | N | false | Continue if source fields don't exist (uses empty values) |
on_failure | N | - | Error handling processors |
on_success | N | - | Success handling processors |
tag | N | - | Identifier for logging |
Details
Generates a Common Process ID (CPID) according to RFC 9562, providing a consistent way to identify unique process instances across systems and log sources. The processor creates a UUID (Version 8, Variant 1) by combining hostname, process ID, and time information.
When using ignore_missing: true
, missing time values will be replaced with the current processing time, while missing hostname or process ID values will be treated as empty strings.
The processor ensures that the same process instance will have the same identifier across different log entries and sources, enabling correlation and tracking of process activity throughout its lifecycle.
The CPID algorithm uses SHA-256 hashing to generate consistent identifiers. For optimal correlation, ensure that the input fields contain stable and consistent values across log sources.
Examples
Basic CPID Generation
Generating a CPID from standard fields... |
|
creates a standardized process ID: |
|
Custom Target Field
Storing CPID in a custom field... |
|
with custom field placement: |
|
Handling Missing Fields
Continuing processing despite missing fields... |
|
generates CPID with available information: |
|