Commit efa10a15 by Rinat K. Nugaev

Added automatic getting ip of monitoring server for firewall rule

parent a70c3a21
...@@ -3,8 +3,10 @@ Import-Module BitsTransfer ...@@ -3,8 +3,10 @@ Import-Module BitsTransfer
$PathZabbix = ${env:ProgramFiles} + '\Zabbix' $PathZabbix = ${env:ProgramFiles} + '\Zabbix'
$osarch = wmic os get OSArchitecture /value $osarch = wmic os get OSArchitecture /value
$ZabbixConf = $PathZabbix + '\conf\zabbix_agentd.conf' $ZabbixConf = $PathZabbix + '\conf\zabbix_agentd.conf'
#$monserverip = (Resolve-DNSName monitoring.nugaev.net | select -property IP4Address).ip4address
$monserverip = "195.209.52.7" #Getting monitoring server ip for Firewall Rule
$monserverip = (Test-Connection -ComputerName monitoring.nugaev.net -count 1).IPV4Address.ipaddressTOstring
#Downloading and unzip zabbix agent #Downloading and unzip zabbix agent
$url = "https://support.nugaev.net/files/distrib/zabbix_agent.zip" $url = "https://support.nugaev.net/files/distrib/zabbix_agent.zip"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment