Added Documentation/Changed Documentation

This commit is contained in:
Alexander Stoll 2019-10-29 16:02:31 +01:00
parent 9916d88a97
commit 705ee91077
3 changed files with 34 additions and 25 deletions

View file

@ -2,27 +2,36 @@ Import-IcingaLib icinga\plugin;
<# <#
.SYNOPSIS .SYNOPSIS
??? Checks how many eventlog occurences of a given type there are.
.DESCRIPTION .DESCRIPTION
??? Invoke-IcingaCheckEventlog returns either 'OK', 'WARNING' or 'CRITICAL', based on the thresholds set.
e.g e.g Eventlog returns 500 entrys with the specified parameters, WARNING is set to 200, CRITICAL is set to 800. Thereby the check will return WARNING.
More Information on https://github.com/LordHepipud/icinga-module-windows More Information on https://github.com/LordHepipud/icinga-module-windows
.FUNCTIONALITY .FUNCTIONALITY
??? This Module is intended to be used to check how many eventlog occurences of a given type there are.
Based on the thresholds set the status will change between 'OK', 'WARNING' or 'CRITICAL'. The function will return one of these given codes. Based on the thresholds set the status will change between 'OK', 'WARNING' or 'CRITICAL'. The function will return one of these given codes.
.EXAMPLE .EXAMPLE
PS> PS> Invoke-IcingaCheckEventlog -LogName Application -IncludeEntryType Warning -Warning 100 -Critical 1000
[WARNING]: Check package "EventLog" is [WARNING]
| 'EventId_508'=2c;; 'EventId_2002'=586c;; 'EventId_63'=6c;; 'EventId_2248216578'=1364c;; 'EventId_1008'=1745c;; 'EventId_2147489653'=1c;; 'EventId_636'=3c;; 'EventId_2147484656'=1c;; 'EventId_2147489654'=1c;; 'EventId_640'=3c;; 'EventId_533'=1c;;
1
PS> Invoke-IcingaCheckEventlog -LogName Application -IncludeEntryType Warning -Warning 100 -Critical 1000
[OK]: Check package "EventLog" is [OK]|
0
.EXAMPLE .EXAMPLE
PS> PS> Invoke-IcingaCheckEventlog -LogName Application -IncludeEntryType Warning -Warning 100 -Critical 1000
.EXAMPLE [WARNING]: Check package "EventLog" is [WARNING]
PS> | 'EventId_508'=2c;; 'EventId_2002'=586c;; 'EventId_63'=6c;; 'EventId_2248216578'=1364c;; 'EventId_1008'=1745c;; 'EventId_2147489653'=1c;; 'EventId_636'=3c;; 'EventId_2147484656'=1c;; 'EventId_2147489654'=1c;; 'EventId_640'=3c;; 'EventId_533'=1c;;
.EXAMPLE 1
PS> PS> Invoke-IcingaCheckEventlog -LogName Application -IncludeEntryType Warning -Warning 100 -Critical 1000 -DisableTimeCache
[WARNING]: Check package "EventLog" is [WARNING]
| 'EventId_508'=2c;; 'EventId_2002'=586c;; 'EventId_63'=6c;; 'EventId_2248216578'=1364c;; 'EventId_1008'=1745c;; 'EventId_2147489653'=1c;; 'EventId_636'=3c;; 'EventId_2147484656'=1c;; 'EventId_2147489654'=1c;; 'EventId_640'=3c;; 'EventId_533'=1c;;
1
.PARAMETER Warning .PARAMETER Warning
Used to specify a Warning threshold. In this case an ??? value. Used to specify a Warning threshold.
.PARAMETER Critical .PARAMETER Critical
Used to specify a Critical threshold. In this case an ??? value. Used to specify a Critical threshold.
.PARAMETER LogName .PARAMETER LogName
Used to specify a certain log. Used to specify a certain log.
.PARAMETER IncludeEventId .PARAMETER IncludeEventId
@ -42,11 +51,13 @@ Import-IcingaLib icinga\plugin;
.PARAMETER ExcludeMessage .PARAMETER ExcludeMessage
Used to specify an array of messages within the eventlog to be excluded. Used to specify an array of messages within the eventlog to be excluded.
.PARAMETER After .PARAMETER After
??? Used to specify a date like dd.mm.yyyy and every eventlog entry after that date will be considered.
.PARAMETER Before .PARAMETER Before
??? Used to specify a date like dd.mm.yyyy and every eventlog entry before that date will be considered.
.PARAMETER DisableTimeCache .PARAMETER DisableTimeCache
Switch to disable the time cache on a check. If this parameter is set the time cache is disabled. Switch to disable the time cache on a check. If this parameter is set the time cache is disabled.
After the check has been run once, the next check instance will filter through the eventlog from the point the last check ended.
This is due to the time cache, when disabled the whole eventlog is checked instead.
.INPUTS .INPUTS
System.String System.String
.OUTPUTS .OUTPUTS

