An agent that is offline
What Kosken shows when an agent stops reporting, what it does with incidents, and how to find the cause on the machine.
On this page
This guide shows what Kosken does when the agent of a machine stops reporting, and how to find the cause on the machine.
What Kosken shows
The agent sends a heartbeat every 15 seconds by default. After 3 missed heartbeats, Kosken marks the machine Offline. With the defaults, this takes about 45 seconds.


- Machines: the state is Offline, and Last seen shows the time of the last report.
- Overview: the card Machines online counts the machines that are offline. When only one is offline, it shows its name and the time Kosken last saw it.
- The tab Access of the machine: in Ways to run an order, the path Agent is Offline.
- Channels: Kosken sends the event Machine offline with the severity warning, and Machine online when the agent comes back. See Channels.
A paused machine sends no offline or online notice. Pause the monitoring before you turn a machine off on purpose. See the Settings tab.
Incidents while the agent is offline
- Kosken does not open an incident because an agent is offline. The notice goes to your channels only.
- The monitors of the machine run on the agent. While it is offline, they send no result, so they do not fire and do not clear.
- An order for an offline agent waits. If the agent does not come back in 10 minutes (the default), the incident stops in the state Failed and says that the agent was offline. Fix the cause on the machine, then close the incident.
Find the cause on the machine
The agent runs as two systemd units: kosken-agent (it talks to Kosken) and kosken-exec (the executor, it runs recipes). Log in to the machine and run these commands.
- Make sure that the machine is on and has a network connection.
- Look at the state of both units:
systemctl status kosken-agent kosken-exec - Read the last lines of the agent log:
journalctl -u kosken-agent -n 100 --no-pager - Read the last lines of the executor log:
journalctl -u kosken-exec -n 100 --no-pager - Show the state of the connection, the last heartbeat and the executor:
sudo /usr/local/lib/kosken/current/kosken-agent status - Check DNS, the TLS connection to Kosken, the clock, the key file and the executor:
Each line starts withsudo /usr/local/lib/kosken/current/kosken-agent doctorokorfail.
Common causes
| What you see | Cause | Fix |
|---|---|---|
A unit is inactive or failed. | The unit stopped. Both units restart by themselves after 5 seconds, so a unit that stays down usually has an error in its log. | Read the log, fix the error, then run sudo systemctl restart kosken-exec kosken-agent. |
not connected to the platform, trying again | The machine cannot reach Kosken: DNS, a firewall or a proxy blocks the outbound HTTPS connection. | Run doctor. Fix the line that starts with fail. The agent tries again by itself. |
the clock of this host is wrong | The clock of the machine is far from the clock of Kosken. | Turn on time synchronization, for example with sudo timedatectl set-ntp true. |
the platform asked this agent to disconnect | Someone archived or deleted the machine in Kosken. The agent removed its keys. | To use the machine again, select Restore on the tab Settings and run the new install command. |
the executor socket ... does not answer in doctor | kosken-exec does not run. | Read its log, then run sudo systemctl restart kosken-exec. |
enrollment failed, trying again | The machine never connected, and its install key expired or was used. | Select New enrollment key on the tab Settings of the machine, and run the new command. See Install the agent. |
When the agent connects again, the state changes to Online and your channels get Machine online. If the problem stays, send us the output of doctor. See Get help.
Something here does not match the app? Tell us