Configuration
Windows
Basic
This is a very basic config file. You will still get a ton of metrics with that one. Plus linking some templates in the Zabbix Web Interface
# Host SettingsHostname=MyAgentUniqueNameHostMetadata=MyAgentMetadata
# Server SettingsServerActive=zabbix.domain.com:10051
# Log SettingsLogType=fileLogFile=C:\monitoring\monitoring\zabbix_agent2.log
# System SettingsControlSocket=\\.\pipe\agent.sock
# Include configuration files for pluginsInclude=.\zabbix_agent2.d\plugins.d\*.conf
TLS Settings
If your agents are remote, you should consider using at least PSK for encryption.
# TLS SettingsTLSConnect=pskTLSPSKIdentity=PSK_ID (Can be anything)TLSPSKFile=path/to/the/psk/file
Custom data
I wanted to get some extra data, which needed to create some extra keys.
# Custom Data# Get Public IPUserParameter=net.public,powershell -nologo -command "(Invoke-WebRequest https://ifconfig.io/ip -UseBasicParsing).Content.Trim()"
# Get TCP Stats (For this, you can import a ready made template)UserParameter=sockstat.sockets, netstat -ano | find /V "hola" /CUserParameter=sockstat.tcp.inuse, netstat -ano | findstr "ESTABLISHED"UserParameter=sockstat.tcp.inuse.count, netstat -ano | find /C "ESTABLISHED"UserParameter=sockstat.tcp.orphan, netstat -ano | findstr "CLOSE_WAIT"UserParameter=sockstat.tcp.orphan.count, netstat -ano | find /C "CLOSE_WAIT"UserParameter=sockstat.tcp.timewait, netstat -ano | findstr "TIME_WAIT"UserParameter=sockstat.tcp.timewait.count, netstat -ano | find /C "TIME_WAIT"UserParameter=sockstat.tcp.allocated, netstat -ano | findstr "LISTENING"UserParameter=sockstat.tcp.allocated.count, netstat -ano | find /C "LISTENING"UserParameter=sockstat.udp.inuse, netstat -ano | findstr "UDP"UserParameter=sockstat.udp.inuse.count, netstat -ano | find /C "UDP"
Link for the template here
Plugins
I usually add the SMART plugin to get disk stats. Don’t forget to link the template.
#Plugin SettingsPlugins.Smart.Path="C:\Program Files\smartmontools\bin\smartctl.exe"