Zabbix agent
Jump to navigation
Jump to search
zabbix_agent2 -t vm.memory.size[free] zabbix_agentd -p zabbix_agent -t vm.memory.size[free] vfs.file.cksum[c:\windows\win.ini] zabbix_get -s <host> -p <port:10050> -k <key>
Install
ansible 'Windows' -m "script ./zinstall.ps1" --inventory-file inventory.txt
Uninstall
ansible 'Windows' -m win_shell --inventory-file inventory.txt -a 'choco uninstall -y zabbix-agent.install'
Check agent working
$tlsid = (Get-Content 'C:\Program Files\Zabbix Agent\zabbix_agentd.conf' | Select-String -Pattern '^TLSPSKIdentity=')[0].Line.split('=')[1]; & "C:\Program Files\Zabbix Agent\zabbix_get" -s localhost -p 10050 -k vm.memory.size[available] --tls-connect psk --tls-psk-identity $tlsid --tls-psk-file 'C:\Program Files\Zabbix Agent\psk.key'
(Get-Content .\zabbix_agentd.conf) -notmatch '^#' | where {$_ -ne ""}
zabbix_agentd.conf example
LogType=file LogFile=C:\Program Files\Zabbix Agent\zabbix_agentd.log Server=monitor-proxies-active.example.com ListenPort=10050 ServerActive=monitor-proxies-passive.example.com Hostname=myhost Timeout=3 Include=C:\Program Files\Zabbix Agent\zabbix_agentd.conf.d\ TLSConnect=psk TLSAccept=psk TLSPSKIdentity=myhost-49a92012d91c TLSPSKFile=C:\Program Files\Zabbix Agent\psk.key