Инсталляция zabbix-agent на Debian

How can we help?

Навигация
sudo apt get install zabbix-agent

Далее открываем файл конфигурации zabbix-agent

sudo nano /etc/zabbix/zabbix_agentd.conf

В разделе опций Server указываем IP адрес или подсеть с которого будет доступен агент, например:

### Option: Server
#       List of comma delimited IP addresses, optionally in CIDR notation, or DNS names of Zabbix servers and Zabbix proxies.
#       Incoming connections will be accepted only from the hosts listed here.
#       If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally
#       and '::/0' will allow any IPv4 or IPv6 address.
#       '0.0.0.0/0' can be used to allow any IPv4 address.
#       Example: Server=127.0.0.1,192.168.1.0/24,::1,2001:db8::/32,zabbix.example.com
#
# Mandatory: yes, if StartAgents is not explicitly set to 0
# Default:
# Server=

Server=192.168.1.1

Пример конфигурации zabbix-agent для сервера по адресу 192.168.1.1 здесь.

после изменения конфигурации агента, рестартуем и проверяем статус:

zamiloff@debian:~$ sudo service zabbix-agent restart
[sudo] пароль для superuser:
zamiloff@debian:~$ sudo service zabbix-agent status
● zabbix-agent.service - Zabbix Agent
   Loaded: loaded (/lib/systemd/system/zabbix-agent.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2021-01-20 08:50:21 MSK; 8s ago
     Docs: man:zabbix_agentd
 Main PID: 15311 (zabbix_agentd)
    Tasks: 6 (limit: 2355)
   Memory: 2.5M
   CGroup: /system.slice/zabbix-agent.service
           ├─15311 /usr/sbin/zabbix_agentd --foreground
           ├─15312 /usr/sbin/zabbix_agentd: collector [idle 1 sec]
           ├─15313 /usr/sbin/zabbix_agentd: listener #1 [waiting for connection]
           ├─15314 /usr/sbin/zabbix_agentd: listener #2 [waiting for connection]
           ├─15315 /usr/sbin/zabbix_agentd: listener #3 [waiting for connection]
           └─15316 /usr/sbin/zabbix_agentd: active checks #1 [idle 1 sec]

янв 20 08:50:21 debian systemd[1]: Started Zabbix Agent.
янв 20 08:50:21 debian zabbix_agentd[15311]: Starting Zabbix Agent [debian]. Zabbix 4.0.4 (revision 89349).
янв 20 08:50:21 debian zabbix_agentd[15311]: Press Ctrl+C to exit.