Setup (Debian)¶
As root, with curl and signify-openbsd installed:
curl -fsSO https://gitlab.pallach.de/api/v4/projects/144/packages/generic/flyingmonit-agent-info/current/flyingmonit-agent-install
sh flyingmonit-agent-install --collector https://<user>:<password>@<your FlyingMonit>/collector
The installer:
- checks it runs as root, the architecture (amd64, arm64), and that a first install names
--collector– before it downloads anything; - downloads the newest release (or the version named after the options), verifies its signature and its checksum – nothing is unpacked before both hold (how);
- creates the folder
/var/lib/flyingmonit-agent(root's) for the agent's id and pid files – the agent runs as root; - installs the program and the example control file in
/usr/local/share/flyingmonit-agent/, and – on the first install only – writes/etc/flyingmonit-agentrcfrom that example, with these of its settings in force:
set daemon 60
set mmonit https://<user>:<password>@<your FlyingMonit>/collector
set idfile /var/lib/flyingmonit-agent/.flyingmonit-agent.id
set pidfile /var/lib/flyingmonit-agent/.flyingmonit-agent.pid
check system $HOST
Every other statement stands in it commented out, with its explanation: remove the # to use one.
The id and pid files are the service's: root's flyingmonit-agent on the host then acts on the running service, as
monit does on a Monit host (operation).
- installs the service
flyingmonit-agent, enables and starts it, and the updates.
Running the installer again updates the agent to the newest release; it keeps the control file and the host's id. A version already installed, or an older one, changes nothing.
| Exit | Meaning |
|---|---|
| 0 | installed, updated, or the installed version is current |
| 1 | refused: not root, no --collector, a download or a verification failed |
| 2 | wrong arguments |