updated download path and base url for zabbix

This commit is contained in:
Mathew 2024-09-19 14:55:39 +00:00
parent bb92b26632
commit 6f3636ed82

View File

@ -17,7 +17,7 @@ New-Item -ItemType Directory -Force -Path $env:ProgramFiles\Zabbix
Set-Location $env:ProgramFiles\Zabbix Set-Location $env:ProgramFiles\Zabbix
# Download and unpack Zabbix agent # Download and unpack Zabbix agent
$DOWNLOADURL = "https://www.zabbix.com/downloads/4.0.12/zabbix_agents-4.0.12-win-amd64-openssl.zip" $DOWNLOADURL = "https://cdn.zabbix.com/zabbix/binaries/stable/5.0/5.0.11/zabbix_agent-5.0.11-windows-amd64-openssl.zip"
$helper = New-Object System.Net.WebClient $helper = New-Object System.Net.WebClient
$helper.DownloadFile($DOWNLOADURL, "$env:ProgramFiles\Zabbix\agent.zip") $helper.DownloadFile($DOWNLOADURL, "$env:ProgramFiles\Zabbix\agent.zip")
Expand-Archive -LiteralPath "$env:ProgramFiles\Zabbix\agent.zip" -DestinationPath "$env:ProgramFiles\Zabbix\" Expand-Archive -LiteralPath "$env:ProgramFiles\Zabbix\agent.zip" -DestinationPath "$env:ProgramFiles\Zabbix\"
@ -48,8 +48,8 @@ if ([String]::IsNullOrWhiteSpace($AUTO_CREATE_HOST)) { $AUTO_CREATE_HOST = "Y" }
if ($AUTO_CREATE_HOST -eq "Y" -or $AUTO_CREATE_HOST -eq "y") if ($AUTO_CREATE_HOST -eq "Y" -or $AUTO_CREATE_HOST -eq "y")
{ {
# Get URL # Get URL
$AUTO_URL = Read-Host "Enter URL for Zabbix UI: [https://zabbix.example1.co.uk]" $AUTO_URL = Read-Host "Enter URL for Zabbix UI: [https://zabbix.futuresens.co.uk]"
if ([String]::IsNullOrWhiteSpace($AUTO_URL)) { $AUTO_URL = "https://zabbix.example1.co.uk" } if ([String]::IsNullOrWhiteSpace($AUTO_URL)) { $AUTO_URL = "https://zabbix.futuresens.co.uk" }
$AUTO_URL = $AUTO_URL.TrimEnd("/") + "/api_jsonrpc.php" $AUTO_URL = $AUTO_URL.TrimEnd("/") + "/api_jsonrpc.php"
Write-Host "Connecting to $AUTO_URL" Write-Host "Connecting to $AUTO_URL"