Skip to content

Commit 3a438a3

Browse files
authored
Merge pull request #171 from Icinga:doc/install_uninstall_icinga_agent
Docs: Adds Agent install/uninstall description
2 parents 7f07322 + e41fdb0 commit 3a438a3

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

doc/06-Framework-Usage.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ The Icinga PowerShell Framework ships with a bunch of Cmdlets for monitoring, me
1313
* [Read Icinga Agent Log/DebugLog](frameworkusage/31-Read-Icinga-Agent_Log_DebugLog.md)
1414
* [Test Icinga Agent Environment](frameworkusage/32-Test-Icinga-Agent-Environment.md)
1515
* [Run Icinga Agent as other Service User](frameworkusage/33-Run-Icinga-Agent-As-Other-Service-User.md)
16+
* [Install/Update Icinga Agent](frameworkusage/35-Install-Update-Icinga-Agent.md)
1617
* [Uninstall Icinga Agent](frameworkusage/34-Uninstall-Icinga-Agent.md)
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Install/Update Icinga Agent
2+
3+
Managing the Icinga Agent is one of the main goals for Icinga for Windows. This also includes installing and updating the Icinga Agent itself.
4+
5+
**Note:** Before using any of the commands below you will have to initialize the Icinga PowerShell Framework inside a new PowerShell instance with `Use-Icinga`. Starting with version `1.2.0` of the Framework you can also simply type `icinga` into the command line.
6+
7+
## Installing the Icinga Agent
8+
9+
The Icinga PowerShell Framework ships with a simple Cmdlet to install/update the Icinga Agent, called `Install-IcingaAgent`. It includes a bunch of arguments for managing sources, install location, versions and handling of updates.
10+
11+
### Install Latest Icinga Agent
12+
13+
To simply install the latest version of the Icinga Agent, you can run the following command:
14+
15+
```powershell
16+
Install-IcingaAgent -Version 'latest'
17+
```
18+
19+
This will lookup the default installation source `https://packages.icinga.com/windows/`, fetch the latest version, download and install it.
20+
21+
### Install Specific Icinga Agent version
22+
23+
To install a specific version of the Icinga Agent, you can set the version argument to the intended version:
24+
25+
```powershell
26+
Install-IcingaAgent -Version '2.11.6'
27+
```
28+
29+
This will download Icinga Agent `2.11.6` from `https://packages.icinga.com/windows/` and install it
30+
31+
### Update Icinga Agent
32+
33+
Similar to the above examples, you can also update or downgrade the Icinga Agent with this command. All argument handling as before applies. However, to tell the command to perform an upgrade or downgrade, you will have to set the argument `-AllowUpdates` in addition (which also applies to downgrades):
34+
35+
```powershell
36+
Install-IcingaAgent -Version 'latest' -AllowUpdates 1
37+
```
38+
39+
## Customizing the Installer
40+
41+
Of course, you can also modify the `Install-IcingaAgent` command with different arguments besides `-Version` and `-AllowUpdates`. This is the list of supported arguments:
42+
43+
| Argument | Type | Default | Description |
44+
| --- | --- | --- | --- |
45+
| AllowUpdates | bool | 0 | Tells the command to either upgrade or downgrade the Icinga Agent version if the target version is not matching the current one. Has either to be `0` (not allowing up-/downgrades) or `1` (allow up/downgrades) |
46+
| InstallDir | string |`C:\Program Files\ICINGA2` | Allows to override the default installation location `C:\Program Files\ICINGA2` with a custom location |
47+
| Source | string | https://packages.icinga.com/windows/ | The location to lookup for Icinga Agent `.msi` installers. This can either be a web, local or network share. If you define a custom web share, please ensure that the directory containing the `.msi` packages is granted to list it's file content |
48+
| Version | string | | Specify the version you want to install for the Icinga Agent. You can use `latest` to fetch the latest version available on the specified location, `snapshot` to fetch a snapshot version and a specific version like `2.11.6` |
49+
50+
For example we can distribute Icinga Agents over a local network share for better update management.
51+
52+
```powershell
53+
Install-IcingaAgent -Version 'latest' -AllowUpdates 1 -Source '\\example.com\icinga\icingaagent\'
54+
```

0 commit comments

Comments
 (0)