Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

Commit

Permalink
Updated to Zabbix 4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
KakersUK committed Nov 9, 2018
1 parent 688d938 commit 910be55
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 77 deletions.
31 changes: 18 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,38 @@
# zabbix-agent-chocolatey
This package installs the Zabbix agent using the pre-compiled files from [Zabbix SIA](https://www.zabbix.com/).

Executables are placed in `%ProgramFiles%\Zabbix Agent` and the zabbix_agentd.conf file is stored in `%ProgramData%\zabbix`. When new versions of the agent are installed, the config is not overwritten but rather the version number of the new file is appended to the name. For example, if version 3.2.0 is installed and then upgraded to version 3.4.6 you will find the sample 3.4.6 config files saved as “zabbix_agentd-3.4.6.conf”.
Executables are placed in "%ProgramFiles%\Zabbix Agent" and the zabbix_agentd.conf file is stored in "%ProgramData%\zabbix".

The source code for this Chocolatey package can be found on [GitHub](https://github.com/zabbix/zabbix-agent-chocolatey). Please file any issues you find in the project's [Issue tracker](https://github.com/zabbix/zabbix-agent-chocolatey/issues).
When new versions of the agent are installed, the original config is not overwritten but rather the version number of the new file is appended to the name. For example, if version 3.2.0 is installed and then upgraded to version 4.0.0 you will find the sample 4.0.0 config files saved as “zabbix_agentd-4.0.0.conf”.

The source code for this Chocolatey package can be found on [GitHub](https://github.com/zabbix/zabbix-agent-chocolatey). Please file any issues you find in the project's [Issue tracker](https://github.com/zabbix/zabbix-agent-chocolatey/issues).


## Release Notes


#### 2018-11-07 Release 4.0.0
* Bumped up to Zabbix 4.0.0
* Zabbix now places different arch into seperate zip files.

#### 2018-05-25 Release 3.4.6
* Bumped up to Zabbix 3.4.6
* Fix logo for nuspec config
* Bumped up to Zabbix 3.4.6.
* Fix logo for nuspec config.

#### 2017-03-01 Release 3.2.0
* Bumped up to Zabbix 3.2.0
* Updated logo
* Swiched repository references github.com/genebean back to github.com/zabbix
* Bumped up to Zabbix 3.2.0.
* Updated logo.
* Swiched repository references github.com/genebean back to github.com/zabbix.

#### 2017-03-01 Release 3.0.4
* Removed depreciated values from install scripts
* Bumped up to Zabbix 3.0.4
* Switched download url to https://
* Removed depreciated values from install scripts.
* Bumped up to Zabbix 3.0.4.
* Switched download url to https://.

#### 2015-03-22 Release 2.4.4
* Moved config file from `$env:ProgramFiles\Zabbix Agent` to `$env:ProgramData\zabbix`
* Reworked `.nuspec` file to adhere to Chocolatey standards
* Moved config file from `$env:ProgramFiles\Zabbix Agent` to `$env:ProgramData\zabbix`.
* Reworked `.nuspec` file to adhere to Chocolatey standards.
* Reworked scripts so that all variables are at the top and so that they are less likely to throw
errors or fail
errors or fail.
* Made syntax more consistent throughout scripts. For example, changed to use `Join-Path` everywhere
instead of just in some place.
39 changes: 19 additions & 20 deletions tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
$version = '3.4.6'
$version = '4.0.0'
$id = 'zabbix-agent'
$title = 'Zabbix Agent'
$url = "https://www.zabbix.com/downloads/$version/zabbix_agents_$version.win.zip"
$url64 = $url
$checksum = "7ca9e6d059032d9d5b6c49a853850bc9"
$url = "https://www.zabbix.com/downloads/$version/zabbix_agents-$version-win-i386.zip"
$url64 = "https://www.zabbix.com/downloads/$version/zabbix_agents-$version-win-amd64.zip"
$checksum = "c3c2d5701bf1ade0e3a2c4dc63bb4dcd"
$checksumType = "md5"
$checksum64 = $checksum
$checksumType64 = $checksumType
$checksum64 = "21a65223a730b35d75b3f2b8415deeca"
$checksumType64 = "md5"

$configDir = Join-Path $env:PROGRAMDATA 'zabbix'
$zabbixConf = Join-Path $configDir 'zabbix_agentd.conf'

$configDir = Join-Path $env:PROGRAMDATA 'zabbix'
$zabbixConf = Join-Path $configDir 'zabbix_agentd.conf'
$installDir = Join-Path $env:PROGRAMFILES $title
$zabbixAgentd = Join-Path $installDir 'zabbix_agentd.exe'

$installDir = Join-Path $env:PROGRAMFILES $title
$zabbixAgentd = Join-Path $installDir 'zabbix_agentd.exe'
$tempDir = Join-Path $env:TEMP 'chocolatey\zabbix'
$binDir = Join-Path $tempDir 'bin'
$binFiles = @('zabbix_agentd.exe', 'zabbix_get.exe', 'zabbix_sender.exe')
$sampleConfig = Join-Path $tempDir 'conf\zabbix_agentd.win.conf'

$tempDir = Join-Path $env:TEMP 'chocolatey\zabbix'

$zipFile = Join-Path $tempDir "zabbix_agents_$version.win.zip"
$sampleConfig = Join-Path $tempDir 'conf\zabbix_agentd.win.conf'
$binFiles = @('zabbix_agentd.exe', 'zabbix_get.exe', 'zabbix_sender.exe')


$is64bit = (Get-WmiObject -Class Win32_OperatingSystem | Select-Object OSArchitecture) -match '64'
Expand All @@ -43,15 +42,15 @@ try {
New-Item $tempDir -type directory
}

Get-ChocolateyWebFile -PackageName "$id" -FileFullPath "$zipFile" -Url "$url" -Url64bit "$url64" -Checksum "$checksum" -ChecksumType "$checksumType" -Checksum64 "$checksum64" -ChecksumType64 "$checksumType64"
Get-ChocolateyUnzip "$zipFile" "$tempDir"

if ($is64bit) {
$binDir = Join-Path $tempDir 'bin\win64'
$zipFile = Join-Path $tempDir "zabbix_agents_$version.win-amd64.zip"
} else {
$binDir = Join-Path $tempDir 'bin\win32'
$zipFile = Join-Path $tempDir "zabbix_agents_$version.win-i386.zip"
}

Get-ChocolateyWebFile -PackageName "$id" -FileFullPath "$zipFile" -Url "$url" -Url64bit "$url64" -Checksum "$checksum" -ChecksumType "$checksumType" -Checksum64 "$checksum64" -ChecksumType64 "$checksumType64"
Get-ChocolateyUnzip "$zipFile" "$tempDir"

foreach ($executable in $binFiles ) {
$file = Join-Path $binDir $executable
Move-Item $file $installDir -Force
Expand Down
60 changes: 16 additions & 44 deletions zabbix-agent.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,59 +2,31 @@
<!-- Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. -->
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<!-- == PACKAGE SPECIFIC SECTION == -->
<id>zabbix-agent</id>
<version>3.4.6</version>
<packageSourceUrl>https://github.com/zabbix/zabbix-agent-chocolatey</packageSourceUrl>
<title>Zabbix Agent</title>
<version>4.0.0</version>
<authors>Zabbix LLC</authors>
<owners>Gene Liverman</owners>
<!-- ============================== -->

<!-- == SOFTWARE SPECIFIC SECTION == -->
<title>Zabbix Agent</title>
<authors>Zabbix SIA</authors>
<projectUrl>https://www.zabbix.com/</projectUrl>
<iconUrl>https://raw.githubusercontent.com/zabbix/zabbix-agent-chocolatey/master/logo/zabbix_logo_500x131.png</iconUrl>
<copyright>GPL v2</copyright>
<licenseUrl>https://www.zabbix.com/license</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<docsUrl>https://www.zabbix.com/manuals</docsUrl>
<mailingListUrl>https://sourceforge.net/projects/zabbix/lists/zabbix-users</mailingListUrl>
<tags>zabbix monitoring admin</tags>
<summary>The Zabbix agent is used in conjunction with a Zabbix Server to for monitoring a system.</summary>
<description>
This package installs the Zabbix agent using the pre-compiled files from [Zabbix SIA](https://www.zabbix.com/).

Executables are placed in `%ProgramFiles%\Zabbix Agent` and the zabbix_agentd.conf file is stored in `%ProgramData%\zabbix`. When new versions of the agent are installed, the config is not overwritten but rather the version number of the new file is appended to the name. For example, if version 3.2.0 is installed and then upgraded to version 3.4.6 you will find the sample 3.4.6 config files saved as “zabbix_agentd-3.4.6.conf”.
Executables are placed in "%ProgramFiles%\Zabbix Agent" and the zabbix_agentd.conf file is stored in "%ProgramData%\zabbix".

The source code for this Chocolatey package can be found on [GitHub](https://github.com/zabbix/zabbix-agent-chocolatey). Please file any issues you find in the project's [Issue tracker](https://github.com/zabbix/zabbix-agent-chocolatey/issues).
When new versions of the agent are installed, the original config is not overwritten but rather the version number of the new file is appended to the name. For example, if version 3.2.0 is installed and then upgraded to version 4.0.0 you will find the sample 4.0.0 config files saved as “zabbix_agentd-4.0.0.conf”.

The source code for this Chocolatey package can be found on [GitHub](https://github.com/zabbix/zabbix-agent-chocolatey). Please file any issues you find in the project's [Issue tracker](https://github.com/zabbix/zabbix-agent-chocolatey/issues).
</description>
<releaseNotes>
#### 2018-05-25 Release 3.4.6
* Bumped up to Zabbix 3.4.6
* Fix logo for nuspec config

#### 2017-03-01 Release 3.2.0
* Bumped up to Zabbix 3.2.0
* Updated logo
* Swiched repository references github.com/genebean back to github.com/zabbix
* Updated to newer nuspec config

#### 2017-03-01 Release 3.0.4
* Removed depreciated values from install scripts
* Bumped up to Zabbix 3.0.4
* Switched download url to https://

#### 2015-03-22 Release 2.4.4
* Moved config file from `$env:ProgramFiles\Zabbix Agent` to `$env:ProgramData\zabbix`
* Reworked `.nuspec` file to adhere to Chocolatey standards
* Reworked scripts so that all variables are at the top and so that they are less likely to throw
errors or fail
* Made syntax more consistent throughout scripts. For example, changed to use `Join-Path` everywhere
instead of just in some place.
</releaseNotes>
<!-- =============================== -->

<projectUrl>https://www.zabbix.com/</projectUrl>
<projectSourceUrl>https://github.com/zabbix/zabbix</projectSourceUrl>
<docsUrl>https://www.zabbix.com/manuals</docsUrl>
<bugTrackerUrl>https://support.zabbix.com/</bugTrackerUrl>
<packageSourceUrl>https://github.com/zabbix/zabbix-agent-chocolatey</packageSourceUrl>
<mailingListUrl>https://lists.sourceforge.net/lists/listinfo/zabbix-announce</mailingListUrl>
<tags>zabbix monitoring admin</tags>
<licenseUrl>https://www.zabbix.com/license</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<iconUrl>https://raw.githubusercontent.com/zabbix/zabbix-agent-chocolatey/master/logo/zabbix_logo_500x131.png</iconUrl>
</metadata>
<files>
<file src="tools\**" target="tools" />
Expand Down

0 comments on commit 910be55

Please sign in to comment.