Config¶
The main configuration file defines the input source, output destinations, rule locations, logging, and other operational settings.
Overview¶
Top-Level Fields
| Field | Required | Description |
|---|---|---|
input |
Event source configuration | |
outputs |
Alert destination(s) | |
rules |
Directory containing detection rule files | |
logging |
Operational logging configuration | |
scopes |
Rule scoping configuration | |
risk |
Risk-based alerting configuration | |
functions |
Lite functions directory | |
metrics |
Prometheus metrics configuration | |
state |
Persistent state directory for key-value operations | |
concurrency |
Parallel processing settings | |
geoip |
GeoIP database configuration | |
shutdown_timeout |
Maximum time to deliver pending alerts on shutdown (default: 10s). |
Relative paths
Relative paths are resolved from the config file's directory. Paths given on the command line are relative to the working directory.
Input¶
File¶
Reads JSON events from a local file, one event per line.
Fields
| Field | Required | Description |
|---|---|---|
type |
Must be file |
|
path |
Path to JSON events file | |
start_position |
resume (default), beginning or end. |
|
max_line_length |
Maximum line length in bytes (default: 65536). |
|
throttle |
Rate limiting configuration |
Start position¶
| Value | Behavior |
|---|---|
resume |
Continue where the previous run stopped. A new, rotated or truncated file is read from the start. |
beginning |
Read the whole file on every start. |
end |
Read only lines written after start. |
Kafka¶
Reads events from a Kafka topic using a consumer group.
input:
type: kafka
brokers: [kafka:9092]
topic: security-events
consumer_group: inobi
kafka_version: 2.0.0
start_position: resume
Fields
| Field | Required | Description |
|---|---|---|
type |
Must be kafka |
|
brokers |
List of Kafka broker addresses | |
topic |
Kafka topic to consume from | |
consumer_group |
Consumer group ID | |
kafka_version |
Kafka version (e.g., 2.0.0, 3.0.0). See list |
|
start_position |
resume (default) continues from the committed offset. beginning and end start from the oldest or newest offset |
|
tls |
TLS for broker connections. Same fields as the socket output TLS | |
auth |
Authentication configuration | |
throttle |
Rate limiting configuration |
Authentication¶
Optional SASL authentication for Kafka inputs and outputs.
| Field | Required | Description |
|---|---|---|
auth.sasl.mechanism |
SASL mechanism: PLAIN, SCRAM-SHA-256, or SCRAM-SHA-512 |
|
auth.sasl.username |
SASL username | |
auth.sasl.password |
SASL password |
Socket¶
Listens for JSON events over TCP or Unix stream sockets. Each connection is handled concurrently, and events are read as newline-delimited lines.
Fields
| Field | Required | Description |
|---|---|---|
type |
Must be socket |
|
mode |
tcp or unix |
|
address |
Conditional | Listen address (e.g., 0.0.0.0:9000). Required when mode: tcp |
path |
Conditional | Unix socket path. Required when mode: unix |
max_connections |
Maximum concurrent TCP connections. 0 or omitted means unlimited |
|
max_line_length |
Maximum line length in bytes (default: 65536 / 64 KB). Exceeding lines are dropped |
|
tls |
TLS configuration (TCP mode only) | |
throttle |
Rate limiting configuration |
TLS¶
Optional TLS configuration for TCP socket listeners. Supports server-side TLS and mutual TLS (mTLS) for client certificate verification.
input:
type: socket
mode: tcp
address: 0.0.0.0:6514
tls:
cert_file: /etc/inobi/server.crt
key_file: /etc/inobi/server.key
ca_file: /etc/inobi/ca.crt
| Field | Required | Description |
|---|---|---|
tls.cert_file |
Path to server certificate (PEM format) | |
tls.key_file |
Path to server private key (PEM format) | |
tls.ca_file |
Path to CA certificate for client verification (PEM format). Mutual TLS is enabled when set. |
Unix Socket¶
The socket file is created automatically on startup. Clients connect using standard Unix stream socket.
Throttle¶
Optional rate limiting configuration that can be applied to inputs. Useful for testing or managing system load.
| Field | Required | Description |
|---|---|---|
enabled |
Enable throttling | |
mode |
backpressure (slows down reading) or discard (drops excess events) |
|
max_events |
Maximum events per period | |
period |
Time period (e.g., 1s, 100ms) |
|
buffer_size |
Internal buffer size |
Outputs¶
Inobi supports multiple outputs simultaneously. Each output receives the event types specified by its events field.
Common Fields
| Field | Required | Description |
|---|---|---|
events |
Event types this output receives: alerts, risk_events, or both (default: ["alerts"]) |
When Risk-Based Alerting is enabled, you can route risk contribution events to a dedicated output, or combine both alerts and risk events in the same output:
outputs:
- type: kafka
topic: security-alerts
# events defaults to ["alerts"]
- type: file
path: risk-events.json
events: ["risk_events"]
- type: stdout
indent: true
events: ["alerts", "risk_events"]
Standard Output¶
Prints alerts to stdout.
Fields
| Field | Required | Description |
|---|---|---|
type |
Must be stdout |
|
indent |
If true, formats JSON with indentation (default: false) |
File¶
Appends alerts to a local file, one JSON object per line. Supports optional size-based rotation.
Fields
| Field | Required | Description |
|---|---|---|
type |
Must be file |
|
path |
Path to output file (created if doesn't exist) | |
max_size |
Maximum file size in megabytes before rotation. If 0 or omitted, rotation is disabled |
|
max_files |
Number of rotated files to keep (default: 5) |
|
compress |
Gzip compress rotated files (default: false) |
When rotation is enabled, rotated files are stored alongside the original file.
Kafka¶
Publishes alerts to a Kafka topic.
outputs:
- type: kafka
brokers: [kafka:9092]
topic: security-alerts
kafka_version: 2.0.0
buffer_size: 1000
buffer_mode: block
Fields
| Field | Required | Description |
|---|---|---|
type |
Must be kafka |
|
brokers |
List of Kafka broker addresses | |
topic |
Kafka topic to publish alerts | |
kafka_version |
Kafka version (e.g., 2.0.0, 3.0.0). See list |
|
buffer_size |
Maximum messages buffered when the broker is slow/unreachable (default: 1000) |
|
buffer_mode |
block (default) or drop. In block mode, the pipeline stalls when the buffer is full. In drop mode, the oldest message is dropped |
|
tls |
TLS for broker connections. Same fields as the socket output TLS | |
auth |
Authentication configuration. See Authentication. |
HTTP¶
Sends alerts as HTTP requests to a remote endpoint. Supports custom headers, TLS, and automatic retries with exponential backoff.
outputs:
- type: http
uri: https://alerts.example.local/api/ingest
method: POST
buffer_size: 1000
buffer_mode: block
allow_startup_failure: false
headers:
Authorization: Bearer my-token
X-Source: inobi
timeout: 10s
tls:
enabled: true
ca_file: /etc/inobi/ca.crt
Fields
| Field | Required | Description |
|---|---|---|
type |
Must be http |
|
uri |
Destination URL | |
method |
HTTP method (default: POST) |
|
headers |
Map of custom HTTP headers to include in each request | |
timeout |
Request timeout (default: 10s) |
|
buffer_size |
Maximum messages buffered when the endpoint is slow/unreachable (default: 1000) |
|
buffer_mode |
block (default) or drop. In block mode, the pipeline stalls when the buffer is full. In drop mode, the oldest message is dropped |
|
allow_startup_failure |
If true, Inobi starts even if the endpoint is unreachable (default: false) |
|
tls |
TLS for https:// URIs. Same fields as the socket output TLS. |
|
indent |
If true, formats JSON with indentation (default: false) |
All errors are retried indefinitely with backoff until the request succeeds or the engine shuts down. Poison messages (HTTP Status 400, 413, 422) are dropped since they indicate a permanently undeliverable payload.
Socket¶
Sends alerts as newline-delimited JSON over a TCP or Unix stream socket. Inobi acts as a client, dialing out to a remote listener. Supports TLS and mutual TLS (mTLS).
outputs:
- type: socket
mode: tcp
address: "10.0.0.5:9000"
buffer_size: 1000
buffer_mode: block
allow_startup_failure: false
tls:
enabled: true
ca_file: /etc/inobi/ca.crt
cert_file: /etc/inobi/client.crt
key_file: /etc/inobi/client.key
Fields
| Field | Required | Description |
|---|---|---|
type |
Must be socket |
|
mode |
tcp or unix |
|
address |
Conditional | Remote address (e.g., 10.0.0.5:9000). Required when mode: tcp |
path |
Conditional | Unix socket path. Required when mode: unix |
buffer_size |
Maximum messages buffered when the connection is down (default: 1000) |
|
buffer_mode |
block (default) or drop. In block mode, the pipeline stalls when the buffer is full. In drop mode, the oldest message is dropped |
|
allow_startup_failure |
If true, Inobi starts even if the socket is unreachable (default: false) |
|
tls |
TLS configuration | |
indent |
If true, formats JSON with indentation (default: false) |
TLS¶
Optional TLS configuration for encrypted socket connections. Supports server certificate verification, custom CAs, and mutual TLS with client certificates.
tls:
enabled: true
skip_verify: false
ca_file: /etc/inobi/ca.crt
cert_file: /etc/inobi/client.crt
key_file: /etc/inobi/client.key
| Field | Required | Description |
|---|---|---|
tls.enabled |
Enable TLS for the connection | |
tls.skip_verify |
Skip server certificate verification (default: false) |
|
tls.ca_file |
Path to CA certificate for server verification (PEM format). If omitted, system CA pool is used | |
tls.cert_file |
Path to client certificate for mTLS (PEM format) | |
tls.key_file |
Path to client private key for mTLS (PEM format) |
Unix Socket¶
Reconnection Behavior¶
If the connection is lost at runtime, Inobi reconnects automatically with backoff. Messages are buffered up to buffer_size. When the buffer is full, the behavior depends on buffer_mode:
block(default): the pipeline stalls until the connection is restored and the buffer drains. In a multi-sink configuration, this blocks all sinks because they share the same upstream fan-out.drop: the oldest buffered message is dropped to make room for newer ones.
Multiple Outputs¶
You can send alerts to multiple destinations:
Rules¶
Specifies where Inobi loads detection rules from.
Fields
| Field | Required | Description |
|---|---|---|
directory |
Path to directory containing .yaml rule files |
Inobi loads all .yaml files in this directory at startup. Rule files can be nested in subdirectories.
Functions¶
Loads lite functions, expression-only helpers defined in YAML and inlined into rules at rule compile time.
Fields
| Field | Required | Description |
|---|---|---|
directory |
Path to directory containing .yaml lite function files. If omitted, no lite functions are loaded |
Inobi loads all .yaml files in this directory at startup. Function files can be nested in subdirectories. Function names must be unique across all files.
Logging¶
Controls Inobi's operational logging, not alert output. The logs are JSON-formatted.
Fields
| Field | Required | Description |
|---|---|---|
type |
stdout or file (default: stdout) |
|
level |
debug, info, warn, or error (default: info) |
|
path |
Conditional | Required if type: file. Path to log file |
Scopes¶
Rule scoping is disabled by default. If scopes are loaded, all rules must reference valid scope definitions.
Fields
| Field | Required | Description |
|---|---|---|
directory |
Path to directory containing .yaml scope definitions |
Risk¶
Enables Risk-Based Alerting. When this section is present, rules with risk entries contribute scores to entities. When omitted, risk entries on rules are ignored.
risk:
alerts: true
defaults:
ttl: 1h
decay: none
thresholds:
user:
low: 25
medium: 50
high: 75
critical: 90
alert_level: medium
ip:
low: 20
medium: 50
high: 80
critical: 100
Alerts¶
| Field | Required | Description |
|---|---|---|
alerts |
Enable risk threshold alert generation. Default: true when thresholds are defined, false otherwise. |
When alerts is false, risk scores are still accumulated and regular alerts are enriched with risk context (risk field), but no risk threshold alerts are generated.
Defaults¶
Default values applied to risk entries that don't specify their own.
| Field | Required | Description |
|---|---|---|
defaults.ttl |
Default contribution time-to-live (e.g., 30m, 1h, 24h). Fallback: 1h |
|
defaults.decay |
Default decay function: none or linear. Fallback: none |
Thresholds¶
Risk score thresholds per entity type. When a threshold is crossed, a risk alert is generated (requires alerts to be enabled, the default when thresholds are defined). Thresholds also enrich regular alerts with a level field in the risk context, regardless of whether alerts is enabled.
All four levels must be defined for each entity type, in ascending order (low < medium < high < critical).
| Field | Required | Description |
|---|---|---|
thresholds.<entity_type>.low |
Score threshold for low level |
|
thresholds.<entity_type>.medium |
Score threshold for medium level |
|
thresholds.<entity_type>.high |
Score threshold for high level |
|
thresholds.<entity_type>.critical |
Score threshold for critical level |
|
thresholds.<entity_type>.alert_level |
Minimum level that generates risk threshold alerts: low, medium, high, critical. Scores below this level are tracked and enrich regular alerts, but don't generate risk threshold alerts. |
The highest crossed threshold determines the level.
Risk events are routed to outputs using the events field on each output. See Outputs for details.
Metrics¶
Enables a Prometheus metrics endpoint.
Fields
| Field | Required | Description |
|---|---|---|
port |
HTTP port for /metrics endpoint. If 0 or omitted, metrics are disabled |
When enabled, metrics are available at http://0.0.0.0:8081/metrics.
State¶
Configures persistent state storage directory for key-value operations.
Fields
| Field | Required | Description |
|---|---|---|
directory |
Directory for persistent state (default: state next to the config file) |
|
flush_interval |
How often state changes are written to disk (default: 1s) |
The directory is created automatically if it doesn't exist.
State is kept in memory and written to disk in batches every flush_interval, and once more on shutdown. If the process crashes, changes from up to the last flush_interval are lost.
Concurrency¶
Controls parallelism for event processing.
Fields
| Field | Required | Description |
|---|---|---|
parse_workers |
Number of JSON parsing workers (default: 1) |
|
match_workers |
Number of match evaluation workers (default: 1) |
|
extended_match_workers |
Number of extended_match evaluation workers (default: 1) |
|
composite_workers |
Number of composite rule evaluation workers (default: 1). |
GeoIP¶
Configures GeoIP database settings.
Fields
| Field | Required | Description |
|---|---|---|
path |
Path to GeoIP database (supports MaxMind GeoLite2 and GeoIP2 databases) |
Environment Variables¶
Any value in the main config file can reference an environment variable with ${VAR}. If the variable might not be set, provide a default with ${VAR:-default}.