Skip to content
Setup/Paste the key

SetupStep 4 of 5

Paste the key

Point the agent at its box.

If you installed with the one-line command and passed --key, this is already done — the installer wrote the file and started the agent. Skip to the next step.

Open /etc/monilogix/config.yaml and replace the placeholder key with the one generated for this box.

server_url: https://monilogix.jpjapos.comagent_key: mlx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx# Collect CPU usage from /proc/stat.# cm_cpu_enabled: true# Collect memory usage from /proc/meminfo.# cm_memory_enabled: true# Collect disk usage for every real filesystem.# cm_disk_enabled: true# Lets a server analysis run read-only commands on this# host as the unprivileged monilogix-reader user.# host_access_enabled: false# Reads this host's containers over the Docker socket.# Read-only. The agent cannot start, stop or exec anything.# docker_enabled: true# Reports who reached this host, on which port, and# whether the connection got through. Read-only.# connections_enabled: true# Lets the server block or unblock a source address at# this host's firewall on the owner's behalf.# control_enabled: false# Lets the server reboot this host, or run a script the# box's owner wrote, as root, when a metric holds at one# of the box's levels. Nothing runs until the owner turns# it on in the dashboard. Set to false to refuse it here.# threshold_actions_enabled: true# Lets the server open an interactive shell on this host.# terminal_enabled: false# Who a terminal session's shell runs as.# terminal_user: root

Only the first two lines are needed. Every other option is listed commented out, at its default value — uncomment a line and change it to override the default.

Then start it:

$sudo systemctl start monilogix-agent

Settings

SettingRequiredAgentDescription
server_urlYes0.2.0+Where to send metrics. Your Monilogix API.
agent_keyYes0.2.0+This box's key. The agent will not start without it.
cm_cpu_enabledNo0.2.0+Collect CPU from /proc/stat. Defaults to true.
cm_memory_enabledNo0.2.0+Collect memory from /proc/meminfo. Defaults to true.
cm_disk_enabledNo0.2.0+Collect disk usage per mount. Defaults to true.
host_access_enabledNo0.4.0+Lets a server analysis run a fixed set of read-only commands on this host as the unprivileged monilogix-reader user. Optional — absent means false — and understood by agent 0.4.0 and newer only; an older agent refuses to start if this line is in its config. See Server analysis in the docs.
docker_enabledNo0.5.0+Reads this host's containers over the Docker socket — what is running, its status and its logs — and reports them to your dashboard. Read-only: the agent has no way to start, stop or exec anything. Defaults to true, so the line is only needed to turn it off. Understood by agent 0.5.0 and newer only; an older agent refuses to start if this line is in its config.
connections_enabledNo0.9.0+Reports who reached this host, on which port, and whether the connection got through, read from the kernel's own connection tracking. Defaults to true; nothing is executed and nothing is written. Understood by agent 0.9.0 and newer only; an older agent refuses to start if this line is in its config.
control_enabledNo0.10.0+Lets the server run a fixed set of named control actions on this host — in v1, blocking or unblocking a source address at its firewall (see ADR 0006). Off unless this line says otherwise, the more conservative default of the two write-capable settings here, since this is the first one that can change the host rather than only read it. Not yet shipped in a released agent — "dev" means a source build only, and the installer does not yet write this line for any release.
threshold_actions_enabledNo0.10.0+The host's opt-out for threshold actions (see ADR 0007): when a metric holds at one of the box's levels, the server may ask this host to reboot, or to run a script the box's owner wrote, as root. Defaults to true, and nothing runs until the owner turns threshold actions on in the dashboard — set it to false to refuse every threshold action on this host whatever the dashboard says. The installer never writes this line.
terminal_enabledNo0.10.0+Lets the server open an interactive shell on this host, as root if terminal_user below says so (see ADR 0005). Off unless this line says otherwise — granting it needs somebody who already has root on the box, since it can only be turned on by editing this file. Not yet shipped in a released agent — "dev" means a source build only, and the installer does not yet write this line for any release.
terminal_userNo0.10.0+Who a terminal session's shell runs as. Defaults to the unprivileged monilogix-reader; set to "root" for an actual root shell, which is a second, deliberate opt-in on top of terminal_enabled. Not yet shipped in a released agent — "dev" means a source build only, and the installer does not yet write this line for any release.

server_url is where your Monilogix API lives — https://monilogix.jpjapos.com for the hosted service, or your own deployment if you are self-hosting. The agent talks only to that URL; it never touches the database directly.

The file is read by a small key/value parser, not a full YAML one. Two rules follow from that: an unrecognised setting stops the agent rather than being ignored, and comments must be on their own line — anything after a value on the same line becomes part of it. That first rule is why host_access_enabled and docker_enabled are both optional and left out above: add either only on the release whose parser knows it — 0.4.0 and 0.5.0 respectively — because an older agent refuses to start with that line in its config.

Containers

From agent 0.5.0 the agent also reads this host's Docker containers and their logs, read-only. It is on by default, which is why there is no line for it above: an absent docker_enabled means on, and the setting is only needed to turn it off.

docker_enabled: false

Docker containers covers what is read, what is deliberately left on the host, and the server-wide switch for a self-hosted deployment.

Turning collectors off

Set any of the cm_*_enabled settings to false and that metric stops being collected. The chart shows a gap rather than a flat zero, because “not measured” and “measured as idle” are different things and the dashboard will not conflate them.

Applying a change

$sudo systemctl restart monilogix-agent

The config is read once at start-up, so every change needs a restart to take effect.

The file holds a credential. The package installs it root-owned and mode 0640; keep it that way if you create it by hand — sudo chmod 0640 /etc/monilogix/config.yaml.

If it will not start

The agent exits with an error rather than running and reporting nothing, so a mistake here shows up as a failed service with the reason in the journal. The three common ones:

  • agent_key is not set — the placeholder is still there.
  • unrecognised settings — a typo, or a setting from an older version. The message names the line.
  • server_url must be a full http(s) URL — the scheme is missing.