Skip to main content

Location overrides

Most of the time the agent finds real paths on its own. It parses the running service, not defaults: nginx -T for the access log, mysqladmin variables for the datadir and socket and slow log, the php-fpm pool socket, the systemd ExecStart, and so on. A log in /www/logs instead of /var/log is found, not assumed.

When you do need to override a location, there are four ways to set it. They all resolve the same location facts (paths, config, socket, port). Precedence is explicit override first, then auto-discovery.

  1. Auto-discovery (default): the agent reads the real config as described above.
  2. Install flags: pass them at bootstrap, for example --nginx-log-path=/www/logs or --<service>-conf=, --<service>-socket=, --<service>-port=.
  3. Backend / console per-host: pushed from the server. Best for fleets, fully configless on the host.
  4. Local wakora.conf: an INI file, good for golden images or air-gapped setups.

Sources 2 and 3 are persisted by the agent into wakora.conf, so a manual edit and the pushed value end up in the same place. Manual edits apply on agent restart.

wakora.conf format

INI with MySQL-style sections. It contains non-secret location overrides only. It never contains a key, an endpoint, or an update URL.

[nginx]
log-path = /www/logs

[mysql]
slow-log = /var/log/mysql-custom/slow.log

Setting an override from the CLI

wakora --set nginx.log-path=/www/logs

This writes the value into wakora.conf and exits. The change applies on the next agent start.

Only non-secret values

Location overrides are paths, sockets and ports. They are not secrets, so they can safely come from the server or a flag. Credentials go through a different, local-only path. See Secrets.