03 Zabbix AutoRegistration 설정


개요

항목설정값
Serverzabbix.example.net
PSK IdentityKnPSK
PSK

다음 명령어로 생성

openssl rand -hex 32


Zabbix Agent 설정

PSK 설정

/etc/zabbix/psk.key
개요에서 생성한 값

Agent 설정

/etc/zabbix/zabbix_agentd.conf
PidFile=/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=0
Server=zabbix.example.net
ServerActive=zabbix.example.net
HostMetadata=Linux
TLSConnect=psk
TLSAccept=psk
TLSPSKIdentity=MyPSK
TLSPSKFile=/etc/zabbix/psk.key
Include=/etc/zabbix/zabbix_agentd.d/*.conf

방화벽 설정

ufw allow proto tcp from ZABBIX_SERVER_IP to any port 10050 comment "Zabbix"


Zabbix Server 설정

Zabbix Server 7.2 Web UI 기준 설명

Admin > AutoReg 설정

Left Menu → Administration → General → Autoregistration

http://zabbix.example.net/zabbix.php?action=autoreg.edit

항목
Encryption level

[   ] No encryption

[ x ] PSK

PSK identityMyPSK
PSK위에서 생성한 PSK 값

Action > AutoReg 설정

Left Menu → Alerts → Actions → (right top) Create action click

http://zabbix.example.net/zabbix.php?action=action.list&eventsource=2

NameHost AutoRegistration
ConditionsHost metadata contains Linux
Operations

Add Host

Link templates: Link by Zabbix agent

방화벽 설정

ufw allow 10051/tcp


확인

(Zabbix Server) Left Menu → Monigoring → Hosts

http://zabbix.example.net/zabbix.php?action=host.view


비고

https://www.zabbix.com/documentation/7.2/en/manual/discovery/auto_registration?hl=autoregistration

https://www.zabbix.com/integrations/linux