Downloading and installing the Zabbix Agent
From the Zabbix official site, go to Download Zabbix agents (in Japanese), specify macOS and the zabbix version, and download it
Open the pkg file you downloaded and install it
By the way, it is set up so that it runs automatically when MacOS starts
# file location
/Library/LaunchDaemons/com.zabbix.zabbix_agentd.plist
# startup script
/usr/local/sbin/zabbix_agentd -c /usr/local/etc/zabbix/zabbix_agentd.conf -f
# log
/var/log/zabbix/zabbix_agentd-out.log
/var/log/zabbix/zabbix_agentd-err.logConfiguration
Change Hostname as appropriate, and change the Server field to the IP of the Zabbix Server
# vim /usr/local/etc/zabbix/zabbix_agentd.conf
...
# Server 127.0.0.1
Server 111.222.33.4
# Hostname Zabbix Server
Hostname MyMacRestarting the Zabbix Agent
$ sudo launchctl unload /Library/LaunchDaemons/com.zabbix.zabbix_agentd.plist
$ sudo launchctl load /Library/LaunchDaemons/com.zabbix.zabbix_agentd.plist
$ sudo launchctl start /Library/LaunchDaemons/com.zabbix.zabbix_agentd.plistIt does not start?
It would not start, so I looked at the syslog
zabbix_agentd[76466]: dyld: Symbol not found: ____chkstk_darwin Referenced from: /usr/local/sbin/zabbix_agentd Expected in: /usr/lib/libSystem.B.dylib
The cause seems to be that I used the encrypted build when I downloaded and installed it, and when I used 4.4.0 without encryption instead, it started up without trouble.
Adding the host on the Zabbix Server side
After confirming that the Zabbix Agent is running, create the host on the Zabbix Server side and link it to the “Template OS Mac OS X” template, and you are done
References
If you want to communicate over TLS Installation of Zabbix Agent on Mac OSX – James Mutch Tech Support
Starting, restarting and deleting 5 Mac OS agent installation from PKG [Zabbix Documentation 4.4]