Difference between revisions of "Zabbix agent"
Jump to navigation
Jump to search
Line 23: | Line 23: | ||
$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' | $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 ""} |
Revision as of 00:30, 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 ""}