Skip to content
Agent/Update the agent

Agent

Update the agent

Run the install command again. The config stays as it is.

Updating is the install command again. On a box that already has the agent, the installer upgrades the package in place, keeps /etc/monilogix/config.yaml exactly as it is, and asks you nothing:

$curl -sSf https://monilogix.jpjapos.com/install.sh | sh

No key is needed — the box already has one. The current release is 0.10.0; Versions and features has what changed in it.

What an update does

  • downloads the new package and checks it against SHA256SUMS, exactly as a first install does
  • upgrades monilogix-agent in place and confirms the version that landed is the one it asked for
  • keeps /etc/monilogix/config.yaml as it is — the server, the key, which collectors are on and the interval all stay yours
  • restarts a running agent onto the new binary, or starts one that was not running

Because nothing is asked, the same line works where there is no terminal — Ansible, cloud-init, or a loop over SSH across a fleet. The chart may show a short gap around the moment the agent restarts.

Changing the key or the server at the same time

Only a flag you pass changes the config, and each one rewrites its own line and nothing else. To move a box to a different key:

$curl -sSf https://monilogix.jpjapos.com/install.sh | sh -s -- --key mlx_your_new_key

--server https://… does the same for server_url. Everything else in the file is left alone either way.

Turning on host access

The config is kept on update, so the update command with the flag added turns it on without touching anything else:

$curl -sSf https://monilogix.jpjapos.com/install.sh | sh -s -- --enable-host-access

Or edit /etc/monilogix/config.yaml and set host_access_enabled: true, then restart the service by hand. Either way needs agent 0.4.0 or newer — see Server analysis.

Container reporting after an update

Agent 0.5.0 reads this host's Docker containers and their logs, read-only, and it is on by default — so upgrading to it turns container reporting on without asking. The update keeps your config untouched, and a config with no docker_enabled line means on.

To upgrade with it off instead:

$curl -sSf https://monilogix.jpjapos.com/install.sh | sh -s -- --disable-docker

Docker containers covers what is read, what is deliberately left on the host, and how to turn it off for a whole self-hosted deployment at once.

Docker networks after an update

Agent 0.6.0 also reports which Docker networks each container is attached to, which is what the box page's Docker networks view groups by. It needs no config change at all: the names ride the container report that docker_enabled already governs, so a box that upgrades starts reporting them on its next batch.

Only the names are sent — no IP addresses, no MAC addresses, no endpoint ids. A box on an older agent reports none, and that view says so rather than claiming its containers are on no network.

Check what is running

The release dpkg has installed:

$dpkg-query -W -f='${Version}\n' monilogix-agent

And what the agent itself says. It logs its version as it starts — monilogix-agent 0.10.0 reporting to … — so the newest such line in its log is the binary actually running:

$journalctl -u monilogix-agent -n 50 --no-pager

Staying on a release

The unpinned command always moves a box to the current release. To hold a fleet on one you have tested, use the pinned form instead — it installs that release, and running it again changes nothing:

$curl -sSf https://monilogix.jpjapos.com/<VERSION_NUMBER>/install.sh | sh

Going back to a release older than the one installed is refused unless you ask for it by name, so an old pinned command re-run to fix a box cannot roll it back by accident:

$curl -sSf https://monilogix.jpjapos.com/<VERSION_NUMBER>/install.sh | sh -s -- --allow-downgrade

Updating by hand

The package upgrades over the old one without the script. dpkg keeps /etc/monilogix/config.yaml because the package marks it as configuration, and the package restarts a running agent itself. On an Intel or AMD machine:

$curl -sSfO https://downloads.jpjapos.com/monilogix/<VERSION_NUMBER>/monilogix-agent_<VERSION_NUMBER>_amd64.deb$curl -sSf https://downloads.jpjapos.com/monilogix/<VERSION_NUMBER>/SHA256SUMS | sha256sum --check --ignore-missing$sudo apt install ./monilogix-agent_<VERSION_NUMBER>_amd64.deb

On ARM, substitute arm64. Put the release you want where <VERSION_NUMBER> appears.

Installers from older deployments

The install command is served by your Monilogix deployment, and a deployment from before the installer learned to update rewrote /etc/monilogix/config.yaml on every run: collectors and interval went back to their defaults, and without --key the key was replaced with a placeholder, which stops the agent at its next restart.

To see which kind yours serves, ask it without running it. Any number above zero means it knows how to update:

$curl -sSf https://monilogix.jpjapos.com/install.sh | grep -c allow-downgrade

If it prints 0, update by hand as above, or redeploy Monilogix first.