View file

@ -5,20 +5,19 @@ Import-IcingaLib icinga\plugin;
Performs checks on various performance counter Performs checks on various performance counter
.DESCRIPTION .DESCRIPTION
Invoke-IcingaCheckDirectory returns either 'OK', 'WARNING' or 'CRITICAL', based on the thresholds set. Invoke-IcingaCheckDirectory returns either 'OK', 'WARNING' or 'CRITICAL', based on the thresholds set.
e.g Use "Show-IcingaPerformanceCounterCategories" to see all performance counter categories available.
To gain insight on an specific performance counter use "Show-IcingaPerformanceCounters <performance counter category>"
e.g '
More Information on https://github.com/LordHepipud/icinga-module-windows More Information on https://github.com/LordHepipud/icinga-module-windows
.FUNCTIONALITY .FUNCTIONALITY
This module is intended to be used to perform checks on different performance counter. This module is intended to be used to perform checks on different performance counter.
Based on the thresholds set the status will change between 'OK', 'WARNING' or 'CRITICAL'. The function will return one of these given codes. Based on the thresholds set the status will change between 'OK', 'WARNING' or 'CRITICAL'. The function will return one of these given codes.
.EXAMPLE .EXAMPLE
PS> PS> Invoke-IcingaCheckPerfCounter -PerfCounter '\processor(*)\% processor time' -Warning 60 -Critical 90
.EXAMPLE [WARNING]: Check package "Performance Counter" is [WARNING]
PS> | 'processor1_processor_time'=68.95;60;90 'processor3_processor_time'=4.21;60;90 'processor5_processor_time'=9.5;60;90 'processor_Total_processor_time'=20.6;60;90 'processor0_processor_time'=5.57;60;90 'processor2_processor_time'=0;60;90 'processor4_processor_time'=6.66;60;90
.EXAMPLE 1
PS>
.EXAMPLE
PS>
.PARAMETER Warning .PARAMETER Warning
Used to specify a Warning threshold. In this case an ??? value. Used to specify a Warning threshold. In this case an ??? value.
.PARAMETER Critical .PARAMETER Critical

View file

@ -12,15 +12,14 @@ Import-IcingaLib core\tools;
.FUNCTIONALITY .FUNCTIONALITY
This module is intended to check how long a Windows system has been up for. This module is intended to check how long a Windows system has been up for.
Based on the thresholds set the status will change between 'OK', 'WARNING' or 'CRITICAL'. The function will return one of these given codes. Based on the thresholds set the status will change between 'OK', 'WARNING' or 'CRITICAL'. The function will return one of these given codes.
.EXAMPLE .EXAMPLE
PS> Invoke-IcingaCheckUptime -Warning 18d -Critical 20d PS> Invoke-IcingaCheckUptime -Warning 18d -Critical 20d
[WARNING]: Check package "Windows Uptime: Days: 19 Hours: 13 Minutes: 48 Seconds: 29" is [WARNING] [WARNING]: Check package "Windows Uptime: Days: 19 Hours: 13 Minutes: 48 Seconds: 29" is [WARNING]
| 'Windows Uptime'=1691309,539176s;1555200;1728000 | 'Windows Uptime'=1691309,539176s;1555200;1728000
.PARAMETER IcingaCheckUsers_String_Warning .PARAMETER Warning
Used to specify a Warning threshold. In this case a string. Used to specify a Warning threshold. In this case a string.
Allowed units include: ms, s, m, h, d, w, M, y Allowed units include: ms, s, m, h, d, w, M, y
.PARAMETER IcingaCheckUsers_String_Critical .PARAMETER Critical
Used to specify a Critical threshold. In this case a string. Used to specify a Critical threshold. In this case a string.
Allowed units include: ms, s, m, h, d, w, M, y Allowed units include: ms, s, m, h, d, w, M, y
.INPUTS .INPUTS