--docker flag: enable agent2 docker plugin (socket access via docker group)
This commit is contained in:
@@ -15,6 +15,7 @@ works behind NAT/firewalls and needs no inbound ports.
|
||||
# clone once, then git pull for updates:
|
||||
git clone https://gitea.noctools.nz/noctools/zabbix-agent.git
|
||||
sudo ./install-zabbix-agent2-ubuntu.sh --server <server-ip-or-name>
|
||||
sudo ./install-zabbix-agent2-ubuntu.sh --server <server-ip-or-name> --docker # + docker monitoring
|
||||
```
|
||||
|
||||
Or with no local copy at all:
|
||||
@@ -30,9 +31,18 @@ curl -fsSL https://gitea.noctools.nz/noctools/zabbix-agent/raw/branch/main/insta
|
||||
|---|---|---|
|
||||
| `--server HOST[:PORT]` | Zabbix server/proxy for active checks (**required**) | — |
|
||||
| `--hostname NAME` | Zabbix host name — must equal the technical name on the server | short system hostname |
|
||||
| `--docker` | enable the agent2 docker plugin: grants the `zabbix` user access to `/var/run/docker.sock` via the `docker` group (Docker must already be installed) | off |
|
||||
| `--major X.Y` | Zabbix repo series | `7.4` |
|
||||
|
||||
After installing, create the host on the Zabbix server with the **exact same
|
||||
technical name** and an active-agent template (e.g. "Linux by Zabbix agent
|
||||
active"). The script reports whether the agent reached the server and warns
|
||||
if the host doesn't exist yet — the warning clears by itself once it does.
|
||||
|
||||
## Docker monitoring
|
||||
|
||||
`--docker` has the agent talk to `/var/run/docker.sock` (adds the `zabbix`
|
||||
user to the `docker` group). On the Zabbix server, link the host to a Docker
|
||||
template that uses **active** checks — e.g. "Docker by Zabbix agent 2 active"
|
||||
(where present) — since agents installed by this script are reached via
|
||||
active checks only.
|
||||
|
||||
Reference in New Issue
Block a user