Configure the sensor
Change what the Octic sensor captures and how it runs, with an optional configuration file on each host.
The sensor runs on built-in defaults, and most hosts never need a configuration file. Use one to narrow what Claude Code and Codex sessions capture, turn parts of collection off, or change how often the sensor reports. This page covers the common changes; Configuration reference lists every key.
| Platform | File |
|---|---|
| Linux | /etc/octic/octic-sensor/config.yaml |
| Windows | C:\ProgramData\Octic\Sensor\config.yaml |
| macOS | /Library/Application Support/OcticSensor/config.yaml |
The keys are the same on every platform. The examples on this page use the Linux path.
On Linux, a missing config.yaml is not an error, and an empty one is
valid. Set only the keys you want to change, so every other setting keeps
its default as the sensor is upgraded. The installer leaves a fully
commented copy of every setting beside it, at
/etc/octic/octic-sensor/config.yaml.example.
On Windows, the file is private to the LocalSystem account. Change the
endpoints with the installer's -Configure parameter; see
Command-line reference.
On macOS, the installer writes the file containing only {}, which keeps
every default, and the sensor won't start without it: edit it, but don't
delete it. The file and its folder are private to root. Once you change it,
running the install command again stops with Existing configuration differs
or is not readable and regular; Upgrade and
uninstall shows
how to upgrade around it.
Edit the file
Create or edit the file as root, keeping it private to root:
Linux host, as rootbash install -m 0640 /dev/null /etc/octic/octic-sensor/config.yamlvi /etc/octic/octic-sensor/config.yamlSkip the
installline if the file already exists.Restart the service
Linux host, as rootbash systemctl restart octic-sensor.serviceCheck the result
Linux hostbash sudo octic-sensor statusThe
configurationcheck reports whether the file loaded. A file the sensor can't use stops the service from starting;journalctl -u octic-sensor.serviceshows why.
Edit the file
Edit the file as root:
Mac, Terminalbash sudo vi "/Library/Application Support/OcticSensor/config.yaml"Replace the
{}with the keys you want to set, or keep it if you remove them all again.Restart the service
Mac, Terminalbash sudo /usr/local/libexec/octic-sensor stopsudo /usr/local/libexec/octic-sensor startstartrefuses a file the sensor can't use, and says why.Check the result
Mac, Terminalbash sudo /usr/local/libexec/octic-sensor statusThe
configurationcheck reports whether the file loaded.
Capture is full by default. To stop specific content leaving your hosts, turn off its switch. This keeps prompts but drops tool output and the model's replies:
claude_hooks: capture: tool_outputs: false assistant_messages: falseCodex events follow the same switches, field by field. To set Codex
differently, add codex_hooks.capture:
claude_hooks: capture: tool_outputs: falsecodex_hooks: capture: prompts: falseWhat the sensor collects describes each switch.
To stop collecting Claude Code sessions, turn the hooks off. The sensor then removes its Claude Code settings file from the host on its next pass, which also turns off the cost telemetry it set up:
claude_hooks: enabled: falseTo stop collecting Codex sessions, the sensor removes its own entries from the Codex configuration, and only those:
codex_hooks: enabled: falseTo keep the hooks but stop relaying Claude Code's own telemetry (the per-request cost), turn the relay off:
telemetry: enabled: falseIf you manage Claude Code's settings with your own tooling, set the path to an empty string. The sensor then leaves the host's Claude Code policy alone and only collects what arrives in its queue:
claude_hooks: managed_settings_path: ""The relay listens on 127.0.0.1:4318. If another program uses that port,
the sensor logs it and runs without the relay. Pick another port; the
address must be a loopback address:
telemetry: listen_addr: 127.0.0.1:14318The sensor updates the endpoint in the Claude Code settings to match. Start a new Claude Code session to pick it up.
The sensor polls every 5 minutes. Set interval in Go duration syntax, such
as 30s, 10m or 1h. A shorter interval adds load on the host:
interval: 10mKeep the interval well under 15 minutes, or the host shows Offline on Sensors between heartbeats.
When the sensor can't reach Octic, it keeps Claude Code and Codex events queued on the host for up to 7 days, and at most 10,000 per queue. When either limit is reached, the oldest events are dropped first and the sensor reports the loss. On Linux, the system also clears queued events older than 7 days, in case the service is stopped.
To keep less on the host, lower the limits. Each queue has its own:
claude_hooks: max_event_age: 72h max_spool_events: 5000codex_hooks: max_event_age: 72h max_spool_events: 5000Last updated
Was this page helpful?