mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
Add skeleton/first draft for developerguide: check package
This commit is contained in:
parent
d8f72a11e8
commit
8f736050e4
1 changed files with 30 additions and 0 deletions
30
doc/developerguide/02-New-IcingaCheckPackage.md
Normal file
30
doc/developerguide/02-New-IcingaCheckPackage.md
Normal file
|
|
@ -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 |
|
||||||
Loading…
Reference in a new issue