You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #378 from Icinga:feature/allow_service_plugin_to_report_not_found_as_critical
Feature: Adds support for Invoke-IcingaCheckService to report not found services as CRITICAL instead of UNKNOWN
Allows users to change the plugin output behavior for Invoke-IcingaCheckService, to report CRITICAL instead of UNKNOWN in case a service could not be found on the system
description = "Changes the behavior of the plugin output which check states are printed: 0 (default): Only service checks/packages with state not OK will be printed 1: Only services with not OK will be printed including OK checks of affected check packages including Package config 2: Everything will be printed regardless of the check state 3: Identical to Verbose 2, but prints in addition the check package configuration e.g (All must be [OK])"
52
52
value = "$IcingaCheckService_Int32_Verbosity$"
53
+
order = 7
54
+
}
55
+
"-OverrideNotFound" = {
56
+
set_if = {{
57
+
var str = macro("$IcingaCheckService_String_OverrideNotFound$"); if (len(str) == 0) { return false; }; return true;
58
+
}}
59
+
description = "This argument will allow you to override the default behavior of the plugin in case a service was not found on the system. By default, it will report UNKNOWN but you can set with this argument if the service state should be OK, WARNING or CRITICAL instead"
60
+
value = {{
61
+
var str = macro("$IcingaCheckService_String_OverrideNotFound$");
description = "A warning threshold for the shares free space in either % or byte units, like '20%:' or '50GB:' Please note that this value is decreasing over time, therefor you will have to use the plugin handler and add ':' at the end of your input to check for 'current value < threshold' like in the previous example Allowed units: %, B, KB, MB, GB, TB, PB, KiB, MiB, GiB, TiB, PiB"
3500
+
description = "A warning threshold for the shares total free space in byte units, like '50GB:' Please note that this value is decreasing over time, therefor you will have to use the plugin handler and add ':' at the end of your input to check for 'current value < threshold' like in the previous example Allowed units: B, KB, MB, GB, TB, PB, KiB, MiB, GiB, TiB, PiB"
3501
3501
value = "$IcingaCheckUNCPath_Object_WarningTotal$"
description = "Changes the behavior of the plugin output which check states are printed: 0 (default): Only service checks/packages with state not OK will be printed 1: Only services with not OK will be printed including OK checks of affected check packages including Package config 2: Everything will be printed regardless of the check state 3: Identical to Verbose 2, but prints in addition the check package configuration e.g (All must be [OK])"
4124
4124
value = "$IcingaCheckService_Int32_Verbosity$"
4125
+
order = 7
4126
+
}
4127
+
"-OverrideNotFound" = {
4128
+
set_if = {{
4129
+
var str = macro("$IcingaCheckService_String_OverrideNotFound$"); if (len(str) == 0) { return false; }; return true;
4130
+
}}
4131
+
description = "This argument will allow you to override the default behavior of the plugin in case a service was not found on the system. By default, it will report UNKNOWN but you can set with this argument if the service state should be OK, WARNING or CRITICAL instead"
4132
+
value = {{
4133
+
var str = macro("$IcingaCheckService_String_OverrideNotFound$");
Copy file name to clipboardExpand all lines: doc/31-Changelog.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,10 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
21
21
22
22
# 1.11.1 (2023-11-07)
23
23
24
+
*[#378](https://github.com/Icinga/icinga-powershell-plugins/pull/378) Adds support for `Invoke-IcingaCheckService` to change the output for not found services from UNKNOWN to OK, WARNING or CRITICAL instead
Copy file name to clipboardExpand all lines: doc/plugins/13-Invoke-IcingaCheckService.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,7 @@ To execute this plugin you will require to grant the following user permissions.
29
29
| Status | String | false | Running | Status for the specified service or services to check against. |
30
30
| FilterStartupType | Array | false | @() | Allows to include only services with a specific startup type inside the monitoring,<br /> in case you check for a list of specific services by using `-Service`|
31
31
| MitigateUnknown | SwitchParameter | false | False | This will tell the plugin to return OK instead of UNKNOWN, in case no service was added to this<br /> check |
32
+
| OverrideNotFound | String | false | Unknown | This argument will allow you to override the default behavior of the plugin in case a service was not found on the<br /> system. By default, it will report UNKNOWN but you can set with this argument if the service state should be<br /> OK, WARNING or CRITICAL instead |
32
33
| Verbosity | Int32 | false | 0 | Changes the behavior of the plugin output which check states are printed:<br /> 0 (default): Only service checks/packages with state not OK will be printed<br /> 1: Only services with not OK will be printed including OK checks of affected check packages including Package config<br /> 2: Everything will be printed regardless of the check state<br /> 3: Identical to Verbose 2, but prints in addition the check package configuration e.g (All must be [OK]) |
33
34
| NoPerfData | SwitchParameter | false | False | Disables the performance data output of this plugin |
34
35
| ThresholdInterval | String ||| Change the value your defined threshold checks against from the current value to a collected time threshold of the Icinga for Windows daemon, as described [here](https://icinga.com/docs/icinga-for-windows/latest/doc/service/10-Register-Service-Checks/). An example for this argument would be 1m or 15m which will use the average of 1m or 15m for monitoring. |
0 commit comments