Operation (Debian)¶
The agent runs as the systemd service flyingmonit-agent, as the user flyingmonit-agent, its log in the journal.
| What | How |
|---|---|
| Is it running? | systemctl status flyingmonit-agent |
| Its log | journalctl -u flyingmonit-agent |
| Its version | flyingmonit-agent -V |
| Check the control file | runuser -u flyingmonit-agent -- flyingmonit-agent -t -c /etc/flyingmonit-agentrc |
| Read the control file anew | systemctl reload flyingmonit-agent |
| Stop it | systemctl stop flyingmonit-agent |
| Start it | systemctl start flyingmonit-agent |
| Its services, as Monit's | flyingmonit-agent status, flyingmonit-agent summary, flyingmonit-agent report |
As root, flyingmonit-agent acts on the service: with no command it wakes it, quit stops it, reload has it read its
control file again, -t checks that file -- through the id and pid files the control file names. On a host installed
before they were written there, add them to /etc/flyingmonit-agentrc once, then systemctl reload flyingmonit-agent:
set idfile /var/lib/flyingmonit-agent/.flyingmonit-agent.id
set pidfile /var/lib/flyingmonit-agent/.flyingmonit-agent.pid
A reload with a control file the agent refuses fails, and the agent goes on as it was. A stop sends FlyingMonit the event that the agent stopped. When the program fails, systemd starts it again after five seconds.
status, summary and report ask the running agent as Monit's command line asks Monit: over its HTTP interface,
which set httpd opens. The installer opens none. Open it on this host only, with a password of your own (the control
file is readable by root only), then systemctl reload flyingmonit-agent:
set httpd port 2812 and use address localhost
allow localhost
allow admin:"<a password of your own>"
The interface answers status, summary and report only -- no web pages, no actions. Without an allow it opens no
port; without use address it listens on every address of the host, as Monit's. Without ssl it speaks plain HTTP --
its password and answers cross the network unencrypted: keep it on localhost then. To ask it from elsewhere, encrypt
it with a certificate and its key (a file of mode 0600, root's) -- the command line on another host needs the same
control file's set httpd:
set httpd port 2812
with ssl { pemfile: /etc/ssl/private/flyingmonit-agent.pem }
allow 192.0.2.0/24
allow admin:"<a password of your own>"
With a self-signed certificate add selfsigned: allow inside the braces; the example control file explains every
option.