Skip to main content

Operate the Navin agent

This page gives the daily commands of the Navin agent on a host. They need root.

Commands​

TaskCommandExpected result
State of the registrationsudo nm-agent statusRegistered: host <id>, cluster <cluster>, the URLs, the driver, the components (exit code 1 when not registered)
Facts of the hostsudo nm-agent factsJSON: os, kernel, arch, cpu_count, memory_mb, disks, network, python, podman, platform and the others
Startsudo systemctl start navin-manager-agent or sudo navinctl start agentunit active
Stopsudo systemctl stop navin-manager-agent or sudo navinctl stop agentunit inactive; the managed services keep running
Restartsudo navinctl restart agentnavinctl: restart navin-manager-agent.service
Logs of the agentsudo navinctl logs agent 500 or sudo tail -f /var/log/navin-manager-agent/agent.loglast lines of the journal or of the file
Logs of the enrollmentsudo navinctl logs enrollwhy a registration from enroll.env was refused
Units and versionssudo navinctl statusunits of the host with their state, then the package versions
Versionnm-agent --versionnm-agent <version>

Change the configuration​

  1. Edit the file. Change the keys of /etc/navin-manager-agent/agent.json listed in the configuration reference. Keep the file valid JSON.

  2. Restart the agent.

    sudo systemctl restart navin-manager-agent

    Expected result: the unit is active. If the file is invalid, the journal shows Invalid 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​

  1. Remove the components of the host. In Services, remove each component from the host; Decommission is refused while components remain.
  2. Decommission the host. Hosts > host > Decommission. The operation host.decommission runs agent.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.
  3. 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.