Difference between revisions of "Zabbix agent"

From UVOO Tech Wiki
Jump to navigation Jump to search
Line 25: Line 25:
  
 
(Get-Content .\zabbix_agentd.conf) -notmatch '^#' | where {$_ -ne ""}
 
(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
 +
```

Revision as of 00:33, 2 July 2021

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'
$tlsid = (Get-Content 'C:\Program Files\Zabbix Agent\zabbix_agentd.conf' | Select-String -Pattern '^TLSPSKIdentity=')[0].Line.split('=')[1]; 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