These docs are under active development and cover the v0.20 Kobicha security model.
§1.1 1 Introduction

Scope

ⓘ Informative
This is an early draft specification. The overall architecture, data model, and design direction are established, but individual sections may change substantially as the specification matures. Areas explicitly marked for future revision include the retention engine (§3.4, §5.3, §7.3), the query language syntax (§8), and the boot ID mechanism (§3.5). Cross-references to other PSDs (particularly PSD-004 KACS and PSD-007 peinit) reflect draft-state interfaces that may evolve.

This specification defines eventd, the observability daemon for the Peios operating system. eventd is one of the five Peios system daemons managed by peinit. It is the sole persistent sink for observability data in Peios -- all events, logs, and metrics flow through eventd for storage, indexing, and querying.

eventd handles three distinct data types, each with its own ingestion path, storage engine, and query semantics:

  • Events -- structured records emitted through KMES (Kernel Mediated Event Subsystem). eventd consumes events from KMES per-CPU ring buffers and persists them with full header metadata including identity stamps. Events are the primary audit and security telemetry.
  • Logs -- unstructured or semi-structured text output from services and system components. eventd ingests logs through a dedicated mechanism independent of KMES.
  • Metrics -- numeric time-series data representing system and service measurements. eventd ingests metrics through a dedicated mechanism independent of KMES.

This specification covers:

  • The event ingestion pipeline -- KMES ring buffer consumption, event processing, and persistence
  • The log ingestion pipeline -- transport mechanism, log record format, and persistence
  • The metric ingestion pipeline -- transport mechanism, metric data model, and persistence
  • Storage -- the storage engine for each data type, retention policies, and lifecycle management
  • Querying -- the interface through which other daemons and tools retrieve stored observability data
  • Access control -- Security Descriptor-based authorization for reading and writing observability data
  • Configuration -- registry-based operational parameters
  • Startup and shutdown -- bootstrap sequence, crash recovery, and graceful termination
  • Failure modes -- behavior under resource exhaustion, KMES overrun, storage failure, and daemon restart

This specification does not cover:

  • KMES (covered by PSD-003)
  • Event type schemas or naming conventions for kernel-emitted events (defined by the emitting subsystem's specification: PSD-004 for KACS events, PSD-005 for LCS events)
  • KACS (covered by PSD-004)
  • LCS (covered by PSD-005)
  • peinit service management (covered by PSD-007)
  • Authentication or principal management (authd)
  • Log collection from remote hosts (future scope)
  • Metric collection or scraping from external sources (future scope)
§1.2 1 Introduction

Terminology

Terms defined in PSD-003 (KMES, event, header, payload, stamp, ring buffer, boot buffer, consumer, origin class, event type, sequence number) are used here with the same meaning and are not redefined.

Terms defined in PSD-004 (token, GUID, SID, Security Descriptor, ACL, ACE, privilege, SeAuditPrivilege, SeSecurityPrivilege) are used here with the same meaning and are not redefined.

Terms defined in PSD-005 (registry, hive, key, value, layer) are used here with the same meaning and are not redefined.

The following terms are specific to this specification.

eventd: The Peios observability daemon. A userspace process managed by peinit that consumes events from KMES, ingests logs and metrics from service processes, and provides persistent storage and querying for all three data types.

Event store: The persistent storage engine for KMES events. Receives structured event records with full header metadata (timestamps, sequence numbers, identity GUIDs) and makes them queryable.

Log store: The persistent storage engine for log records. Receives log entries from service processes and makes them queryable.

Metric store: The persistent storage engine for metric data. Receives numeric time-series measurements and makes them queryable.

Log record: A single log entry as stored by eventd. Contains the log message, a severity level, a timestamp, and metadata identifying the emitting service.

Boot ID: A GUID assigned by peinit at each boot, used by eventd to partition data across boots. Events, logs, and metrics from different boots are never interleaved in storage.

Retention policy: A set of rules governing how long stored data is kept before deletion. Retention policies are configured per data type via the registry and enforced by eventd.

§1.3 1 Introduction

Conventions

§1.3.1 Normative keywords

The key words MUST, MUST NOT, SHOULD, SHOULD NOT, and MAY in this specification are to be interpreted as described in RFC 2119.

§1.3.2 Section references

Section references within this specification use the § addressing scheme defined in PSD-001. References to other PSDs use the PSD-NNN §x.y.z(n) citation format.

§1.3.3 Byte order

All multi-byte integers in wire formats and storage formats defined by this specification are little-endian, consistent with PSD-003.

§1.3.4 String encoding

All strings in wire formats and storage formats defined by this specification are UTF-8 encoded.

§1.3.5 Payload encoding

Structured data in the query interface and internal storage formats uses MessagePack (msgpack) as defined by the MessagePack specification, consistent with PSD-003.

§1.4 1 Introduction

Prior Art

eventd is not a port or reimplementation of any single existing system. Its design draws on several established approaches while making different trade-offs.

§1.4.1 Windows Event Log / ETW

Windows provides Event Tracing for Windows (ETW) for kernel and application event delivery, and the Windows Event Log service for persistence and querying. KMES (PSD-003) fills the ETW role; eventd fills the Event Log service role. Key similarities:

  • Kernel-mediated event delivery with trusted metadata (ETW providers / KMES emitters)
  • A userspace service responsible for persistence (Event Log service / eventd)
  • Channel-based access control using Security Descriptors (Windows Event Log channels / eventd event access control)

Key differences:

  • eventd unifies events, logs, and metrics in a single daemon. Windows separates these across Event Log, ETL trace files, and Performance Counters.
  • eventd uses SQLite for persistent storage. Windows Event Log uses a proprietary binary format (EVTX).
  • KMES uses shared memory ring buffers with lock-free protocols. ETW uses kernel-managed trace sessions with different buffering semantics.

§1.4.2 journald (systemd)

journald is the system journal daemon in systemd-based Linux distributions. It captures structured log messages from services (via stdout/stderr and the journal socket) and stores them in a binary journal format.

Key similarities:

  • Captures service stdout/stderr as structured log records with metadata
  • Single daemon for system-wide log ingestion
  • Binary storage format with indexing

Key differences:

  • eventd handles events and metrics in addition to logs. journald is log-only (metrics require a separate stack like Prometheus/node_exporter).
  • eventd enforces access control via KACS Security Descriptors. journald uses Unix file permissions and polkit.
  • eventd receives kernel events through KMES ring buffers. journald receives kernel messages through /dev/kmsg.

§1.4.3 Prometheus / OpenTelemetry

Prometheus is a pull-based metrics system. OpenTelemetry defines a vendor-neutral telemetry collection framework spanning traces, metrics, and logs.

eventd's metric store serves a similar role to a local Prometheus TSDB, but:

  • eventd is push-based (services push metrics to eventd), not pull-based (Prometheus scrapes endpoints).
  • eventd does not implement distributed tracing. Traces are out of scope.
  • eventd integrates metrics with events and logs under a single access control model and query interface, rather than requiring separate systems.

§1.4.4 Features handled by other subsystems

Feature Subsystem
Event emission, buffering, and delivery KMES (PSD-003)
Event type schemas for KACS events KACS (PSD-004)
Event type schemas for LCS events LCS (PSD-005)
Daemon lifecycle management peinit (PSD-007)
Access control primitives (tokens, SDs, access checks) KACS (PSD-004)
Registry storage and configuration LCS (PSD-005) / loregd (PSD-006)