Skip to content

Commit 8e8f034

Browse files
committed
Adds threshold description to doc generator
1 parent bc092da commit 8e8f034

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

icinga-powershell-plugins.psm1

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,19 @@ function Publish-IcingaPluginDocumentation()
4343

4444
Set-Content -Path $PluginDocFile -Value '# Icinga Plugins';
4545
Add-Content -Path $PluginDocFile -Value '';
46-
Add-Content -Path $PluginDocFile -Value 'Below you will find a documentation for every single available plugin provided by this repository';
46+
Add-Content -Path $PluginDocFile -Value 'Below you will find a documentation for every single available plugin provided by this repository. Most of the plugins allow the usage of default Icinga threshold range handling, which is defined as follows:';
47+
Add-Content -Path $PluginDocFile -Value '';
48+
Add-Content -Path $PluginDocFile -Value '| Argument | Throws error on | Ok range |';
49+
Add-Content -Path $PluginDocFile -Value '| --- | --- | --- |';
50+
Add-Content -Path $PluginDocFile -Value '| 20 | < 0 or > 20 | 0 .. 20 |';
51+
Add-Content -Path $PluginDocFile -Value '| 20: | < 20 | between 20 .. ∞ |';
52+
Add-Content -Path $PluginDocFile -Value '| ~:20 | > 20 | between -∞ .. 20 |';
53+
Add-Content -Path $PluginDocFile -Value '| 30:40 | < 30 or > 40 | between {30 .. 40} |';
54+
Add-Content -Path $PluginDocFile -Value '| `@30:40 | ≥ 30 and ≤ 40 | outside -∞ .. 29 and 41 .. ∞ |';
55+
Add-Content -Path $PluginDocFile -Value '';
56+
Add-Content -Path $PluginDocFile -Value 'Please ensure that you will escape the `@` if you are configuring it on the Icinga side. To do so, you will simply have to write an *\`* before the `@` symbol: \``@`';
57+
Add-Content -Path $PluginDocFile -Value '';
58+
Add-Content -Path $PluginDocFile -Value 'To test thresholds with different input values, you can use the Framework Cmdlet `Get-IcingaHelpThresholds`.';
4759
Add-Content -Path $PluginDocFile -Value '';
4860

4961
$AvailablePlugins = Get-ChildItem -Path $PluginDir -Recurse -Filter *.psm1;

0 commit comments

Comments
 (0)