Skip to content
Containers/Docker containers

Containers

Docker containers

What the agent reads about your containers, their live logs, and how to turn it off.

From agent 0.5.0 a box's page has a Docker section: every container on the server, whether it is running, what it is using, and its logs as they are written. It is on by default and reads only — the agent has no way to start, stop, restart or exec anything in a container.

What you see

The section has two views, each tagged with how many things it holds. Docker containers comes first and is where every box opens: every container on the server, running or stopped. Docker networks groups them into the Docker networks they are attached to, and needs agent 0.6.0 or newer.

A container's card shows its name, the application it is running, its state, how long it has been up, its published ports, and its logs. Its CPU and memory appear once the card is expanded — a grid of a dozen containers each carrying two figures is more numbers than anyone reads at a glance.

Containers show as a list by default, one row each; the buttons beside the view switch change it to a grid of cards, and the choice is remembered in your browser. In the list, the arrow opens a row's details and logs beneath it — several at once, if you want to compare them — and the expand button opens one container full-size, with a taller log and longer scrollback.

Which application it is

Software that names itself in its image — redis, nginx, postgres — is recognised from the image name. Your own images usually say nothing: an acme/api image running a Go binary never mentions Go anywhere Docker can see. So from agent 0.7.0 the agent looks at each running container's main process instead:

  • a Go binary's own build information, which names Go and its web framework (Gin, Echo, Fiber, chi);
  • for Node, the dependency names in the package.json in the process's working directory (Next.js, NestJS, Nuxt, Astro, Remix, Vue, React, Express, Fastify), and a .next directory beside it, which is how a standalone Next.js build is recognised;
  • for PHP, Laravel's artisan or the composer.json in the working directory; for Python and Ruby, Django's manage.py and Rails on the command line.

Only one word for the runtime and one for the framework leave the host, each from a fixed list — never a file, a path, a version or a package name. A container is looked at once each time it starts, not on every refresh. On an older agent, the dashboard still guesses from the image and the command, which gets infrastructure right and is often silent about your own services.

Where a container is not recognised, or is recognised wrongly, choose its logo yourself: Change logo in a list row's details, or the pencil on a card, offers every icon Monilogix has. The choice is saved for that box by container name, so a redeploy that recreates the container keeps it. Automatic goes back to detection, and shows what detection would pick.

Docker networks

From agent 0.6.0 the agent reports which Docker networks each container is attached to, and this view draws one panel per network. That is the question it answers: which containers can actually reach each other. A node names the container and its state and nothing else; clicking one opens the same card the grid shows, logs included.

A container attached to several networks appears in each of them, badged with how many it is on. That is not double-counting — a reverse proxy bridging two networks is precisely what you opened this view to see.

Only the network names leave your server. The Docker API also returns an IP address, a MAC address and an endpoint id for each one; the agent does not declare those fields, so it cannot send them.

A box whose agent is older than 0.6.0 reports no networks, and Docker networks says exactly that — with no count on its tab, since the number is unknown rather than zero. It does not claim the containers are attached to nothing, and Docker containers is unaffected. Update the agent to 0.6.0 for Docker networks — the unpinned install command follows whichever release is current, so pin the version if it has not moved yet.

A card's logs are live. They arrive as the container writes them, over a single stream shared by every card on the page, and what is stored is there to read the moment you open it. A container that has stopped shows what it logged before it exited.

To read what the containers were printing at a particular moment, rest the pointer on that moment in the box's usage chart for a second — on a phone, tap it — and choose View logs from. The logs open full screen, side by side, one panel per container, each of which can be expanded. Every panel starts at that moment and reads forward to the present. Only containers the agent reports now have a panel.

A box whose agent is older than 0.5.0 says so rather than claiming the server has no Docker. Nothing has told us either way, and saying otherwise about your server would be a guess. Update the agent to see containers.

The Activity timeline

Above the Docker section is Activity: what happened around the spikes, for the same window the chart is showing. Clicking a row moves the chart to that moment, which is the point of it — the row says what happened, and the chart then shows what the metrics were doing while it did.

It carries:

  • Threshold crossings. When a metric went warning or critical and when it came back. Computed by the server from the metrics it already has, so this and your alert emails can never disagree.
  • Out-of-memory kills. When the kernel killed something to reclaim memory. This one has no attribution — the counter says a kill happened and nothing about what died — so the row says exactly that and no more.
  • Containers restarting and dying, with their exit code. A container killed with 137 is nearly always out of memory, and the row says so.
  • What was running during a spike. When CPU or memory stays above 85% for half a minute, the agent records the top eight processes. That is the "why" a percentage cannot give you.

Segfaults and kernel I/O errors are not covered. They live in the kernel log, which the agent's systemd sandbox denies it — and weakening that on a daemon running as root on your server is not a trade worth making for a timeline row.

What is read, and what is not

The agent talks to /var/run/docker.sock directly, over a client that can only issue GET requests. Every Docker endpoint that changes anything — start, stop, kill, exec, remove — is a POST, PUT or DELETE, so being unable to issue one is what makes this read-only. It is a property of the code rather than a check that has to fire.

It reads:

  • the container list, with each one's state, health and ports;
  • each container's CPU and memory;
  • each running container's log output;
  • from 0.7.0, each running container's main executable and the manifest in its working directory, to name what it runs — see which application it is.

Two things are deliberately left behind on the host:

  • Environment variables are never collected. Nothing decodes them and nothing sends them — they are the usual home of a database password.
  • Labels are not sent wholesale. Only the standard image labels and Compose's project and service names leave the host — labels are free-form and routinely carry connection strings and licence keys.

Every log line is checked for Monilogix agent keys and private-key blocks before it is sent, and those are replaced. That is a backstop rather than a guarantee: a container that prints a password prints it, and Monilogix cannot know that is what it was.

Container logs are never sent to Anthropic. A server analysis reads your metrics and, with host access on, a fixed set of read-only commands — containers are not part of it.

How much it sends

Logs are capped on the host, not after they arrive: each container is held to 200 lines and 64 KiB a second, and the whole box to 2000 lines a second. A container that goes past it — a crash loop, usually — has lines dropped, and the log says so where they were dropped rather than closing the gap silently.

Lines are kept exactly as long as the box's metrics: they follow the retention rule the box is in, and when a reading is deleted, so are the lines logged around it. Deleting a box deletes its logs too.

Turning it off

At install time, for one host:

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

Or on a host that is already running, by setting this in /etc/monilogix/config.yaml and restarting:

docker_enabled: false
$sudo systemctl restart monilogix-agent

The line is only understood by agent 0.5.0 and newer. An older agent treats an unrecognised setting as fatal and refuses to start, so do not add it to a config on an older release — the installer refuses the flag for one before it downloads anything.

When the setting is off the agent reads nothing about containers and opens no socket. A box that stops reporting keeps whatever it last reported, the same way a host clock does, so the section may show a container list from before you turned it off until you delete the box.

On your own deployment

Setting DOCKER_LOGS_ENABLED=false on the server refuses container logs for every box at once, without touching a single host. Agents notice, back off, and keep sending metrics. Container lists are unaffected — this is the switch for the log volume, which is the part that costs bandwidth and disk.