Configuration Reference
Ketos Agent uses a clean four-section YAML configuration exposing only what operators actually tune:
global(optional): Default intervals, capture windows, and ingestion budgets inherited byinputsandalerts.inputs: Enabled integrations (host, logs, APM, HTTP probe) and their schedules.alerts: Detection rules, evaluation cadence, and capture scope.storage(optional): Local storage directory and dual hard quotas.
[!TIP] All duration fields use standard Go duration syntax (e.g.
500ms,5s,1m,30m). Onlyinputsandalertsare required; everything else has safe production defaults.
Complete Example
Section titled “Complete Example”global: interval: 5s eval_interval: 1s for: 0s resolve_for: 15s before: 60s after: 15s capture_on_resolve: true
inputs: host: - id: default log_file: - id: order_app path: /var/log/order/app.log apm: - id: order_svc http_listen: "127.0.0.1:4318" http_probe: - id: api_prod url: https://api.example.com/health interval: 10s timeout: 5s
alerts: - id: host_cpu_mem_high severity: critical for: 30s expr: 'avg("cpu.usage_pct", 60) > 85 && last("mem.usage_pct") >= 85'
- id: api_prod_down_or_slow severity: critical for: 10s before: 120s after: 30s expr: 'last("http_probe.api_prod.up") == 0 || avg("http_probe.api_prod.latency_ms", 60) > 1500' attach: ["host/default"]
storage: dir: ./data max_disk_mb: 50 max_snapshots: 500global Defaults
Section titled “global Defaults”| Field | Type | Default | Description |
|---|---|---|---|
interval |
duration | 5s |
Default collection interval inherited by inputs |
eval_interval |
duration | 1s |
Default rule evaluation interval inherited by alerts |
for |
duration | 0s |
Default trigger debounce duration |
resolve_for |
duration | 15s |
Default recovery debounce duration to prevent flapping |
before |
duration | 60s |
Pre-trigger metric window frozen on incident capture |
after |
duration | 15s |
Post-trigger window awaited asynchronously after trigger |
capture_on_resolve |
bool | true |
Whether to write a closing ..._resolved.md snapshot on recovery |
apm_max_inflight_requests |
int | 2 |
Shared max in-flight OTLP HTTP/gRPC requests (restart required) |
inputs Integrations
Section titled “inputs Integrations”Four built-in integration types are supported, each allowing multiple named instances (omitting inputs entirely starts a default inputs.host instance with id: default):
- Host & Process Forensics (
inputs.host):id,interval,root_path,mount_point,top_processes_limit - Application Logs (
inputs.log_file):id,path,from_beginning,poll_interval,max_line_bytes,max_lines_per_sec,max_read_bytes_per_poll,trace_id_regex - APM Traces & RED Metrics (
inputs.apm):id,http_listen,grpc_listen,service_name,slow_threshold_ms,http_read_timeout,max_priority_mb,max_recent_mb,max_traces_per_snapshot - HTTP Availability Probe (
inputs.http_probe):id,url,method,interval,timeout,expected_status,headers,follow_redirects,insecure_skip_verify
See each integration page for full field tables and emitted metrics.
alerts Detection Rules
Section titled “alerts Detection Rules”| Field | Type | Default | Description |
|---|---|---|---|
id |
string | required | Unique rule ID; also used as snapshot folder data/snapshots/<id>/ |
severity |
string | warning |
Severity level (e.g. info, warning, critical) |
every |
duration | global.eval_interval |
Rule evaluation cadence |
for |
duration | global.for |
Trigger debounce duration |
resolve_for |
duration | global.resolve_for |
Recovery debounce duration |
repeat |
duration | 0s (off) |
Optional repeat capture interval while continuously firing (e.g. 30m) |
capture |
bool | true |
Whether to capture an incident context when triggered |
capture_on_resolve |
bool | global.capture_on_resolve |
Whether to capture a recovery snapshot on Resolved |
before |
duration | global.before |
Per-rule pre-trigger window override |
after |
duration | global.after |
Per-rule post-trigger window override |
attach |
[]string |
[] |
Extra collector instances to include (e.g. ["host/default"] or ["*"]) |
type |
string | expr |
expr (single expression) or sequence (ordered causal stages) |
expr |
string | - | Alert expression (required when type: expr) |
stages |
[]string |
- | Ordered stage expressions (required when type: sequence) |
within |
duration | - | Maximum window to complete all stages (type: sequence) |
storage Local Storage & Quotas
Section titled “storage Local Storage & Quotas”| Field | Type | Default | Description |
|---|---|---|---|
dir |
string | ./data |
Root data directory; snapshots are stored under <dir>/snapshots/ |
max_disk_mb |
int | 50 |
Hard disk ceiling in MB; oldest snapshots are evicted FIFO |
max_snapshots |
int | 500 |
Hard file-count ceiling; oldest snapshots are evicted FIFO with empty rule dirs pruned |
Hot Reload Boundaries
Section titled “Hot Reload Boundaries”When config.yml is saved (or SIGHUP is sent):
- Applied live without data loss: Adding, removing, or modifying
alertsrules, thresholds, andbefore/afterwindows. - Requires restart (logged as WARN): Changing
inputs, ingestion budgets,storagesettings, orlocal_onlymode.
See Security & Resource Limits for all hard limits and degradation rules.