From 8f736050e4ca41da1131005a7500c70fee97da14 Mon Sep 17 00:00:00 2001 From: Crited <45196568+Crited@users.noreply.github.com> Date: Mon, 4 Nov 2019 12:09:25 +0100 Subject: [PATCH] Add skeleton/first draft for developerguide: check package --- .../02-New-IcingaCheckPackage.md | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 doc/developerguide/02-New-IcingaCheckPackage.md diff --git a/doc/developerguide/02-New-IcingaCheckPackage.md b/doc/developerguide/02-New-IcingaCheckPackage.md new file mode 100644 index 0000000..41f48aa --- /dev/null +++ b/doc/developerguide/02-New-IcingaCheckPackage.md @@ -0,0 +1,30 @@ +# Developer Guide: New-IcingaCheckPackage + +Below you will find a list of functions and detailed descriptions including use cases for Cmdlets and features the PowerShell Framework provides. + +| Type | Return Value | Description | +| --- | --- | --- | +| Cmdlet | PowerShell Object | Check Object containing other check objects | + +The `IcingaCheckPackage` is the first step to take to write more advanced checks. A `IcingaCheckPackage` offers the possibility to build a check containing varius `IcingaChecks`. Just like the `IcingaCheck`, the `IcingaCheckPackage` also provides a bunch of internal commands within the PowerShell Object to analyse a value and get the Icinga result `Ok`, `Warning`, `Critical` including performance metrics. In this case the result is based on the result of the logical connection between added `IcingaChecks` within the `IcingaCheckPackage` + +It will be used like in this example: + + +```powershell +$IcingaPackage = New-IcingaCheckPackage -Name 'My Package' -OperatorAnd; +``` + +## Arguments + +| Argument | Input | Mandatory | Description | +| --- | --- | --- | --- | +| Name | String | * | The unique name of each package within a plugin. Will be displayed in the check output. | +| OperatorAnd | Switch | | Logical relation of the check within the package becomes an AND | +| OperatorOr | Switch | | Logical relation of the check within the package becomes an Or | +| OperatorNone | Switch | | - | +| OperatorMin | Int | | - | +| OperatorMax | Int | | - | +| Checks | Array | | Array of checks to be added to the check package | +| Verbose | int | | Defines the level of output detail from 0 lowest to 3 highest detail | +| Hidden | Switch | | If set, the check package doesn't generate output |