Operate the Navin agent
This page gives the daily commands of the Navin agent on a host. They need root.
Commands
| Task | Command | Expected result |
|---|---|---|
| State of the registration | sudo nm-agent status | Registered: host <id>, cluster <cluster>, the URLs, the driver, the components (exit code 1 when not registered) |
| Facts of the host | sudo nm-agent facts | JSON: os, kernel, arch, cpu_count, memory_mb, disks, network, python, podman, platform and the others |
| Start | sudo systemctl start navin-manager-agent or sudo navinctl start agent | unit active |
| Stop | sudo systemctl stop navin-manager-agent or sudo navinctl stop agent | unit inactive; the managed services keep running |
| Restart | sudo navinctl restart agent | navinctl: restart navin-manager-agent.service |
| Logs of the agent | sudo navinctl logs agent 500 or sudo tail -f /var/log/navin-manager-agent/agent.log | last lines of the journal or of the file |
| Logs of the enrollment | sudo navinctl logs enroll | why a registration from enroll.env was refused |
| Units and versions | sudo navinctl status | units of the host with their state, then the package versions |
| Version | nm-agent --version | nm-agent <version> |
Change the configuration
-
Edit the file. Change the keys of
/etc/navin-manager-agent/agent.jsonlisted in the configuration reference. Keep the file valid JSON. -
Restart the agent.
sudo systemctl restart navin-manager-agentExpected result: the unit is
active. If the file is invalid, the journal showsInvalid configuration file /etc/navin-manager-agent/agent.json: ...and the agent exits with code 2.
The Manager can also update the file with the task agent.config.
Upgrade
Upgrade the package (dnf upgrade, apt install --only-upgrade, pacman -Syu): it restarts a running agent and keeps
the registration. See Upgrade the Navin Manager.
Decommission
- Remove the components of the host. In Services, remove each component from the host; Decommission is refused while components remain.
- Decommission the host. Hosts > host > Decommission. The operation
host.decommissionrunsagent.decommission: the agent deletes its credentials and stops polling (Host decommissioned: credentials deleted, the agent stopped polling.), then the Manager records the host as decommissioned. - Remove the package. See Uninstall.
Move a host to another Manager
Decommission the host, delete /var/lib/navin-manager-agent/credentials.json, then register it with a token of the
new Manager.