diff --git a/config/director/Cluster_Bundle.json b/config/director/Cluster_Bundle.json index f448622..2a03425 100644 --- a/config/director/Cluster_Bundle.json +++ b/config/director/Cluster_Bundle.json @@ -1 +1 @@ -{"DataList":{"IcingaCheckClusterSharedVolume Verbosity":{"list_name":"IcingaCheckClusterSharedVolume Verbosity","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"0","entry_name":"0","format":"string"},{"allowed_roles":null,"entry_value":"1","entry_name":"1","format":"string"},{"allowed_roles":null,"entry_value":"2","entry_name":"2","format":"string"},{"allowed_roles":null,"entry_value":"3","entry_name":"3","format":"string"}],"owner":"stein"},"IcingaCheckClusterHealth Verbosity":{"list_name":"IcingaCheckClusterHealth Verbosity","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"0","entry_name":"0","format":"string"},{"allowed_roles":null,"entry_value":"1","entry_name":"1","format":"string"},{"allowed_roles":null,"entry_value":"2","entry_name":"2","format":"string"},{"allowed_roles":null,"entry_value":"3","entry_name":"3","format":"string"}],"owner":"stein"},"PowerShell ExecutionPolicies":{"list_name":"PowerShell ExecutionPolicies","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"AllSigned","entry_name":"AllSigned","format":"string"},{"allowed_roles":null,"entry_value":"Bypass","entry_name":"Bypass","format":"string"},{"allowed_roles":null,"entry_value":"Default","entry_name":"Default","format":"string"},{"allowed_roles":null,"entry_value":"RemoteSigned","entry_name":"RemoteSigned","format":"string"},{"allowed_roles":null,"entry_value":"Restricted","entry_name":"Restricted","format":"string"},{"allowed_roles":null,"entry_value":"Undefined","entry_name":"Undefined","format":"string"},{"allowed_roles":null,"entry_value":"Unrestricted","entry_name":"Unrestricted","format":"string"}],"owner":"stein"},"IcingaCheckClusterHealth WarningState":{"list_name":"IcingaCheckClusterHealth WarningState","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"Unknown","entry_name":"Unknown","format":"string"},{"allowed_roles":null,"entry_value":"Up","entry_name":"Up","format":"string"},{"allowed_roles":null,"entry_value":"Down","entry_name":"Down","format":"string"},{"allowed_roles":null,"entry_value":"Paused","entry_name":"Paused","format":"string"},{"allowed_roles":null,"entry_value":"Joining","entry_name":"Joining","format":"string"}],"owner":"stein"},"IcingaCheckClusterNetwork Verbosity":{"list_name":"IcingaCheckClusterNetwork Verbosity","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"0","entry_name":"0","format":"string"},{"allowed_roles":null,"entry_value":"1","entry_name":"1","format":"string"},{"allowed_roles":null,"entry_value":"2","entry_name":"2","format":"string"},{"allowed_roles":null,"entry_value":"3","entry_name":"3","format":"string"}],"owner":"stein"},"IcingaCheckClusterHealth CriticalState":{"list_name":"IcingaCheckClusterHealth CriticalState","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"Unknown","entry_name":"Unknown","format":"string"},{"allowed_roles":null,"entry_value":"Up","entry_name":"Up","format":"string"},{"allowed_roles":null,"entry_value":"Down","entry_name":"Down","format":"string"},{"allowed_roles":null,"entry_value":"Paused","entry_name":"Paused","format":"string"},{"allowed_roles":null,"entry_value":"Joining","entry_name":"Joining","format":"string"}],"owner":"stein"}},"Command":{"PowerShell Base":{"methods_execute":"PluginCheck","object_name":"PowerShell Base","vars":{"IcingaPowerShellBase_String_ExecutionPolicy":"ByPass"},"is_string":null,"command":"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe","zone":null,"disabled":false,"fields":[{"datafield_id":2,"is_required":"n","var_filter":null}],"arguments":{"-ExecutionPolicy":{"value":"$IcingaPowerShellBase_String_ExecutionPolicy$","order":"-1"},"-NoProfile":{"set_if":true,"order":"-3"},"-NoLogo":{"set_if":true,"order":"-2"}},"imports":[],"object_type":"object","timeout":"180"},"Invoke-IcingaCheckClusterHealth":{"fields":[{"datafield_id":4,"is_required":"n","var_filter":null},{"datafield_id":5,"is_required":"n","var_filter":null},{"datafield_id":6,"is_required":"n","var_filter":null},{"datafield_id":7,"is_required":"n","var_filter":null},{"datafield_id":8,"is_required":"n","var_filter":null},{"datafield_id":9,"is_required":"n","var_filter":null},{"datafield_id":10,"is_required":"n","var_filter":null},{"datafield_id":11,"is_required":"n","var_filter":null}],"object_name":"Invoke-IcingaCheckClusterHealth","arguments":{"-C":{"value":"try { Use-Icinga -Minimal; } catch { Write-Output \u0027The Icinga PowerShell Framework is either not installed on the system or not configured properly. Please check https://icinga.com/docs/windows for further details\u0027; Write-Output \u0027Error:\u0027 $$($$_.Exception.Message)Components:`r`n$$( Get-Module -ListAvailable \u0027icinga-powershell-*\u0027 )`r`n\u0027Module-Path:\u0027`r`n$$($$Env:PSModulePath); exit 3; }; Exit-IcingaExecutePlugin -Command \u0027Invoke-IcingaCheckClusterHealth\u0027 ","order":"0"},"-Verbosity":{"value":"$IcingaCheckClusterHealth_Object_Verbosity$","order":"6"},"-ThresholdInterval":{"set_if":"var str = macro(\"$IcingaCheckClusterHealth_String_ThresholdInterval$\"); if (len(str) == 0) { return false; }; return true;","set_if_format":"expression","value":{"body":"var str = macro(\"$IcingaCheckClusterHealth_String_ThresholdInterval$\");\r\nvar argLen = len(str);\r\n\r\nif (argLen == 0) {\r\n return;\r\n}\r\n\r\nif (argLen != 0 \u0026\u0026 str.substr(0,1) == \"\u0027\" \u0026\u0026 str.substr(argLen - 1, argLen) == \"\u0027\") {\r\n return str;\r\n}\r\n\r\nreturn (\"\u0027\" + str + \"\u0027\");","type":"Function"},"order":"100"},"-CriticalState":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterHealth_Array_CriticalState$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"5"},"-SkipClusterRessource":{"set_if":"$IcingaCheckClusterHealth_Switchparameter_SkipClusterRessource$","set_if_format":"string","order":"99"},"-Include":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterHealth_Array_Include$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"2"},"-WarningState":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterHealth_Array_WarningState$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"4"},"-NoPerfData":{"set_if":"$IcingaCheckClusterHealth_Switchparameter_NoPerfData$","set_if_format":"string","order":"99"},"-Exclude":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterHealth_Array_Exclude$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"3"}},"imports":["PowerShell Base"],"object_type":"object","vars":{"IcingaCheckClusterHealth_Switchparameter_SkipClusterRessource":false,"IcingaCheckClusterHealth_Switchparameter_NoPerfData":false}},"Invoke-IcingaCheckClusterSharedVolume":{"fields":[{"datafield_id":17,"is_required":"n","var_filter":null},{"datafield_id":18,"is_required":"n","var_filter":null},{"datafield_id":19,"is_required":"n","var_filter":null},{"datafield_id":20,"is_required":"n","var_filter":null},{"datafield_id":21,"is_required":"n","var_filter":null},{"datafield_id":22,"is_required":"n","var_filter":null},{"datafield_id":23,"is_required":"n","var_filter":null}],"object_name":"Invoke-IcingaCheckClusterSharedVolume","arguments":{"-C":{"value":"try { Use-Icinga -Minimal; } catch { Write-Output \u0027The Icinga PowerShell Framework is either not installed on the system or not configured properly. Please check https://icinga.com/docs/windows for further details\u0027; Write-Output \u0027Error:\u0027 $$($$_.Exception.Message)Components:`r`n$$( Get-Module -ListAvailable \u0027icinga-powershell-*\u0027 )`r`n\u0027Module-Path:\u0027`r`n$$($$Env:PSModulePath); exit 3; }; Exit-IcingaExecutePlugin -Command \u0027Invoke-IcingaCheckClusterSharedVolume\u0027 ","order":"0"},"-Verbosity":{"value":"$IcingaCheckClusterSharedVolume_Object_Verbosity$","order":"6"},"-ThresholdInterval":{"set_if":"var str = macro(\"$IcingaCheckClusterSharedVolume_String_ThresholdInterval$\"); if (len(str) == 0) { return false; }; return true;","set_if_format":"expression","value":{"body":"var str = macro(\"$IcingaCheckClusterSharedVolume_String_ThresholdInterval$\");\r\nvar argLen = len(str);\r\n\r\nif (argLen == 0) {\r\n return;\r\n}\r\n\r\nif (argLen != 0 \u0026\u0026 str.substr(0,1) == \"\u0027\" \u0026\u0026 str.substr(argLen - 1, argLen) == \"\u0027\") {\r\n return str;\r\n}\r\n\r\nreturn (\"\u0027\" + str + \"\u0027\");","type":"Function"},"order":"100"},"-SpaceCritical":{"value":"$IcingaCheckClusterSharedVolume_Object_SpaceCritical$","order":"5"},"-ExcludeVolumes":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterSharedVolume_Array_ExcludeVolumes$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"3"},"-NoPerfData":{"set_if":"$IcingaCheckClusterSharedVolume_Switchparameter_NoPerfData$","set_if_format":"string","order":"99"},"-SpaceWarning":{"value":"$IcingaCheckClusterSharedVolume_Object_SpaceWarning$","order":"4"},"-IncludeVolumes":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterSharedVolume_Array_IncludeVolumes$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"2"}},"imports":["PowerShell Base"],"object_type":"object","vars":{"IcingaCheckClusterSharedVolume_Switchparameter_NoPerfData":false}},"Invoke-IcingaCheckClusterNetwork":{"fields":[{"datafield_id":12,"is_required":"n","var_filter":null},{"datafield_id":13,"is_required":"n","var_filter":null},{"datafield_id":14,"is_required":"n","var_filter":null},{"datafield_id":15,"is_required":"n","var_filter":null},{"datafield_id":16,"is_required":"n","var_filter":null}],"object_name":"Invoke-IcingaCheckClusterNetwork","arguments":{"-C":{"value":"try { Use-Icinga -Minimal; } catch { Write-Output \u0027The Icinga PowerShell Framework is either not installed on the system or not configured properly. Please check https://icinga.com/docs/windows for further details\u0027; Write-Output \u0027Error:\u0027 $$($$_.Exception.Message)Components:`r`n$$( Get-Module -ListAvailable \u0027icinga-powershell-*\u0027 )`r`n\u0027Module-Path:\u0027`r`n$$($$Env:PSModulePath); exit 3; }; Exit-IcingaExecutePlugin -Command \u0027Invoke-IcingaCheckClusterNetwork\u0027 ","order":"0"},"-Verbosity":{"value":"$IcingaCheckClusterNetwork_Object_Verbosity$","order":"3"},"-ThresholdInterval":{"set_if":"var str = macro(\"$IcingaCheckClusterNetwork_String_ThresholdInterval$\"); if (len(str) == 0) { return false; }; return true;","set_if_format":"expression","value":{"body":"var str = macro(\"$IcingaCheckClusterNetwork_String_ThresholdInterval$\");\r\nvar argLen = len(str);\r\n\r\nif (argLen == 0) {\r\n return;\r\n}\r\n\r\nif (argLen != 0 \u0026\u0026 str.substr(0,1) == \"\u0027\" \u0026\u0026 str.substr(argLen - 1, argLen) == \"\u0027\") {\r\n return str;\r\n}\r\n\r\nreturn (\"\u0027\" + str + \"\u0027\");","type":"Function"},"order":"100"},"-ExcludeClusterInterface":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterNetwork_Array_ExcludeClusterInterface$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"2"},"-IncludeClusterInterface":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterNetwork_Array_IncludeClusterInterface$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"1"},"-NoPerfData":{"value":"$IcingaCheckClusterNetwork_Switch_NoPerfData$","order":"99"}},"imports":["PowerShell Base"],"object_type":"object","vars":{}}},"Datafield":{"16":{"settings":{"datalist":"IcingaCheckClusterNetwork Verbosity","behavior":"strict","data_type":"string"},"description":null,"caption":"Verbosity","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"16","varname":"IcingaCheckClusterNetwork_Object_Verbosity","format":null},"7":{"settings":{"datalist":"IcingaCheckClusterHealth WarningState","behavior":"strict","data_type":"array"},"description":"Allows to specify for which node state the check will throw a warning","caption":"WarningState","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"7","varname":"IcingaCheckClusterHealth_Array_WarningState","format":null},"5":{"settings":{"visibility":"visible"},"description":"Used to specify an array of nodes to include, allows \u0027*\u0027 wildcard","caption":"Include","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"5","varname":"IcingaCheckClusterHealth_Array_Include","format":null},"21":{"settings":{"visibility":"visible"},"description":"Used to specify a Critical threshold for the SharedVolume, either in % or as byte unit\nExample: 10% or 10GB","caption":"SpaceCritical","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"21","varname":"IcingaCheckClusterSharedVolume_Object_SpaceCritical","format":null},"18":{"settings":{"visibility":"visible"},"description":"Used to Filter out which Cluster Shared Volumes you want to check, provided you have\nseveral SharedVolumes on your system. Example (\u0027Cluster disk 2\u0027)","caption":"IncludeVolumes","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"18","varname":"IcingaCheckClusterSharedVolume_Array_IncludeVolumes","format":null},"12":{"settings":{"visibility":"visible"},"description":"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.","caption":"ThresholdInterval","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"12","varname":"IcingaCheckClusterNetwork_String_ThresholdInterval","format":null},"10":{"settings":{"visibility":"visible"},"description":"Disables the performance data output of this plugin","caption":"NoPerfData","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeBoolean","originalId":"10","varname":"IcingaCheckClusterHealth_Switchparameter_NoPerfData","format":null},"2":{"settings":{"datalist":"PowerShell ExecutionPolicies","behavior":"strict","data_type":"string"},"description":"Defines with which Execution Policy the PowerShell is started","caption":"PowerShell Execution Policy","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"2","varname":"IcingaPowerShellBase_String_ExecutionPolicy","format":null},"22":{"settings":{"visibility":"visible"},"description":"Disables the performance data output of this plugin","caption":"NoPerfData","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeBoolean","originalId":"22","varname":"IcingaCheckClusterSharedVolume_Switchparameter_NoPerfData","format":null},"8":{"settings":{"datalist":"IcingaCheckClusterHealth CriticalState","behavior":"strict","data_type":"array"},"description":"Allows to specify for which node state the check will throw a critical","caption":"CriticalState","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"8","varname":"IcingaCheckClusterHealth_Array_CriticalState","format":null},"17":{"settings":{"visibility":"visible"},"description":"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.","caption":"ThresholdInterval","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"17","varname":"IcingaCheckClusterSharedVolume_String_ThresholdInterval","format":null},"11":{"settings":{"datalist":"IcingaCheckClusterHealth Verbosity","behavior":"strict","data_type":"string"},"description":"Changes the behavior of the plugin output which check states are printed:\n0 (default): Only service checks/packages with state not OK will be printed\n1: Only services with not OK will be printed including OK checks of affected check packages including Package config\n2: Everything will be printed regardless of the check state\n3: Identical to Verbose 2, but prints in addition the check package configuration e.g (All must be [OK])","caption":"Verbosity","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"11","varname":"IcingaCheckClusterHealth_Object_Verbosity","format":null},"9":{"settings":{"visibility":"visible"},"description":"Removes the Cluster Resources package from the check output if set to true","caption":"SkipClusterRessource","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeBoolean","originalId":"9","varname":"IcingaCheckClusterHealth_Switchparameter_SkipClusterRessource","format":null},"14":{"settings":{"visibility":"visible"},"description":null,"caption":"IncludeClusterInterface","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"14","varname":"IcingaCheckClusterNetwork_Array_IncludeClusterInterface","format":null},"20":{"settings":{"visibility":"visible"},"description":"Used to specify a Warning threshold for the SharedVolume, either in % or as byte unit\nExample: 10% or 10GB","caption":"SpaceWarning","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"20","varname":"IcingaCheckClusterSharedVolume_Object_SpaceWarning","format":null},"15":{"settings":{"visibility":"visible"},"description":null,"caption":"NoPerfData","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"15","varname":"IcingaCheckClusterNetwork_Switch_NoPerfData","format":null},"23":{"settings":{"datalist":"IcingaCheckClusterSharedVolume Verbosity","behavior":"strict","data_type":"string"},"description":"Changes the behavior of the plugin output which check states are printed:\n0 (default): Only service checks/packages with state not OK will be printed\n1: Only services with not OK will be printed including OK checks of affected check packages including Package config\n2: Everything will be printed regardless of the check state\n3: Identical to Verbose 2, but prints in addition the check package configuration e.g (All must be [OK])","caption":"Verbosity","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"23","varname":"IcingaCheckClusterSharedVolume_Object_Verbosity","format":null},"6":{"settings":{"visibility":"visible"},"description":"Used to specify an array of nodes to exclude, allows \u0027*\u0027 wildcard","caption":"Exclude","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"6","varname":"IcingaCheckClusterHealth_Array_Exclude","format":null},"4":{"settings":{"visibility":"visible"},"description":"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.","caption":"ThresholdInterval","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"4","varname":"IcingaCheckClusterHealth_String_ThresholdInterval","format":null},"19":{"settings":{"visibility":"visible"},"description":"Used to Filter out which Cluster Shared Volumes you don\u0027t want to check, provided you have\nseveral SharedVolumes on your system. Example (\u0027Cluster disk 2\u0027).","caption":"ExcludeVolumes","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"19","varname":"IcingaCheckClusterSharedVolume_Array_ExcludeVolumes","format":null},"13":{"settings":{"visibility":"visible"},"description":null,"caption":"ExcludeClusterInterface","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"13","varname":"IcingaCheckClusterNetwork_Array_ExcludeClusterInterface","format":null}}} +{"DataList":{"IcingaCheckClusterSharedVolume Verbosity":{"list_name":"IcingaCheckClusterSharedVolume Verbosity","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"0","entry_name":"0","format":"string"},{"allowed_roles":null,"entry_value":"1","entry_name":"1","format":"string"},{"allowed_roles":null,"entry_value":"2","entry_name":"2","format":"string"},{"allowed_roles":null,"entry_value":"3","entry_name":"3","format":"string"}],"owner":"stein"},"IcingaCheckClusterHealth Verbosity":{"list_name":"IcingaCheckClusterHealth Verbosity","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"0","entry_name":"0","format":"string"},{"allowed_roles":null,"entry_value":"1","entry_name":"1","format":"string"},{"allowed_roles":null,"entry_value":"2","entry_name":"2","format":"string"},{"allowed_roles":null,"entry_value":"3","entry_name":"3","format":"string"}],"owner":"stein"},"PowerShell ExecutionPolicies":{"list_name":"PowerShell ExecutionPolicies","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"AllSigned","entry_name":"AllSigned","format":"string"},{"allowed_roles":null,"entry_value":"Bypass","entry_name":"Bypass","format":"string"},{"allowed_roles":null,"entry_value":"Default","entry_name":"Default","format":"string"},{"allowed_roles":null,"entry_value":"RemoteSigned","entry_name":"RemoteSigned","format":"string"},{"allowed_roles":null,"entry_value":"Restricted","entry_name":"Restricted","format":"string"},{"allowed_roles":null,"entry_value":"Undefined","entry_name":"Undefined","format":"string"},{"allowed_roles":null,"entry_value":"Unrestricted","entry_name":"Unrestricted","format":"string"}],"owner":"stein"},"IcingaCheckClusterHealth WarningState":{"list_name":"IcingaCheckClusterHealth WarningState","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"Unknown","entry_name":"Unknown","format":"string"},{"allowed_roles":null,"entry_value":"Up","entry_name":"Up","format":"string"},{"allowed_roles":null,"entry_value":"Down","entry_name":"Down","format":"string"},{"allowed_roles":null,"entry_value":"Paused","entry_name":"Paused","format":"string"},{"allowed_roles":null,"entry_value":"Joining","entry_name":"Joining","format":"string"}],"owner":"stein"},"IcingaCheckClusterNetwork Verbosity":{"list_name":"IcingaCheckClusterNetwork Verbosity","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"0","entry_name":"0","format":"string"},{"allowed_roles":null,"entry_value":"1","entry_name":"1","format":"string"},{"allowed_roles":null,"entry_value":"2","entry_name":"2","format":"string"},{"allowed_roles":null,"entry_value":"3","entry_name":"3","format":"string"}],"owner":"stein"},"IcingaCheckClusterHealth CriticalState":{"list_name":"IcingaCheckClusterHealth CriticalState","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"Unknown","entry_name":"Unknown","format":"string"},{"allowed_roles":null,"entry_value":"Up","entry_name":"Up","format":"string"},{"allowed_roles":null,"entry_value":"Down","entry_name":"Down","format":"string"},{"allowed_roles":null,"entry_value":"Paused","entry_name":"Paused","format":"string"},{"allowed_roles":null,"entry_value":"Joining","entry_name":"Joining","format":"string"}],"owner":"stein"}},"Command":{"PowerShell Base":{"methods_execute":"PluginCheck","object_name":"PowerShell Base","vars":{"IcingaPowerShellBase_String_ExecutionPolicy":"ByPass"},"is_string":null,"command":"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe","zone":null,"disabled":false,"fields":[{"datafield_id":2,"is_required":"n","var_filter":null}],"arguments":{"-ExecutionPolicy":{"value":"$IcingaPowerShellBase_String_ExecutionPolicy$","order":"-1"},"-NoProfile":{"value":"-NoProfile","skip_key":true,"order":"-3"},"-NoLogo":{"value":"-NoLogo","skip_key":true,"order":"-2"}},"imports":[],"object_type":"object","timeout":"180"},"Invoke-IcingaCheckClusterHealth":{"fields":[{"datafield_id":4,"is_required":"n","var_filter":null},{"datafield_id":5,"is_required":"n","var_filter":null},{"datafield_id":6,"is_required":"n","var_filter":null},{"datafield_id":7,"is_required":"n","var_filter":null},{"datafield_id":8,"is_required":"n","var_filter":null},{"datafield_id":9,"is_required":"n","var_filter":null},{"datafield_id":10,"is_required":"n","var_filter":null},{"datafield_id":11,"is_required":"n","var_filter":null}],"object_name":"Invoke-IcingaCheckClusterHealth","arguments":{"-C":{"value":"try { Use-Icinga -Minimal; } catch { Write-Output \u0027The Icinga PowerShell Framework is either not installed on the system or not configured properly. Please check https://icinga.com/docs/windows for further details\u0027; Write-Output \u0027Error:\u0027 $$($$_.Exception.Message)Components:`r`n$$( Get-Module -ListAvailable \u0027icinga-powershell-*\u0027 )`r`n\u0027Module-Path:\u0027`r`n$$($$Env:PSModulePath); exit 3; }; Exit-IcingaExecutePlugin -Command \u0027Invoke-IcingaCheckClusterHealth\u0027 ","order":"0"},"-Verbosity":{"value":"$IcingaCheckClusterHealth_Object_Verbosity$","order":"6"},"-ThresholdInterval":{"set_if":"var str = macro(\"$IcingaCheckClusterHealth_String_ThresholdInterval$\"); if (len(str) == 0) { return false; }; return true;","set_if_format":"expression","value":{"body":"var str = macro(\"$IcingaCheckClusterHealth_String_ThresholdInterval$\");\r\nvar argLen = len(str);\r\n\r\nif (argLen == 0) {\r\n return;\r\n}\r\n\r\nif (argLen != 0 \u0026\u0026 str.substr(0,1) == \"\u0027\" \u0026\u0026 str.substr(argLen - 1, argLen) == \"\u0027\") {\r\n return str;\r\n}\r\n\r\nreturn (\"\u0027\" + str + \"\u0027\");","type":"Function"},"order":"100"},"-CriticalState":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterHealth_Array_CriticalState$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"5"},"-SkipClusterRessource":{"set_if":"$IcingaCheckClusterHealth_Switchparameter_SkipClusterRessource$","set_if_format":"string","order":"99"},"-Include":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterHealth_Array_Include$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"2"},"-WarningState":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterHealth_Array_WarningState$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"4"},"-NoPerfData":{"set_if":"$IcingaCheckClusterHealth_Switchparameter_NoPerfData$","set_if_format":"string","order":"99"},"-Exclude":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterHealth_Array_Exclude$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"3"}},"imports":["PowerShell Base"],"object_type":"object","vars":{"ifw_api_arguments":{"CriticalState":{"value":"$IcingaCheckClusterHealth_Array_CriticalState$"},"ThresholdInterval":{"value":"$IcingaCheckClusterHealth_String_ThresholdInterval$"},"WarningState":{"value":"$IcingaCheckClusterHealth_Array_WarningState$"},"SkipClusterRessource":{"set_if":"$IcingaCheckClusterHealth_Switchparameter_SkipClusterRessource$"},"Verbosity":{"value":"$IcingaCheckClusterHealth_Object_Verbosity$"},"Exclude":{"value":"$IcingaCheckClusterHealth_Array_Exclude$"},"NoPerfData":{"set_if":"$IcingaCheckClusterHealth_Switchparameter_NoPerfData$"},"Include":{"value":"$IcingaCheckClusterHealth_Array_Include$"}},"ifw_api_command":"Invoke-IcingaCheckClusterHealth","IcingaCheckClusterHealth_Switchparameter_NoPerfData":false,"IcingaCheckClusterHealth_Switchparameter_SkipClusterRessource":false}},"Invoke-IcingaCheckClusterSharedVolume":{"fields":[{"datafield_id":17,"is_required":"n","var_filter":null},{"datafield_id":18,"is_required":"n","var_filter":null},{"datafield_id":19,"is_required":"n","var_filter":null},{"datafield_id":20,"is_required":"n","var_filter":null},{"datafield_id":21,"is_required":"n","var_filter":null},{"datafield_id":22,"is_required":"n","var_filter":null},{"datafield_id":23,"is_required":"n","var_filter":null}],"object_name":"Invoke-IcingaCheckClusterSharedVolume","arguments":{"-C":{"value":"try { Use-Icinga -Minimal; } catch { Write-Output \u0027The Icinga PowerShell Framework is either not installed on the system or not configured properly. Please check https://icinga.com/docs/windows for further details\u0027; Write-Output \u0027Error:\u0027 $$($$_.Exception.Message)Components:`r`n$$( Get-Module -ListAvailable \u0027icinga-powershell-*\u0027 )`r`n\u0027Module-Path:\u0027`r`n$$($$Env:PSModulePath); exit 3; }; Exit-IcingaExecutePlugin -Command \u0027Invoke-IcingaCheckClusterSharedVolume\u0027 ","order":"0"},"-Verbosity":{"value":"$IcingaCheckClusterSharedVolume_Object_Verbosity$","order":"6"},"-ThresholdInterval":{"set_if":"var str = macro(\"$IcingaCheckClusterSharedVolume_String_ThresholdInterval$\"); if (len(str) == 0) { return false; }; return true;","set_if_format":"expression","value":{"body":"var str = macro(\"$IcingaCheckClusterSharedVolume_String_ThresholdInterval$\");\r\nvar argLen = len(str);\r\n\r\nif (argLen == 0) {\r\n return;\r\n}\r\n\r\nif (argLen != 0 \u0026\u0026 str.substr(0,1) == \"\u0027\" \u0026\u0026 str.substr(argLen - 1, argLen) == \"\u0027\") {\r\n return str;\r\n}\r\n\r\nreturn (\"\u0027\" + str + \"\u0027\");","type":"Function"},"order":"100"},"-SpaceCritical":{"value":"$IcingaCheckClusterSharedVolume_Object_SpaceCritical$","order":"5"},"-ExcludeVolumes":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterSharedVolume_Array_ExcludeVolumes$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"3"},"-NoPerfData":{"set_if":"$IcingaCheckClusterSharedVolume_Switchparameter_NoPerfData$","set_if_format":"string","order":"99"},"-SpaceWarning":{"value":"$IcingaCheckClusterSharedVolume_Object_SpaceWarning$","order":"4"},"-IncludeVolumes":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterSharedVolume_Array_IncludeVolumes$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"2"}},"imports":["PowerShell Base"],"object_type":"object","vars":{"ifw_api_arguments":{"NoPerfData":{"set_if":"$IcingaCheckClusterSharedVolume_Switchparameter_NoPerfData$"},"ExcludeVolumes":{"value":"$IcingaCheckClusterSharedVolume_Array_ExcludeVolumes$"},"IncludeVolumes":{"value":"$IcingaCheckClusterSharedVolume_Array_IncludeVolumes$"},"SpaceWarning":{"value":"$IcingaCheckClusterSharedVolume_Object_SpaceWarning$"},"Verbosity":{"value":"$IcingaCheckClusterSharedVolume_Object_Verbosity$"},"ThresholdInterval":{"value":"$IcingaCheckClusterSharedVolume_String_ThresholdInterval$"},"SpaceCritical":{"value":"$IcingaCheckClusterSharedVolume_Object_SpaceCritical$"}},"ifw_api_command":"Invoke-IcingaCheckClusterSharedVolume","IcingaCheckClusterSharedVolume_Switchparameter_NoPerfData":false}},"Invoke-IcingaCheckClusterNetwork":{"fields":[{"datafield_id":12,"is_required":"n","var_filter":null},{"datafield_id":13,"is_required":"n","var_filter":null},{"datafield_id":14,"is_required":"n","var_filter":null},{"datafield_id":15,"is_required":"n","var_filter":null},{"datafield_id":16,"is_required":"n","var_filter":null}],"object_name":"Invoke-IcingaCheckClusterNetwork","arguments":{"-C":{"value":"try { Use-Icinga -Minimal; } catch { Write-Output \u0027The Icinga PowerShell Framework is either not installed on the system or not configured properly. Please check https://icinga.com/docs/windows for further details\u0027; Write-Output \u0027Error:\u0027 $$($$_.Exception.Message)Components:`r`n$$( Get-Module -ListAvailable \u0027icinga-powershell-*\u0027 )`r`n\u0027Module-Path:\u0027`r`n$$($$Env:PSModulePath); exit 3; }; Exit-IcingaExecutePlugin -Command \u0027Invoke-IcingaCheckClusterNetwork\u0027 ","order":"0"},"-Verbosity":{"value":"$IcingaCheckClusterNetwork_Object_Verbosity$","order":"3"},"-ThresholdInterval":{"set_if":"var str = macro(\"$IcingaCheckClusterNetwork_String_ThresholdInterval$\"); if (len(str) == 0) { return false; }; return true;","set_if_format":"expression","value":{"body":"var str = macro(\"$IcingaCheckClusterNetwork_String_ThresholdInterval$\");\r\nvar argLen = len(str);\r\n\r\nif (argLen == 0) {\r\n return;\r\n}\r\n\r\nif (argLen != 0 \u0026\u0026 str.substr(0,1) == \"\u0027\" \u0026\u0026 str.substr(argLen - 1, argLen) == \"\u0027\") {\r\n return str;\r\n}\r\n\r\nreturn (\"\u0027\" + str + \"\u0027\");","type":"Function"},"order":"100"},"-ExcludeClusterInterface":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterNetwork_Array_ExcludeClusterInterface$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"2"},"-IncludeClusterInterface":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterNetwork_Array_IncludeClusterInterface$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"1"},"-NoPerfData":{"value":"$IcingaCheckClusterNetwork_Switch_NoPerfData$","order":"99"}},"imports":["PowerShell Base"],"object_type":"object","vars":{"ifw_api_arguments":{"Verbosity":{"value":"$IcingaCheckClusterNetwork_Object_Verbosity$"},"IncludeClusterInterface":{"value":"$IcingaCheckClusterNetwork_Array_IncludeClusterInterface$"},"ThresholdInterval":{"value":"$IcingaCheckClusterNetwork_String_ThresholdInterval$"},"NoPerfData":{"value":"$IcingaCheckClusterNetwork_Switch_NoPerfData$"},"ExcludeClusterInterface":{"value":"$IcingaCheckClusterNetwork_Array_ExcludeClusterInterface$"}},"ifw_api_command":"Invoke-IcingaCheckClusterNetwork"}}},"Datafield":{"16":{"settings":{"datalist":"IcingaCheckClusterNetwork Verbosity","behavior":"strict","data_type":"string"},"description":null,"caption":"Verbosity","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"16","varname":"IcingaCheckClusterNetwork_Object_Verbosity","format":null},"7":{"settings":{"datalist":"IcingaCheckClusterHealth WarningState","behavior":"strict","data_type":"array"},"description":"Allows to specify for which node state the check will throw a warning","caption":"WarningState","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"7","varname":"IcingaCheckClusterHealth_Array_WarningState","format":null},"5":{"settings":{"visibility":"visible"},"description":"Used to specify an array of nodes to include, allows \u0027*\u0027 wildcard","caption":"Include","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"5","varname":"IcingaCheckClusterHealth_Array_Include","format":null},"21":{"settings":{"visibility":"visible"},"description":"Used to specify a Critical threshold for the SharedVolume, either in % or as byte unit\nExample: 10% or 10GB","caption":"SpaceCritical","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"21","varname":"IcingaCheckClusterSharedVolume_Object_SpaceCritical","format":null},"18":{"settings":{"visibility":"visible"},"description":"Used to Filter out which Cluster Shared Volumes you want to check, provided you have\nseveral SharedVolumes on your system. Example (\u0027Cluster disk 2\u0027)","caption":"IncludeVolumes","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"18","varname":"IcingaCheckClusterSharedVolume_Array_IncludeVolumes","format":null},"12":{"settings":{"visibility":"visible"},"description":"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.","caption":"ThresholdInterval","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"12","varname":"IcingaCheckClusterNetwork_String_ThresholdInterval","format":null},"10":{"settings":{"visibility":"visible"},"description":"Disables the performance data output of this plugin","caption":"NoPerfData","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeBoolean","originalId":"10","varname":"IcingaCheckClusterHealth_Switchparameter_NoPerfData","format":null},"2":{"settings":{"datalist":"PowerShell ExecutionPolicies","behavior":"strict","data_type":"string"},"description":"Defines with which Execution Policy the PowerShell is started","caption":"PowerShell Execution Policy","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"2","varname":"IcingaPowerShellBase_String_ExecutionPolicy","format":null},"22":{"settings":{"visibility":"visible"},"description":"Disables the performance data output of this plugin","caption":"NoPerfData","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeBoolean","originalId":"22","varname":"IcingaCheckClusterSharedVolume_Switchparameter_NoPerfData","format":null},"8":{"settings":{"datalist":"IcingaCheckClusterHealth CriticalState","behavior":"strict","data_type":"array"},"description":"Allows to specify for which node state the check will throw a critical","caption":"CriticalState","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"8","varname":"IcingaCheckClusterHealth_Array_CriticalState","format":null},"17":{"settings":{"visibility":"visible"},"description":"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.","caption":"ThresholdInterval","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"17","varname":"IcingaCheckClusterSharedVolume_String_ThresholdInterval","format":null},"11":{"settings":{"datalist":"IcingaCheckClusterHealth Verbosity","behavior":"strict","data_type":"string"},"description":"Changes the behavior of the plugin output which check states are printed:\n0 (default): Only service checks/packages with state not OK will be printed\n1: Only services with not OK will be printed including OK checks of affected check packages including Package config\n2: Everything will be printed regardless of the check state\n3: Identical to Verbose 2, but prints in addition the check package configuration e.g (All must be [OK])","caption":"Verbosity","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"11","varname":"IcingaCheckClusterHealth_Object_Verbosity","format":null},"9":{"settings":{"visibility":"visible"},"description":"Removes the Cluster Resources package from the check output if set to true","caption":"SkipClusterRessource","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeBoolean","originalId":"9","varname":"IcingaCheckClusterHealth_Switchparameter_SkipClusterRessource","format":null},"14":{"settings":{"visibility":"visible"},"description":null,"caption":"IncludeClusterInterface","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"14","varname":"IcingaCheckClusterNetwork_Array_IncludeClusterInterface","format":null},"20":{"settings":{"visibility":"visible"},"description":"Used to specify a Warning threshold for the SharedVolume, either in % or as byte unit\nExample: 10% or 10GB","caption":"SpaceWarning","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"20","varname":"IcingaCheckClusterSharedVolume_Object_SpaceWarning","format":null},"15":{"settings":{"visibility":"visible"},"description":null,"caption":"NoPerfData","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"15","varname":"IcingaCheckClusterNetwork_Switch_NoPerfData","format":null},"23":{"settings":{"datalist":"IcingaCheckClusterSharedVolume Verbosity","behavior":"strict","data_type":"string"},"description":"Changes the behavior of the plugin output which check states are printed:\n0 (default): Only service checks/packages with state not OK will be printed\n1: Only services with not OK will be printed including OK checks of affected check packages including Package config\n2: Everything will be printed regardless of the check state\n3: Identical to Verbose 2, but prints in addition the check package configuration e.g (All must be [OK])","caption":"Verbosity","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"23","varname":"IcingaCheckClusterSharedVolume_Object_Verbosity","format":null},"6":{"settings":{"visibility":"visible"},"description":"Used to specify an array of nodes to exclude, allows \u0027*\u0027 wildcard","caption":"Exclude","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"6","varname":"IcingaCheckClusterHealth_Array_Exclude","format":null},"4":{"settings":{"visibility":"visible"},"description":"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.","caption":"ThresholdInterval","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"4","varname":"IcingaCheckClusterHealth_String_ThresholdInterval","format":null},"19":{"settings":{"visibility":"visible"},"description":"Used to Filter out which Cluster Shared Volumes you don\u0027t want to check, provided you have\nseveral SharedVolumes on your system. Example (\u0027Cluster disk 2\u0027).","caption":"ExcludeVolumes","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"19","varname":"IcingaCheckClusterSharedVolume_Array_ExcludeVolumes","format":null},"13":{"settings":{"visibility":"visible"},"description":null,"caption":"ExcludeClusterInterface","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"13","varname":"IcingaCheckClusterNetwork_Array_ExcludeClusterInterface","format":null}}} diff --git a/config/director/Invoke-IcingaCheckClusterHealth.json b/config/director/Invoke-IcingaCheckClusterHealth.json index b4e1e98..ba292d2 100644 --- a/config/director/Invoke-IcingaCheckClusterHealth.json +++ b/config/director/Invoke-IcingaCheckClusterHealth.json @@ -1 +1 @@ -{"DataList":{"IcingaCheckClusterHealth WarningState":{"list_name":"IcingaCheckClusterHealth WarningState","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"Unknown","entry_name":"Unknown","format":"string"},{"allowed_roles":null,"entry_value":"Up","entry_name":"Up","format":"string"},{"allowed_roles":null,"entry_value":"Down","entry_name":"Down","format":"string"},{"allowed_roles":null,"entry_value":"Paused","entry_name":"Paused","format":"string"},{"allowed_roles":null,"entry_value":"Joining","entry_name":"Joining","format":"string"}],"owner":"stein"},"IcingaCheckClusterHealth CriticalState":{"list_name":"IcingaCheckClusterHealth CriticalState","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"Unknown","entry_name":"Unknown","format":"string"},{"allowed_roles":null,"entry_value":"Up","entry_name":"Up","format":"string"},{"allowed_roles":null,"entry_value":"Down","entry_name":"Down","format":"string"},{"allowed_roles":null,"entry_value":"Paused","entry_name":"Paused","format":"string"},{"allowed_roles":null,"entry_value":"Joining","entry_name":"Joining","format":"string"}],"owner":"stein"},"PowerShell ExecutionPolicies":{"list_name":"PowerShell ExecutionPolicies","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"AllSigned","entry_name":"AllSigned","format":"string"},{"allowed_roles":null,"entry_value":"Bypass","entry_name":"Bypass","format":"string"},{"allowed_roles":null,"entry_value":"Default","entry_name":"Default","format":"string"},{"allowed_roles":null,"entry_value":"RemoteSigned","entry_name":"RemoteSigned","format":"string"},{"allowed_roles":null,"entry_value":"Restricted","entry_name":"Restricted","format":"string"},{"allowed_roles":null,"entry_value":"Undefined","entry_name":"Undefined","format":"string"},{"allowed_roles":null,"entry_value":"Unrestricted","entry_name":"Unrestricted","format":"string"}],"owner":"stein"},"IcingaCheckClusterHealth Verbosity":{"list_name":"IcingaCheckClusterHealth Verbosity","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"0","entry_name":"0","format":"string"},{"allowed_roles":null,"entry_value":"1","entry_name":"1","format":"string"},{"allowed_roles":null,"entry_value":"2","entry_name":"2","format":"string"},{"allowed_roles":null,"entry_value":"3","entry_name":"3","format":"string"}],"owner":"stein"}},"Command":{"PowerShell Base":{"methods_execute":"PluginCheck","object_name":"PowerShell Base","vars":{"IcingaPowerShellBase_String_ExecutionPolicy":"ByPass"},"is_string":null,"command":"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe","zone":null,"disabled":false,"fields":[{"datafield_id":2,"is_required":"n","var_filter":null}],"arguments":{"-ExecutionPolicy":{"value":"$IcingaPowerShellBase_String_ExecutionPolicy$","order":"-1"},"-NoProfile":{"set_if":true,"order":"-3"},"-NoLogo":{"set_if":true,"order":"-2"}},"imports":[],"object_type":"object","timeout":"180"},"Invoke-IcingaCheckClusterHealth":{"fields":[{"datafield_id":4,"is_required":"n","var_filter":null},{"datafield_id":5,"is_required":"n","var_filter":null},{"datafield_id":6,"is_required":"n","var_filter":null},{"datafield_id":7,"is_required":"n","var_filter":null},{"datafield_id":8,"is_required":"n","var_filter":null},{"datafield_id":9,"is_required":"n","var_filter":null},{"datafield_id":10,"is_required":"n","var_filter":null},{"datafield_id":11,"is_required":"n","var_filter":null}],"object_name":"Invoke-IcingaCheckClusterHealth","arguments":{"-C":{"value":"try { Use-Icinga -Minimal; } catch { Write-Output \u0027The Icinga PowerShell Framework is either not installed on the system or not configured properly. Please check https://icinga.com/docs/windows for further details\u0027; Write-Output \u0027Error:\u0027 $$($$_.Exception.Message)Components:`r`n$$( Get-Module -ListAvailable \u0027icinga-powershell-*\u0027 )`r`n\u0027Module-Path:\u0027`r`n$$($$Env:PSModulePath); exit 3; }; Exit-IcingaExecutePlugin -Command \u0027Invoke-IcingaCheckClusterHealth\u0027 ","order":"0"},"-Verbosity":{"value":"$IcingaCheckClusterHealth_Object_Verbosity$","order":"6"},"-ThresholdInterval":{"set_if":"var str = macro(\"$IcingaCheckClusterHealth_String_ThresholdInterval$\"); if (len(str) == 0) { return false; }; return true;","set_if_format":"expression","value":{"body":"var str = macro(\"$IcingaCheckClusterHealth_String_ThresholdInterval$\");\r\nvar argLen = len(str);\r\n\r\nif (argLen == 0) {\r\n return;\r\n}\r\n\r\nif (argLen != 0 \u0026\u0026 str.substr(0,1) == \"\u0027\" \u0026\u0026 str.substr(argLen - 1, argLen) == \"\u0027\") {\r\n return str;\r\n}\r\n\r\nreturn (\"\u0027\" + str + \"\u0027\");","type":"Function"},"order":"100"},"-CriticalState":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterHealth_Array_CriticalState$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"5"},"-SkipClusterRessource":{"set_if":"$IcingaCheckClusterHealth_Switchparameter_SkipClusterRessource$","set_if_format":"string","order":"99"},"-Include":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterHealth_Array_Include$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"2"},"-WarningState":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterHealth_Array_WarningState$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"4"},"-NoPerfData":{"set_if":"$IcingaCheckClusterHealth_Switchparameter_NoPerfData$","set_if_format":"string","order":"99"},"-Exclude":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterHealth_Array_Exclude$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"3"}},"imports":["PowerShell Base"],"object_type":"object","vars":{"IcingaCheckClusterHealth_Switchparameter_SkipClusterRessource":false,"IcingaCheckClusterHealth_Switchparameter_NoPerfData":false}}},"Datafield":{"7":{"settings":{"datalist":"IcingaCheckClusterHealth WarningState","behavior":"strict","data_type":"array"},"description":"Allows to specify for which node state the check will throw a warning","caption":"WarningState","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"7","varname":"IcingaCheckClusterHealth_Array_WarningState","format":null},"9":{"settings":{"visibility":"visible"},"description":"Removes the Cluster Resources package from the check output if set to true","caption":"SkipClusterRessource","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeBoolean","originalId":"9","varname":"IcingaCheckClusterHealth_Switchparameter_SkipClusterRessource","format":null},"10":{"settings":{"visibility":"visible"},"description":"Disables the performance data output of this plugin","caption":"NoPerfData","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeBoolean","originalId":"10","varname":"IcingaCheckClusterHealth_Switchparameter_NoPerfData","format":null},"11":{"settings":{"datalist":"IcingaCheckClusterHealth Verbosity","behavior":"strict","data_type":"string"},"description":"Changes the behavior of the plugin output which check states are printed:\n0 (default): Only service checks/packages with state not OK will be printed\n1: Only services with not OK will be printed including OK checks of affected check packages including Package config\n2: Everything will be printed regardless of the check state\n3: Identical to Verbose 2, but prints in addition the check package configuration e.g (All must be [OK])","caption":"Verbosity","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"11","varname":"IcingaCheckClusterHealth_Object_Verbosity","format":null},"2":{"settings":{"datalist":"PowerShell ExecutionPolicies","behavior":"strict","data_type":"string"},"description":"Defines with which Execution Policy the PowerShell is started","caption":"PowerShell Execution Policy","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"2","varname":"IcingaPowerShellBase_String_ExecutionPolicy","format":null},"4":{"settings":{"visibility":"visible"},"description":"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.","caption":"ThresholdInterval","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"4","varname":"IcingaCheckClusterHealth_String_ThresholdInterval","format":null},"6":{"settings":{"visibility":"visible"},"description":"Used to specify an array of nodes to exclude, allows \u0027*\u0027 wildcard","caption":"Exclude","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"6","varname":"IcingaCheckClusterHealth_Array_Exclude","format":null},"5":{"settings":{"visibility":"visible"},"description":"Used to specify an array of nodes to include, allows \u0027*\u0027 wildcard","caption":"Include","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"5","varname":"IcingaCheckClusterHealth_Array_Include","format":null},"8":{"settings":{"datalist":"IcingaCheckClusterHealth CriticalState","behavior":"strict","data_type":"array"},"description":"Allows to specify for which node state the check will throw a critical","caption":"CriticalState","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"8","varname":"IcingaCheckClusterHealth_Array_CriticalState","format":null}}} +{"DataList":{"IcingaCheckClusterHealth WarningState":{"list_name":"IcingaCheckClusterHealth WarningState","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"Unknown","entry_name":"Unknown","format":"string"},{"allowed_roles":null,"entry_value":"Up","entry_name":"Up","format":"string"},{"allowed_roles":null,"entry_value":"Down","entry_name":"Down","format":"string"},{"allowed_roles":null,"entry_value":"Paused","entry_name":"Paused","format":"string"},{"allowed_roles":null,"entry_value":"Joining","entry_name":"Joining","format":"string"}],"owner":"stein"},"IcingaCheckClusterHealth CriticalState":{"list_name":"IcingaCheckClusterHealth CriticalState","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"Unknown","entry_name":"Unknown","format":"string"},{"allowed_roles":null,"entry_value":"Up","entry_name":"Up","format":"string"},{"allowed_roles":null,"entry_value":"Down","entry_name":"Down","format":"string"},{"allowed_roles":null,"entry_value":"Paused","entry_name":"Paused","format":"string"},{"allowed_roles":null,"entry_value":"Joining","entry_name":"Joining","format":"string"}],"owner":"stein"},"PowerShell ExecutionPolicies":{"list_name":"PowerShell ExecutionPolicies","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"AllSigned","entry_name":"AllSigned","format":"string"},{"allowed_roles":null,"entry_value":"Bypass","entry_name":"Bypass","format":"string"},{"allowed_roles":null,"entry_value":"Default","entry_name":"Default","format":"string"},{"allowed_roles":null,"entry_value":"RemoteSigned","entry_name":"RemoteSigned","format":"string"},{"allowed_roles":null,"entry_value":"Restricted","entry_name":"Restricted","format":"string"},{"allowed_roles":null,"entry_value":"Undefined","entry_name":"Undefined","format":"string"},{"allowed_roles":null,"entry_value":"Unrestricted","entry_name":"Unrestricted","format":"string"}],"owner":"stein"},"IcingaCheckClusterHealth Verbosity":{"list_name":"IcingaCheckClusterHealth Verbosity","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"0","entry_name":"0","format":"string"},{"allowed_roles":null,"entry_value":"1","entry_name":"1","format":"string"},{"allowed_roles":null,"entry_value":"2","entry_name":"2","format":"string"},{"allowed_roles":null,"entry_value":"3","entry_name":"3","format":"string"}],"owner":"stein"}},"Command":{"PowerShell Base":{"methods_execute":"PluginCheck","object_name":"PowerShell Base","vars":{"IcingaPowerShellBase_String_ExecutionPolicy":"ByPass"},"is_string":null,"command":"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe","zone":null,"disabled":false,"fields":[{"datafield_id":2,"is_required":"n","var_filter":null}],"arguments":{"-ExecutionPolicy":{"value":"$IcingaPowerShellBase_String_ExecutionPolicy$","order":"-1"},"-NoProfile":{"value":"-NoProfile","skip_key":true,"order":"-3"},"-NoLogo":{"value":"-NoLogo","skip_key":true,"order":"-2"}},"imports":[],"object_type":"object","timeout":"180"},"Invoke-IcingaCheckClusterHealth":{"fields":[{"datafield_id":4,"is_required":"n","var_filter":null},{"datafield_id":5,"is_required":"n","var_filter":null},{"datafield_id":6,"is_required":"n","var_filter":null},{"datafield_id":7,"is_required":"n","var_filter":null},{"datafield_id":8,"is_required":"n","var_filter":null},{"datafield_id":9,"is_required":"n","var_filter":null},{"datafield_id":10,"is_required":"n","var_filter":null},{"datafield_id":11,"is_required":"n","var_filter":null}],"object_name":"Invoke-IcingaCheckClusterHealth","arguments":{"-C":{"value":"try { Use-Icinga -Minimal; } catch { Write-Output \u0027The Icinga PowerShell Framework is either not installed on the system or not configured properly. Please check https://icinga.com/docs/windows for further details\u0027; Write-Output \u0027Error:\u0027 $$($$_.Exception.Message)Components:`r`n$$( Get-Module -ListAvailable \u0027icinga-powershell-*\u0027 )`r`n\u0027Module-Path:\u0027`r`n$$($$Env:PSModulePath); exit 3; }; Exit-IcingaExecutePlugin -Command \u0027Invoke-IcingaCheckClusterHealth\u0027 ","order":"0"},"-Verbosity":{"value":"$IcingaCheckClusterHealth_Object_Verbosity$","order":"6"},"-ThresholdInterval":{"set_if":"var str = macro(\"$IcingaCheckClusterHealth_String_ThresholdInterval$\"); if (len(str) == 0) { return false; }; return true;","set_if_format":"expression","value":{"body":"var str = macro(\"$IcingaCheckClusterHealth_String_ThresholdInterval$\");\r\nvar argLen = len(str);\r\n\r\nif (argLen == 0) {\r\n return;\r\n}\r\n\r\nif (argLen != 0 \u0026\u0026 str.substr(0,1) == \"\u0027\" \u0026\u0026 str.substr(argLen - 1, argLen) == \"\u0027\") {\r\n return str;\r\n}\r\n\r\nreturn (\"\u0027\" + str + \"\u0027\");","type":"Function"},"order":"100"},"-CriticalState":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterHealth_Array_CriticalState$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"5"},"-SkipClusterRessource":{"set_if":"$IcingaCheckClusterHealth_Switchparameter_SkipClusterRessource$","set_if_format":"string","order":"99"},"-Include":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterHealth_Array_Include$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"2"},"-WarningState":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterHealth_Array_WarningState$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"4"},"-NoPerfData":{"set_if":"$IcingaCheckClusterHealth_Switchparameter_NoPerfData$","set_if_format":"string","order":"99"},"-Exclude":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterHealth_Array_Exclude$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"3"}},"imports":["PowerShell Base"],"object_type":"object","vars":{"ifw_api_arguments":{"CriticalState":{"value":"$IcingaCheckClusterHealth_Array_CriticalState$"},"ThresholdInterval":{"value":"$IcingaCheckClusterHealth_String_ThresholdInterval$"},"WarningState":{"value":"$IcingaCheckClusterHealth_Array_WarningState$"},"SkipClusterRessource":{"set_if":"$IcingaCheckClusterHealth_Switchparameter_SkipClusterRessource$"},"Verbosity":{"value":"$IcingaCheckClusterHealth_Object_Verbosity$"},"Exclude":{"value":"$IcingaCheckClusterHealth_Array_Exclude$"},"NoPerfData":{"set_if":"$IcingaCheckClusterHealth_Switchparameter_NoPerfData$"},"Include":{"value":"$IcingaCheckClusterHealth_Array_Include$"}},"ifw_api_command":"Invoke-IcingaCheckClusterHealth","IcingaCheckClusterHealth_Switchparameter_NoPerfData":false,"IcingaCheckClusterHealth_Switchparameter_SkipClusterRessource":false}}},"Datafield":{"7":{"settings":{"datalist":"IcingaCheckClusterHealth WarningState","behavior":"strict","data_type":"array"},"description":"Allows to specify for which node state the check will throw a warning","caption":"WarningState","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"7","varname":"IcingaCheckClusterHealth_Array_WarningState","format":null},"9":{"settings":{"visibility":"visible"},"description":"Removes the Cluster Resources package from the check output if set to true","caption":"SkipClusterRessource","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeBoolean","originalId":"9","varname":"IcingaCheckClusterHealth_Switchparameter_SkipClusterRessource","format":null},"10":{"settings":{"visibility":"visible"},"description":"Disables the performance data output of this plugin","caption":"NoPerfData","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeBoolean","originalId":"10","varname":"IcingaCheckClusterHealth_Switchparameter_NoPerfData","format":null},"11":{"settings":{"datalist":"IcingaCheckClusterHealth Verbosity","behavior":"strict","data_type":"string"},"description":"Changes the behavior of the plugin output which check states are printed:\n0 (default): Only service checks/packages with state not OK will be printed\n1: Only services with not OK will be printed including OK checks of affected check packages including Package config\n2: Everything will be printed regardless of the check state\n3: Identical to Verbose 2, but prints in addition the check package configuration e.g (All must be [OK])","caption":"Verbosity","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"11","varname":"IcingaCheckClusterHealth_Object_Verbosity","format":null},"2":{"settings":{"datalist":"PowerShell ExecutionPolicies","behavior":"strict","data_type":"string"},"description":"Defines with which Execution Policy the PowerShell is started","caption":"PowerShell Execution Policy","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"2","varname":"IcingaPowerShellBase_String_ExecutionPolicy","format":null},"4":{"settings":{"visibility":"visible"},"description":"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.","caption":"ThresholdInterval","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"4","varname":"IcingaCheckClusterHealth_String_ThresholdInterval","format":null},"6":{"settings":{"visibility":"visible"},"description":"Used to specify an array of nodes to exclude, allows \u0027*\u0027 wildcard","caption":"Exclude","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"6","varname":"IcingaCheckClusterHealth_Array_Exclude","format":null},"5":{"settings":{"visibility":"visible"},"description":"Used to specify an array of nodes to include, allows \u0027*\u0027 wildcard","caption":"Include","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"5","varname":"IcingaCheckClusterHealth_Array_Include","format":null},"8":{"settings":{"datalist":"IcingaCheckClusterHealth CriticalState","behavior":"strict","data_type":"array"},"description":"Allows to specify for which node state the check will throw a critical","caption":"CriticalState","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"8","varname":"IcingaCheckClusterHealth_Array_CriticalState","format":null}}} diff --git a/config/director/Invoke-IcingaCheckClusterNetwork.json b/config/director/Invoke-IcingaCheckClusterNetwork.json index 3465063..50d5e2e 100644 --- a/config/director/Invoke-IcingaCheckClusterNetwork.json +++ b/config/director/Invoke-IcingaCheckClusterNetwork.json @@ -1 +1 @@ -{"DataList":{"IcingaCheckClusterNetwork Verbosity":{"list_name":"IcingaCheckClusterNetwork Verbosity","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"0","entry_name":"0","format":"string"},{"allowed_roles":null,"entry_value":"1","entry_name":"1","format":"string"},{"allowed_roles":null,"entry_value":"2","entry_name":"2","format":"string"},{"allowed_roles":null,"entry_value":"3","entry_name":"3","format":"string"}],"owner":"stein"},"PowerShell ExecutionPolicies":{"list_name":"PowerShell ExecutionPolicies","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"AllSigned","entry_name":"AllSigned","format":"string"},{"allowed_roles":null,"entry_value":"Bypass","entry_name":"Bypass","format":"string"},{"allowed_roles":null,"entry_value":"Default","entry_name":"Default","format":"string"},{"allowed_roles":null,"entry_value":"RemoteSigned","entry_name":"RemoteSigned","format":"string"},{"allowed_roles":null,"entry_value":"Restricted","entry_name":"Restricted","format":"string"},{"allowed_roles":null,"entry_value":"Undefined","entry_name":"Undefined","format":"string"},{"allowed_roles":null,"entry_value":"Unrestricted","entry_name":"Unrestricted","format":"string"}],"owner":"stein"}},"Command":{"PowerShell Base":{"methods_execute":"PluginCheck","object_name":"PowerShell Base","vars":{"IcingaPowerShellBase_String_ExecutionPolicy":"ByPass"},"is_string":null,"command":"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe","zone":null,"disabled":false,"fields":[{"datafield_id":2,"is_required":"n","var_filter":null}],"arguments":{"-ExecutionPolicy":{"value":"$IcingaPowerShellBase_String_ExecutionPolicy$","order":"-1"},"-NoProfile":{"set_if":true,"order":"-3"},"-NoLogo":{"set_if":true,"order":"-2"}},"imports":[],"object_type":"object","timeout":"180"},"Invoke-IcingaCheckClusterNetwork":{"fields":[{"datafield_id":4,"is_required":"n","var_filter":null},{"datafield_id":5,"is_required":"n","var_filter":null},{"datafield_id":6,"is_required":"n","var_filter":null},{"datafield_id":7,"is_required":"n","var_filter":null},{"datafield_id":8,"is_required":"n","var_filter":null}],"object_name":"Invoke-IcingaCheckClusterNetwork","arguments":{"-C":{"value":"try { Use-Icinga -Minimal; } catch { Write-Output \u0027The Icinga PowerShell Framework is either not installed on the system or not configured properly. Please check https://icinga.com/docs/windows for further details\u0027; Write-Output \u0027Error:\u0027 $$($$_.Exception.Message)Components:`r`n$$( Get-Module -ListAvailable \u0027icinga-powershell-*\u0027 )`r`n\u0027Module-Path:\u0027`r`n$$($$Env:PSModulePath); exit 3; }; Exit-IcingaExecutePlugin -Command \u0027Invoke-IcingaCheckClusterNetwork\u0027 ","order":"0"},"-Verbosity":{"value":"$IcingaCheckClusterNetwork_Object_Verbosity$","order":"3"},"-ThresholdInterval":{"set_if":"var str = macro(\"$IcingaCheckClusterNetwork_String_ThresholdInterval$\"); if (len(str) == 0) { return false; }; return true;","set_if_format":"expression","value":{"body":"var str = macro(\"$IcingaCheckClusterNetwork_String_ThresholdInterval$\");\r\nvar argLen = len(str);\r\n\r\nif (argLen == 0) {\r\n return;\r\n}\r\n\r\nif (argLen != 0 \u0026\u0026 str.substr(0,1) == \"\u0027\" \u0026\u0026 str.substr(argLen - 1, argLen) == \"\u0027\") {\r\n return str;\r\n}\r\n\r\nreturn (\"\u0027\" + str + \"\u0027\");","type":"Function"},"order":"100"},"-ExcludeClusterInterface":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterNetwork_Array_ExcludeClusterInterface$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"2"},"-IncludeClusterInterface":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterNetwork_Array_IncludeClusterInterface$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"1"},"-NoPerfData":{"value":"$IcingaCheckClusterNetwork_Switch_NoPerfData$","order":"99"}},"imports":["PowerShell Base"],"object_type":"object","vars":{}}},"Datafield":{"7":{"settings":{"visibility":"visible"},"description":null,"caption":"NoPerfData","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"7","varname":"IcingaCheckClusterNetwork_Switch_NoPerfData","format":null},"2":{"settings":{"datalist":"PowerShell ExecutionPolicies","behavior":"strict","data_type":"string"},"description":"Defines with which Execution Policy the PowerShell is started","caption":"PowerShell Execution Policy","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"2","varname":"IcingaPowerShellBase_String_ExecutionPolicy","format":null},"4":{"settings":{"visibility":"visible"},"description":"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.","caption":"ThresholdInterval","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"4","varname":"IcingaCheckClusterNetwork_String_ThresholdInterval","format":null},"6":{"settings":{"visibility":"visible"},"description":null,"caption":"IncludeClusterInterface","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"6","varname":"IcingaCheckClusterNetwork_Array_IncludeClusterInterface","format":null},"5":{"settings":{"visibility":"visible"},"description":null,"caption":"ExcludeClusterInterface","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"5","varname":"IcingaCheckClusterNetwork_Array_ExcludeClusterInterface","format":null},"8":{"settings":{"datalist":"IcingaCheckClusterNetwork Verbosity","behavior":"strict","data_type":"string"},"description":null,"caption":"Verbosity","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"8","varname":"IcingaCheckClusterNetwork_Object_Verbosity","format":null}}} +{"DataList":{"IcingaCheckClusterNetwork Verbosity":{"list_name":"IcingaCheckClusterNetwork Verbosity","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"0","entry_name":"0","format":"string"},{"allowed_roles":null,"entry_value":"1","entry_name":"1","format":"string"},{"allowed_roles":null,"entry_value":"2","entry_name":"2","format":"string"},{"allowed_roles":null,"entry_value":"3","entry_name":"3","format":"string"}],"owner":"stein"},"PowerShell ExecutionPolicies":{"list_name":"PowerShell ExecutionPolicies","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"AllSigned","entry_name":"AllSigned","format":"string"},{"allowed_roles":null,"entry_value":"Bypass","entry_name":"Bypass","format":"string"},{"allowed_roles":null,"entry_value":"Default","entry_name":"Default","format":"string"},{"allowed_roles":null,"entry_value":"RemoteSigned","entry_name":"RemoteSigned","format":"string"},{"allowed_roles":null,"entry_value":"Restricted","entry_name":"Restricted","format":"string"},{"allowed_roles":null,"entry_value":"Undefined","entry_name":"Undefined","format":"string"},{"allowed_roles":null,"entry_value":"Unrestricted","entry_name":"Unrestricted","format":"string"}],"owner":"stein"}},"Command":{"PowerShell Base":{"methods_execute":"PluginCheck","object_name":"PowerShell Base","vars":{"IcingaPowerShellBase_String_ExecutionPolicy":"ByPass"},"is_string":null,"command":"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe","zone":null,"disabled":false,"fields":[{"datafield_id":2,"is_required":"n","var_filter":null}],"arguments":{"-ExecutionPolicy":{"value":"$IcingaPowerShellBase_String_ExecutionPolicy$","order":"-1"},"-NoProfile":{"value":"-NoProfile","skip_key":true,"order":"-3"},"-NoLogo":{"value":"-NoLogo","skip_key":true,"order":"-2"}},"imports":[],"object_type":"object","timeout":"180"},"Invoke-IcingaCheckClusterNetwork":{"fields":[{"datafield_id":4,"is_required":"n","var_filter":null},{"datafield_id":5,"is_required":"n","var_filter":null},{"datafield_id":6,"is_required":"n","var_filter":null},{"datafield_id":7,"is_required":"n","var_filter":null},{"datafield_id":8,"is_required":"n","var_filter":null}],"object_name":"Invoke-IcingaCheckClusterNetwork","arguments":{"-C":{"value":"try { Use-Icinga -Minimal; } catch { Write-Output \u0027The Icinga PowerShell Framework is either not installed on the system or not configured properly. Please check https://icinga.com/docs/windows for further details\u0027; Write-Output \u0027Error:\u0027 $$($$_.Exception.Message)Components:`r`n$$( Get-Module -ListAvailable \u0027icinga-powershell-*\u0027 )`r`n\u0027Module-Path:\u0027`r`n$$($$Env:PSModulePath); exit 3; }; Exit-IcingaExecutePlugin -Command \u0027Invoke-IcingaCheckClusterNetwork\u0027 ","order":"0"},"-Verbosity":{"value":"$IcingaCheckClusterNetwork_Object_Verbosity$","order":"3"},"-ThresholdInterval":{"set_if":"var str = macro(\"$IcingaCheckClusterNetwork_String_ThresholdInterval$\"); if (len(str) == 0) { return false; }; return true;","set_if_format":"expression","value":{"body":"var str = macro(\"$IcingaCheckClusterNetwork_String_ThresholdInterval$\");\r\nvar argLen = len(str);\r\n\r\nif (argLen == 0) {\r\n return;\r\n}\r\n\r\nif (argLen != 0 \u0026\u0026 str.substr(0,1) == \"\u0027\" \u0026\u0026 str.substr(argLen - 1, argLen) == \"\u0027\") {\r\n return str;\r\n}\r\n\r\nreturn (\"\u0027\" + str + \"\u0027\");","type":"Function"},"order":"100"},"-ExcludeClusterInterface":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterNetwork_Array_ExcludeClusterInterface$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"2"},"-IncludeClusterInterface":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterNetwork_Array_IncludeClusterInterface$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"1"},"-NoPerfData":{"value":"$IcingaCheckClusterNetwork_Switch_NoPerfData$","order":"99"}},"imports":["PowerShell Base"],"object_type":"object","vars":{"ifw_api_arguments":{"Verbosity":{"value":"$IcingaCheckClusterNetwork_Object_Verbosity$"},"IncludeClusterInterface":{"value":"$IcingaCheckClusterNetwork_Array_IncludeClusterInterface$"},"ThresholdInterval":{"value":"$IcingaCheckClusterNetwork_String_ThresholdInterval$"},"NoPerfData":{"value":"$IcingaCheckClusterNetwork_Switch_NoPerfData$"},"ExcludeClusterInterface":{"value":"$IcingaCheckClusterNetwork_Array_ExcludeClusterInterface$"}},"ifw_api_command":"Invoke-IcingaCheckClusterNetwork"}}},"Datafield":{"7":{"settings":{"visibility":"visible"},"description":null,"caption":"NoPerfData","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"7","varname":"IcingaCheckClusterNetwork_Switch_NoPerfData","format":null},"2":{"settings":{"datalist":"PowerShell ExecutionPolicies","behavior":"strict","data_type":"string"},"description":"Defines with which Execution Policy the PowerShell is started","caption":"PowerShell Execution Policy","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"2","varname":"IcingaPowerShellBase_String_ExecutionPolicy","format":null},"4":{"settings":{"visibility":"visible"},"description":"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.","caption":"ThresholdInterval","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"4","varname":"IcingaCheckClusterNetwork_String_ThresholdInterval","format":null},"6":{"settings":{"visibility":"visible"},"description":null,"caption":"IncludeClusterInterface","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"6","varname":"IcingaCheckClusterNetwork_Array_IncludeClusterInterface","format":null},"5":{"settings":{"visibility":"visible"},"description":null,"caption":"ExcludeClusterInterface","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"5","varname":"IcingaCheckClusterNetwork_Array_ExcludeClusterInterface","format":null},"8":{"settings":{"datalist":"IcingaCheckClusterNetwork Verbosity","behavior":"strict","data_type":"string"},"description":null,"caption":"Verbosity","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"8","varname":"IcingaCheckClusterNetwork_Object_Verbosity","format":null}}} diff --git a/config/director/Invoke-IcingaCheckClusterSharedVolume.json b/config/director/Invoke-IcingaCheckClusterSharedVolume.json index ece948c..abbaf1f 100644 --- a/config/director/Invoke-IcingaCheckClusterSharedVolume.json +++ b/config/director/Invoke-IcingaCheckClusterSharedVolume.json @@ -1 +1 @@ -{"DataList":{"IcingaCheckClusterSharedVolume Verbosity":{"list_name":"IcingaCheckClusterSharedVolume Verbosity","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"0","entry_name":"0","format":"string"},{"allowed_roles":null,"entry_value":"1","entry_name":"1","format":"string"},{"allowed_roles":null,"entry_value":"2","entry_name":"2","format":"string"},{"allowed_roles":null,"entry_value":"3","entry_name":"3","format":"string"}],"owner":"stein"},"PowerShell ExecutionPolicies":{"list_name":"PowerShell ExecutionPolicies","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"AllSigned","entry_name":"AllSigned","format":"string"},{"allowed_roles":null,"entry_value":"Bypass","entry_name":"Bypass","format":"string"},{"allowed_roles":null,"entry_value":"Default","entry_name":"Default","format":"string"},{"allowed_roles":null,"entry_value":"RemoteSigned","entry_name":"RemoteSigned","format":"string"},{"allowed_roles":null,"entry_value":"Restricted","entry_name":"Restricted","format":"string"},{"allowed_roles":null,"entry_value":"Undefined","entry_name":"Undefined","format":"string"},{"allowed_roles":null,"entry_value":"Unrestricted","entry_name":"Unrestricted","format":"string"}],"owner":"stein"}},"Command":{"Invoke-IcingaCheckClusterSharedVolume":{"fields":[{"datafield_id":4,"is_required":"n","var_filter":null},{"datafield_id":5,"is_required":"n","var_filter":null},{"datafield_id":6,"is_required":"n","var_filter":null},{"datafield_id":7,"is_required":"n","var_filter":null},{"datafield_id":8,"is_required":"n","var_filter":null},{"datafield_id":9,"is_required":"n","var_filter":null},{"datafield_id":10,"is_required":"n","var_filter":null}],"object_name":"Invoke-IcingaCheckClusterSharedVolume","arguments":{"-C":{"value":"try { Use-Icinga -Minimal; } catch { Write-Output \u0027The Icinga PowerShell Framework is either not installed on the system or not configured properly. Please check https://icinga.com/docs/windows for further details\u0027; Write-Output \u0027Error:\u0027 $$($$_.Exception.Message)Components:`r`n$$( Get-Module -ListAvailable \u0027icinga-powershell-*\u0027 )`r`n\u0027Module-Path:\u0027`r`n$$($$Env:PSModulePath); exit 3; }; Exit-IcingaExecutePlugin -Command \u0027Invoke-IcingaCheckClusterSharedVolume\u0027 ","order":"0"},"-Verbosity":{"value":"$IcingaCheckClusterSharedVolume_Object_Verbosity$","order":"6"},"-ThresholdInterval":{"set_if":"var str = macro(\"$IcingaCheckClusterSharedVolume_String_ThresholdInterval$\"); if (len(str) == 0) { return false; }; return true;","set_if_format":"expression","value":{"body":"var str = macro(\"$IcingaCheckClusterSharedVolume_String_ThresholdInterval$\");\r\nvar argLen = len(str);\r\n\r\nif (argLen == 0) {\r\n return;\r\n}\r\n\r\nif (argLen != 0 \u0026\u0026 str.substr(0,1) == \"\u0027\" \u0026\u0026 str.substr(argLen - 1, argLen) == \"\u0027\") {\r\n return str;\r\n}\r\n\r\nreturn (\"\u0027\" + str + \"\u0027\");","type":"Function"},"order":"100"},"-SpaceCritical":{"value":"$IcingaCheckClusterSharedVolume_Object_SpaceCritical$","order":"5"},"-ExcludeVolumes":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterSharedVolume_Array_ExcludeVolumes$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"3"},"-NoPerfData":{"set_if":"$IcingaCheckClusterSharedVolume_Switchparameter_NoPerfData$","set_if_format":"string","order":"99"},"-SpaceWarning":{"value":"$IcingaCheckClusterSharedVolume_Object_SpaceWarning$","order":"4"},"-IncludeVolumes":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterSharedVolume_Array_IncludeVolumes$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"2"}},"imports":["PowerShell Base"],"object_type":"object","vars":{"IcingaCheckClusterSharedVolume_Switchparameter_NoPerfData":false}},"PowerShell Base":{"methods_execute":"PluginCheck","object_name":"PowerShell Base","vars":{"IcingaPowerShellBase_String_ExecutionPolicy":"ByPass"},"is_string":null,"command":"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe","zone":null,"disabled":false,"fields":[{"datafield_id":2,"is_required":"n","var_filter":null}],"arguments":{"-ExecutionPolicy":{"value":"$IcingaPowerShellBase_String_ExecutionPolicy$","order":"-1"},"-NoProfile":{"set_if":true,"order":"-3"},"-NoLogo":{"set_if":true,"order":"-2"}},"imports":[],"object_type":"object","timeout":"180"}},"Datafield":{"7":{"settings":{"visibility":"visible"},"description":"Used to specify a Warning threshold for the SharedVolume, either in % or as byte unit\nExample: 10% or 10GB","caption":"SpaceWarning","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"7","varname":"IcingaCheckClusterSharedVolume_Object_SpaceWarning","format":null},"9":{"settings":{"visibility":"visible"},"description":"Disables the performance data output of this plugin","caption":"NoPerfData","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeBoolean","originalId":"9","varname":"IcingaCheckClusterSharedVolume_Switchparameter_NoPerfData","format":null},"10":{"settings":{"datalist":"IcingaCheckClusterSharedVolume Verbosity","behavior":"strict","data_type":"string"},"description":"Changes the behavior of the plugin output which check states are printed:\n0 (default): Only service checks/packages with state not OK will be printed\n1: Only services with not OK will be printed including OK checks of affected check packages including Package config\n2: Everything will be printed regardless of the check state\n3: Identical to Verbose 2, but prints in addition the check package configuration e.g (All must be [OK])","caption":"Verbosity","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"10","varname":"IcingaCheckClusterSharedVolume_Object_Verbosity","format":null},"2":{"settings":{"datalist":"PowerShell ExecutionPolicies","behavior":"strict","data_type":"string"},"description":"Defines with which Execution Policy the PowerShell is started","caption":"PowerShell Execution Policy","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"2","varname":"IcingaPowerShellBase_String_ExecutionPolicy","format":null},"4":{"settings":{"visibility":"visible"},"description":"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.","caption":"ThresholdInterval","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"4","varname":"IcingaCheckClusterSharedVolume_String_ThresholdInterval","format":null},"6":{"settings":{"visibility":"visible"},"description":"Used to Filter out which Cluster Shared Volumes you don\u0027t want to check, provided you have\nseveral SharedVolumes on your system. Example (\u0027Cluster disk 2\u0027).","caption":"ExcludeVolumes","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"6","varname":"IcingaCheckClusterSharedVolume_Array_ExcludeVolumes","format":null},"5":{"settings":{"visibility":"visible"},"description":"Used to Filter out which Cluster Shared Volumes you want to check, provided you have\nseveral SharedVolumes on your system. Example (\u0027Cluster disk 2\u0027)","caption":"IncludeVolumes","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"5","varname":"IcingaCheckClusterSharedVolume_Array_IncludeVolumes","format":null},"8":{"settings":{"visibility":"visible"},"description":"Used to specify a Critical threshold for the SharedVolume, either in % or as byte unit\nExample: 10% or 10GB","caption":"SpaceCritical","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"8","varname":"IcingaCheckClusterSharedVolume_Object_SpaceCritical","format":null}}} +{"DataList":{"IcingaCheckClusterSharedVolume Verbosity":{"list_name":"IcingaCheckClusterSharedVolume Verbosity","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"0","entry_name":"0","format":"string"},{"allowed_roles":null,"entry_value":"1","entry_name":"1","format":"string"},{"allowed_roles":null,"entry_value":"2","entry_name":"2","format":"string"},{"allowed_roles":null,"entry_value":"3","entry_name":"3","format":"string"}],"owner":"stein"},"PowerShell ExecutionPolicies":{"list_name":"PowerShell ExecutionPolicies","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"AllSigned","entry_name":"AllSigned","format":"string"},{"allowed_roles":null,"entry_value":"Bypass","entry_name":"Bypass","format":"string"},{"allowed_roles":null,"entry_value":"Default","entry_name":"Default","format":"string"},{"allowed_roles":null,"entry_value":"RemoteSigned","entry_name":"RemoteSigned","format":"string"},{"allowed_roles":null,"entry_value":"Restricted","entry_name":"Restricted","format":"string"},{"allowed_roles":null,"entry_value":"Undefined","entry_name":"Undefined","format":"string"},{"allowed_roles":null,"entry_value":"Unrestricted","entry_name":"Unrestricted","format":"string"}],"owner":"stein"}},"Command":{"Invoke-IcingaCheckClusterSharedVolume":{"fields":[{"datafield_id":4,"is_required":"n","var_filter":null},{"datafield_id":5,"is_required":"n","var_filter":null},{"datafield_id":6,"is_required":"n","var_filter":null},{"datafield_id":7,"is_required":"n","var_filter":null},{"datafield_id":8,"is_required":"n","var_filter":null},{"datafield_id":9,"is_required":"n","var_filter":null},{"datafield_id":10,"is_required":"n","var_filter":null}],"object_name":"Invoke-IcingaCheckClusterSharedVolume","arguments":{"-C":{"value":"try { Use-Icinga -Minimal; } catch { Write-Output \u0027The Icinga PowerShell Framework is either not installed on the system or not configured properly. Please check https://icinga.com/docs/windows for further details\u0027; Write-Output \u0027Error:\u0027 $$($$_.Exception.Message)Components:`r`n$$( Get-Module -ListAvailable \u0027icinga-powershell-*\u0027 )`r`n\u0027Module-Path:\u0027`r`n$$($$Env:PSModulePath); exit 3; }; Exit-IcingaExecutePlugin -Command \u0027Invoke-IcingaCheckClusterSharedVolume\u0027 ","order":"0"},"-Verbosity":{"value":"$IcingaCheckClusterSharedVolume_Object_Verbosity$","order":"6"},"-ThresholdInterval":{"set_if":"var str = macro(\"$IcingaCheckClusterSharedVolume_String_ThresholdInterval$\"); if (len(str) == 0) { return false; }; return true;","set_if_format":"expression","value":{"body":"var str = macro(\"$IcingaCheckClusterSharedVolume_String_ThresholdInterval$\");\r\nvar argLen = len(str);\r\n\r\nif (argLen == 0) {\r\n return;\r\n}\r\n\r\nif (argLen != 0 \u0026\u0026 str.substr(0,1) == \"\u0027\" \u0026\u0026 str.substr(argLen - 1, argLen) == \"\u0027\") {\r\n return str;\r\n}\r\n\r\nreturn (\"\u0027\" + str + \"\u0027\");","type":"Function"},"order":"100"},"-SpaceCritical":{"value":"$IcingaCheckClusterSharedVolume_Object_SpaceCritical$","order":"5"},"-ExcludeVolumes":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterSharedVolume_Array_ExcludeVolumes$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"3"},"-NoPerfData":{"set_if":"$IcingaCheckClusterSharedVolume_Switchparameter_NoPerfData$","set_if_format":"string","order":"99"},"-SpaceWarning":{"value":"$IcingaCheckClusterSharedVolume_Object_SpaceWarning$","order":"4"},"-IncludeVolumes":{"value":{"body":"var arr = macro(\"$IcingaCheckClusterSharedVolume_Array_IncludeVolumes$\");\r\n\r\nif (len(arr) == 0) {\r\n return \"@()\";\r\n}\r\n\r\nvar psarr = arr.map(\r\n x =\u003e if (typeof(x) == String) {\r\n var argLen = len(x);\r\n if (argLen != 0 \u0026\u0026 x.substr(0,1) == \"\u0027\" \u0026\u0026 x.substr(argLen - 1, argLen) == \"\u0027\") {\r\n x;\r\n } else {\r\n \"\u0027\" + x + \"\u0027\";\r\n }\r\n } else {\r\n x;\r\n }\r\n).join(\",\");\r\n\r\nreturn \"@(\" + psarr + \")\";","type":"Function"},"order":"2"}},"imports":["PowerShell Base"],"object_type":"object","vars":{"ifw_api_arguments":{"NoPerfData":{"set_if":"$IcingaCheckClusterSharedVolume_Switchparameter_NoPerfData$"},"ExcludeVolumes":{"value":"$IcingaCheckClusterSharedVolume_Array_ExcludeVolumes$"},"IncludeVolumes":{"value":"$IcingaCheckClusterSharedVolume_Array_IncludeVolumes$"},"SpaceWarning":{"value":"$IcingaCheckClusterSharedVolume_Object_SpaceWarning$"},"Verbosity":{"value":"$IcingaCheckClusterSharedVolume_Object_Verbosity$"},"ThresholdInterval":{"value":"$IcingaCheckClusterSharedVolume_String_ThresholdInterval$"},"SpaceCritical":{"value":"$IcingaCheckClusterSharedVolume_Object_SpaceCritical$"}},"ifw_api_command":"Invoke-IcingaCheckClusterSharedVolume","IcingaCheckClusterSharedVolume_Switchparameter_NoPerfData":false}},"PowerShell Base":{"methods_execute":"PluginCheck","object_name":"PowerShell Base","vars":{"IcingaPowerShellBase_String_ExecutionPolicy":"ByPass"},"is_string":null,"command":"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe","zone":null,"disabled":false,"fields":[{"datafield_id":2,"is_required":"n","var_filter":null}],"arguments":{"-ExecutionPolicy":{"value":"$IcingaPowerShellBase_String_ExecutionPolicy$","order":"-1"},"-NoProfile":{"value":"-NoProfile","skip_key":true,"order":"-3"},"-NoLogo":{"value":"-NoLogo","skip_key":true,"order":"-2"}},"imports":[],"object_type":"object","timeout":"180"}},"Datafield":{"7":{"settings":{"visibility":"visible"},"description":"Used to specify a Warning threshold for the SharedVolume, either in % or as byte unit\nExample: 10% or 10GB","caption":"SpaceWarning","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"7","varname":"IcingaCheckClusterSharedVolume_Object_SpaceWarning","format":null},"9":{"settings":{"visibility":"visible"},"description":"Disables the performance data output of this plugin","caption":"NoPerfData","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeBoolean","originalId":"9","varname":"IcingaCheckClusterSharedVolume_Switchparameter_NoPerfData","format":null},"10":{"settings":{"datalist":"IcingaCheckClusterSharedVolume Verbosity","behavior":"strict","data_type":"string"},"description":"Changes the behavior of the plugin output which check states are printed:\n0 (default): Only service checks/packages with state not OK will be printed\n1: Only services with not OK will be printed including OK checks of affected check packages including Package config\n2: Everything will be printed regardless of the check state\n3: Identical to Verbose 2, but prints in addition the check package configuration e.g (All must be [OK])","caption":"Verbosity","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"10","varname":"IcingaCheckClusterSharedVolume_Object_Verbosity","format":null},"2":{"settings":{"datalist":"PowerShell ExecutionPolicies","behavior":"strict","data_type":"string"},"description":"Defines with which Execution Policy the PowerShell is started","caption":"PowerShell Execution Policy","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"2","varname":"IcingaPowerShellBase_String_ExecutionPolicy","format":null},"4":{"settings":{"visibility":"visible"},"description":"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.","caption":"ThresholdInterval","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"4","varname":"IcingaCheckClusterSharedVolume_String_ThresholdInterval","format":null},"6":{"settings":{"visibility":"visible"},"description":"Used to Filter out which Cluster Shared Volumes you don\u0027t want to check, provided you have\nseveral SharedVolumes on your system. Example (\u0027Cluster disk 2\u0027).","caption":"ExcludeVolumes","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"6","varname":"IcingaCheckClusterSharedVolume_Array_ExcludeVolumes","format":null},"5":{"settings":{"visibility":"visible"},"description":"Used to Filter out which Cluster Shared Volumes you want to check, provided you have\nseveral SharedVolumes on your system. Example (\u0027Cluster disk 2\u0027)","caption":"IncludeVolumes","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"5","varname":"IcingaCheckClusterSharedVolume_Array_IncludeVolumes","format":null},"8":{"settings":{"visibility":"visible"},"description":"Used to specify a Critical threshold for the SharedVolume, either in % or as byte unit\nExample: 10% or 10GB","caption":"SpaceCritical","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"8","varname":"IcingaCheckClusterSharedVolume_Object_SpaceCritical","format":null}}} diff --git a/config/icinga/Cluster_Bundle.conf b/config/icinga/Cluster_Bundle.conf index cd0a068..9cc229b 100644 --- a/config/icinga/Cluster_Bundle.conf +++ b/config/icinga/Cluster_Bundle.conf @@ -130,8 +130,35 @@ object CheckCommand "Invoke-IcingaCheckClusterHealth" { order = 3 } } - vars.IcingaCheckClusterHealth_Switchparameter_SkipClusterRessource = false + vars.ifw_api_arguments = { + "CriticalState" = { + value = "$IcingaCheckClusterHealth_Array_CriticalState$" + } + "ThresholdInterval" = { + value = "$IcingaCheckClusterHealth_String_ThresholdInterval$" + } + "WarningState" = { + value = "$IcingaCheckClusterHealth_Array_WarningState$" + } + "SkipClusterRessource" = { + set_if = "$IcingaCheckClusterHealth_Switchparameter_SkipClusterRessource$" + } + "Verbosity" = { + value = "$IcingaCheckClusterHealth_Object_Verbosity$" + } + "Exclude" = { + value = "$IcingaCheckClusterHealth_Array_Exclude$" + } + "NoPerfData" = { + set_if = "$IcingaCheckClusterHealth_Switchparameter_NoPerfData$" + } + "Include" = { + value = "$IcingaCheckClusterHealth_Array_Include$" + } + } + vars.ifw_api_command = invoke-icingacheckclusterhealth vars.IcingaCheckClusterHealth_Switchparameter_NoPerfData = false + vars.IcingaCheckClusterHealth_Switchparameter_SkipClusterRessource = false } object CheckCommand "Invoke-IcingaCheckClusterSharedVolume" { @@ -226,6 +253,30 @@ object CheckCommand "Invoke-IcingaCheckClusterSharedVolume" { order = 2 } } + vars.ifw_api_arguments = { + "NoPerfData" = { + set_if = "$IcingaCheckClusterSharedVolume_Switchparameter_NoPerfData$" + } + "ExcludeVolumes" = { + value = "$IcingaCheckClusterSharedVolume_Array_ExcludeVolumes$" + } + "IncludeVolumes" = { + value = "$IcingaCheckClusterSharedVolume_Array_IncludeVolumes$" + } + "SpaceWarning" = { + value = "$IcingaCheckClusterSharedVolume_Object_SpaceWarning$" + } + "Verbosity" = { + value = "$IcingaCheckClusterSharedVolume_Object_Verbosity$" + } + "ThresholdInterval" = { + value = "$IcingaCheckClusterSharedVolume_String_ThresholdInterval$" + } + "SpaceCritical" = { + value = "$IcingaCheckClusterSharedVolume_Object_SpaceCritical$" + } + } + vars.ifw_api_command = invoke-icingacheckclustersharedvolume vars.IcingaCheckClusterSharedVolume_Switchparameter_NoPerfData = false } @@ -308,6 +359,24 @@ object CheckCommand "Invoke-IcingaCheckClusterNetwork" { order = 99 } } + vars.ifw_api_arguments = { + "Verbosity" = { + value = "$IcingaCheckClusterNetwork_Object_Verbosity$" + } + "IncludeClusterInterface" = { + value = "$IcingaCheckClusterNetwork_Array_IncludeClusterInterface$" + } + "ThresholdInterval" = { + value = "$IcingaCheckClusterNetwork_String_ThresholdInterval$" + } + "NoPerfData" = { + value = "$IcingaCheckClusterNetwork_Switch_NoPerfData$" + } + "ExcludeClusterInterface" = { + value = "$IcingaCheckClusterNetwork_Array_ExcludeClusterInterface$" + } + } + vars.ifw_api_command = invoke-icingacheckclusternetwork } diff --git a/config/icinga/Invoke-IcingaCheckClusterHealth.conf b/config/icinga/Invoke-IcingaCheckClusterHealth.conf index 20c8451..bd2f22f 100644 --- a/config/icinga/Invoke-IcingaCheckClusterHealth.conf +++ b/config/icinga/Invoke-IcingaCheckClusterHealth.conf @@ -130,6 +130,33 @@ object CheckCommand "Invoke-IcingaCheckClusterHealth" { order = 3 } } - vars.IcingaCheckClusterHealth_Switchparameter_SkipClusterRessource = false + vars.ifw_api_arguments = { + "CriticalState" = { + value = "$IcingaCheckClusterHealth_Array_CriticalState$" + } + "ThresholdInterval" = { + value = "$IcingaCheckClusterHealth_String_ThresholdInterval$" + } + "WarningState" = { + value = "$IcingaCheckClusterHealth_Array_WarningState$" + } + "SkipClusterRessource" = { + set_if = "$IcingaCheckClusterHealth_Switchparameter_SkipClusterRessource$" + } + "Verbosity" = { + value = "$IcingaCheckClusterHealth_Object_Verbosity$" + } + "Exclude" = { + value = "$IcingaCheckClusterHealth_Array_Exclude$" + } + "NoPerfData" = { + set_if = "$IcingaCheckClusterHealth_Switchparameter_NoPerfData$" + } + "Include" = { + value = "$IcingaCheckClusterHealth_Array_Include$" + } + } + vars.ifw_api_command = invoke-icingacheckclusterhealth vars.IcingaCheckClusterHealth_Switchparameter_NoPerfData = false + vars.IcingaCheckClusterHealth_Switchparameter_SkipClusterRessource = false } diff --git a/config/icinga/Invoke-IcingaCheckClusterNetwork.conf b/config/icinga/Invoke-IcingaCheckClusterNetwork.conf index acb719d..4c3cf40 100644 --- a/config/icinga/Invoke-IcingaCheckClusterNetwork.conf +++ b/config/icinga/Invoke-IcingaCheckClusterNetwork.conf @@ -77,4 +77,22 @@ object CheckCommand "Invoke-IcingaCheckClusterNetwork" { order = 99 } } + vars.ifw_api_arguments = { + "Verbosity" = { + value = "$IcingaCheckClusterNetwork_Object_Verbosity$" + } + "IncludeClusterInterface" = { + value = "$IcingaCheckClusterNetwork_Array_IncludeClusterInterface$" + } + "ThresholdInterval" = { + value = "$IcingaCheckClusterNetwork_String_ThresholdInterval$" + } + "NoPerfData" = { + value = "$IcingaCheckClusterNetwork_Switch_NoPerfData$" + } + "ExcludeClusterInterface" = { + value = "$IcingaCheckClusterNetwork_Array_ExcludeClusterInterface$" + } + } + vars.ifw_api_command = invoke-icingacheckclusternetwork } diff --git a/config/icinga/Invoke-IcingaCheckClusterSharedVolume.conf b/config/icinga/Invoke-IcingaCheckClusterSharedVolume.conf index 0731439..9876bd2 100644 --- a/config/icinga/Invoke-IcingaCheckClusterSharedVolume.conf +++ b/config/icinga/Invoke-IcingaCheckClusterSharedVolume.conf @@ -90,5 +90,29 @@ object CheckCommand "Invoke-IcingaCheckClusterSharedVolume" { order = 2 } } + vars.ifw_api_arguments = { + "NoPerfData" = { + set_if = "$IcingaCheckClusterSharedVolume_Switchparameter_NoPerfData$" + } + "ExcludeVolumes" = { + value = "$IcingaCheckClusterSharedVolume_Array_ExcludeVolumes$" + } + "IncludeVolumes" = { + value = "$IcingaCheckClusterSharedVolume_Array_IncludeVolumes$" + } + "SpaceWarning" = { + value = "$IcingaCheckClusterSharedVolume_Object_SpaceWarning$" + } + "Verbosity" = { + value = "$IcingaCheckClusterSharedVolume_Object_Verbosity$" + } + "ThresholdInterval" = { + value = "$IcingaCheckClusterSharedVolume_String_ThresholdInterval$" + } + "SpaceCritical" = { + value = "$IcingaCheckClusterSharedVolume_Object_SpaceCritical$" + } + } + vars.ifw_api_command = invoke-icingacheckclustersharedvolume vars.IcingaCheckClusterSharedVolume_Switchparameter_NoPerfData = false } diff --git a/doc/10-Icinga-Plugins.md b/doc/10-Icinga-Plugins.md index 31abccd..c2e9d55 100644 --- a/doc/10-Icinga-Plugins.md +++ b/doc/10-Icinga-Plugins.md @@ -29,3 +29,4 @@ icinga> icinga { Invoke-IcingaCheckCPU -Warning 20 -Critical 40 -Core _Total -Th | [Invoke-IcingaCheckClusterHealth](plugins/03-Invoke-IcingaCheckClusterHealth.md) | Checks the state and availability of a Cluster Service | | [Invoke-IcingaCheckClusterNetwork](plugins/01-Invoke-IcingaCheckClusterNetwork.md) | Invoke-IcingaCheckClusterNetwork [[-IncludeClusterInterface] ] [[-ExcludeClusterInterface] ] [[-Verbosity] ] [-NoPerfData] | | [Invoke-IcingaCheckClusterSharedVolume](plugins/02-Invoke-IcingaCheckClusterSharedVolume.md) | Checks the available space on cluster Shared Volumes and additionally the availability and state of the targeted Cluster Shared Volume from each Cluster nodes. | + diff --git a/doc/31-Changelog.md b/doc/31-Changelog.md index d1fdda0..01e741b 100644 --- a/doc/31-Changelog.md +++ b/doc/31-Changelog.md @@ -10,8 +10,14 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic [Issue and PRs](https://github.com/Icinga/icinga-powershell-cluster/milestone/5?closed=1) +### Bugfixes + * [#50](https://github.com/Icinga/icinga-powershell-cluster/pull/50) Fixes unwanted dependency between cluster shared volumes and shared disks +### Enhancements + +* [#51](https://github.com/Icinga/icinga-powershell-cluster/pull/51) Updates configuration for Icinga 2.14 + ## 1.2.0 (2022-08-30) [Issue and PRs](https://github.com/Icinga/icinga-powershell-cluster/milestone/4?closed=1) diff --git a/doc/plugins/02-Invoke-IcingaCheckClusterSharedVolume.md b/doc/plugins/02-Invoke-IcingaCheckClusterSharedVolume.md index 17238d8..0cd161f 100644 --- a/doc/plugins/02-Invoke-IcingaCheckClusterSharedVolume.md +++ b/doc/plugins/02-Invoke-IcingaCheckClusterSharedVolume.md @@ -1,27 +1,26 @@ - # Invoke-IcingaCheckClusterSharedVolume ## Description -Checks the available space on cluster Shared Volumes and additionally the availability +Checks the available space on cluster Shared Volumes and additionally the availability and state of the targeted Cluster Shared Volume from each Cluster nodes. -Checks the available space on cluster Shared Volumes and additionally the availability -and state of the targeted Cluster Shared Volume from each Cluster nodes. This plugin can only -run successfully on a Windows Server 2012 or later version. I.e. if you have Windows Server 2008 or older, +Checks the available space on cluster Shared Volumes and additionally the availability +and state of the targeted Cluster Shared Volume from each Cluster nodes. This plugin can only +run successfully on a Windows Server 2012 or later version. I.e. if you have Windows Server 2008 or older, it will unfortunately not work. ## Permissions To execute this plugin you will require to grant the following user permissions. -### WMI Permissions - -* Root\MSCluster -* Root\Cimv2 - -### Cluster Permissions - +### WMI Permissions + +* Root\MSCluster +* Root\Cimv2 + +### Cluster Permissions + * Full access on cluster ressource ## Arguments @@ -47,37 +46,39 @@ icinga { Invoke-IcingaCheckClusterSharedVolume -Verbosity 2 } ### Example Output 1 ```powershell -[OK] Check package "Network Volumes Package" (Match All) -\_ [OK] Check package "Cluster Resource Package" (Match All) - \_ [OK] Cluster Disk 1 Status: Online - \_ [OK] Storage Qos Resource Status: Online -\_ [OK] Check package "SharedVolume Cluster Disk 2" (Match All) - \_ [OK] Cluster Disk 2 Fault State: NoFaults - \_ [OK] Cluster Disk 2 Used Space: 245GB - \_ [OK] Cluster Disk 2 RedirectedAccess: False - \_ [OK] Cluster Disk 2 State: Online - \_ [OK] Check package "Members" (Match All) - \_ [OK] Check package "SharedVolume Cluster Disk 2 (Node: volume-node1)" (Match All) - \_ [OK] Cluster Disk 2 Block RedirectedIOReason: NotBlockRedirected - \_ [OK] Cluster Disk 2 FileSystem RedirectedIOReason: NotFileSystemRedirected - \_ [OK] Cluster Disk 2 StateInfo: Direct - \_ [OK] Check package "SharedVolume Cluster Disk 2 (Node: volume-node2)" (Match All) - \_ [OK] Cluster Disk 2 Block RedirectedIOReason: NotBlockRedirected - \_ [OK] Cluster Disk 2 FileSystem RedirectedIOReason: NotFileSystemRedirected - \_ [OK] Cluster Disk 2 StateInfo: Direct -\_ [OK] Check package "SharedVolume Cluster Disk 3" (Match All) - \_ [OK] Cluster Disk 3 Fault State: NoFaults - \_ [OK] Cluster Disk 3 Used Space: 245GB - \_ [OK] Cluster Disk 3 RedirectedAccess: False - \_ [OK] Cluster Disk 3 State: Online - \_ [OK] Check package "Members" (Match All) - \_ [OK] Check package "SharedVolume Cluster Disk 3 (Node: volume-node1)" (Match All) - \_ [OK] Cluster Disk 3 Block RedirectedIOReason: NotBlockRedirected - \_ [OK] Cluster Disk 3 FileSystem RedirectedIOReason: NotFileSystemRedirected - \_ [OK] Cluster Disk 3 StateInfo: Direct - \_ [OK] Check package "SharedVolume Cluster Disk 3 (Node: volume-node2)" (Match All) - \_ [OK] Cluster Disk 3 Block RedirectedIOReason: NotBlockRedirected - \_ [OK] Cluster Disk 3 FileSystem RedirectedIOReason: NotFileSystemRedirected - \_ [OK] Cluster Disk 3 StateInfo: Direct +[OK] Check package "Network Volumes Package" (Match All) +\_ [OK] Check package "Cluster Resource Package" (Match All) + \_ [OK] Cluster Disk 1 Status: Online + \_ [OK] Storage Qos Resource Status: Online +\_ [OK] Check package "SharedVolume Cluster Disk 2" (Match All) + \_ [OK] Cluster Disk 2 Fault State: NoFaults + \_ [OK] Cluster Disk 2 Used Space: 245GB + \_ [OK] Cluster Disk 2 RedirectedAccess: False + \_ [OK] Cluster Disk 2 State: Online + \_ [OK] Check package "Members" (Match All) + \_ [OK] Check package "SharedVolume Cluster Disk 2 (Node: volume-node1)" (Match All) + \_ [OK] Cluster Disk 2 Block RedirectedIOReason: NotBlockRedirected + \_ [OK] Cluster Disk 2 FileSystem RedirectedIOReason: NotFileSystemRedirected + \_ [OK] Cluster Disk 2 StateInfo: Direct + \_ [OK] Check package "SharedVolume Cluster Disk 2 (Node: volume-node2)" (Match All) + \_ [OK] Cluster Disk 2 Block RedirectedIOReason: NotBlockRedirected + \_ [OK] Cluster Disk 2 FileSystem RedirectedIOReason: NotFileSystemRedirected + \_ [OK] Cluster Disk 2 StateInfo: Direct +\_ [OK] Check package "SharedVolume Cluster Disk 3" (Match All) + \_ [OK] Cluster Disk 3 Fault State: NoFaults + \_ [OK] Cluster Disk 3 Used Space: 245GB + \_ [OK] Cluster Disk 3 RedirectedAccess: False + \_ [OK] Cluster Disk 3 State: Online + \_ [OK] Check package "Members" (Match All) + \_ [OK] Check package "SharedVolume Cluster Disk 3 (Node: volume-node1)" (Match All) + \_ [OK] Cluster Disk 3 Block RedirectedIOReason: NotBlockRedirected + \_ [OK] Cluster Disk 3 FileSystem RedirectedIOReason: NotFileSystemRedirected + \_ [OK] Cluster Disk 3 StateInfo: Direct + \_ [OK] Check package "SharedVolume Cluster Disk 3 (Node: volume-node2)" (Match All) + \_ [OK] Cluster Disk 3 Block RedirectedIOReason: NotBlockRedirected + \_ [OK] Cluster Disk 3 FileSystem RedirectedIOReason: NotFileSystemRedirected + \_ [OK] Cluster Disk 3 StateInfo: Direct | 'cluster_disk_2_used_space'=245000000000B;;; 'storage_qos_resource_status'=2;3;4 'cluster_disk_1_status'=2;3;4 'cluster_disk_3_used_space'=245000000000B;;; ``` + + diff --git a/doc/plugins/03-Invoke-IcingaCheckClusterHealth.md b/doc/plugins/03-Invoke-IcingaCheckClusterHealth.md index 9ee6f3f..ef86733 100644 --- a/doc/plugins/03-Invoke-IcingaCheckClusterHealth.md +++ b/doc/plugins/03-Invoke-IcingaCheckClusterHealth.md @@ -1,26 +1,25 @@ - # Invoke-IcingaCheckClusterHealth ## Description Checks the state and availability of a Cluster Service -Invoke-IcingaCheckClusterHealth checks generally for the state of the Cluster, i.e. it checks if the Cluster -service is running properly, the state of all Cluster Nodes and all Cluster Resources like "Task scheduler", -"Clustername" etc. If the Cluster Main Server fails, the check is automatically CRITICAL, because then the +Invoke-IcingaCheckClusterHealth checks generally for the state of the Cluster, i.e. it checks if the Cluster +service is running properly, the state of all Cluster Nodes and all Cluster Resources like "Task scheduler", +"Clustername" etc. If the Cluster Main Server fails, the check is automatically CRITICAL, because then the cluster is no longer available and the cluster service is Stopped. ## Permissions To execute this plugin you will require to grant the following user permissions. -### WMI Permissions - -* Root\MSCluster -* Root\Cimv2 - -### Cluster Permissions - +### WMI Permissions + +* Root\MSCluster +* Root\Cimv2 + +### Cluster Permissions + * Read-Only access on cluster ressource ## Arguments @@ -47,19 +46,21 @@ icinga { Invoke-IcingaCheckClusterHealth -Verbosity 2 } ### Example Output 1 ```powershell -[OK] Check package "Cluster Services" (Match All) -\_ [OK] ClusSvc Status: Running -\_ [OK] Check package "Cluster Nodes" (Match All) - \_ [OK] Check package "lcontreras-wind" (Match All) - \_ [OK] #1 State: Up - \_ [OK] #1 Status Information: Normal - \_ [OK] Check package "yhabteab-window" (Match All) - \_ [OK] #2 State: Up - \_ [OK] #2 Status Information: Normal -\_ [OK] Check package "Cluster Resources" (Match All) - \_ [OK] Cluster-IP-Adresse Status: Online - \_ [OK] Clustername Status: Online - \_ [OK] Task Scheduler Status: Online -| 'clussvc_status'=4;;4 'clusteripadresse_status'=2;3;4 'clustername_status'=2;3;4 'task_scheduler_status'=2;3;4 '2_status_information'=0;;2 '2_state'=0;-1;2 '1_state'=0;-1;2 '1_status_information'=0;;2 +[OK] Check package "Cluster Services" (Match All) +\_ [OK] ClusSvc Status: Running +\_ [OK] Check package "Cluster Nodes" (Match All) + \_ [OK] Check package "lcontreras-wind" (Match All) + \_ [OK] #1 State: Up + \_ [OK] #1 Status Information: Normal + \_ [OK] Check package "yhabteab-window" (Match All) + \_ [OK] #2 State: Up + \_ [OK] #2 Status Information: Normal +\_ [OK] Check package "Cluster Resources" (Match All) + \_ [OK] Cluster-IP-Adresse Status: Online + \_ [OK] Clustername Status: Online + \_ [OK] Task Scheduler Status: Online +| 'clussvc_status'=4;;4 'clusteripadresse_status'=2;3;4 'clustername_status'=2;3;4 'task_scheduler_status'=2;3;4 '2_status_information'=0;;2 '2_state'=0;-1;2 '1_state'=0;-1;2 '1_status_information'=0;;2 0 ``` + + diff --git a/icinga-powershell-cluster.psd1 b/icinga-powershell-cluster.psd1 index 318f54a..e102f6e 100644 --- a/icinga-powershell-cluster.psd1 +++ b/icinga-powershell-cluster.psd1 @@ -1,43 +1,43 @@ -@{ - ModuleVersion = '1.3.0' - GUID = 'e224db78-5f9a-43ea-a985-911da9da70c8' - Author = 'Yonas Habteab' - CompanyName = 'Icinga GmbH' - Copyright = '(c) 2020 Icinga GmbH | GPL v2.0' - Description = 'A collection of Cluster plugins for the Icinga Powershell Framework' - PowerShellVersion = '4.0' - RequiredModules = @( - @{ModuleName = 'icinga-powershell-framework'; ModuleVersion = '1.10.0' }, - @{ModuleName = 'icinga-powershell-plugins'; ModuleVersion = '1.10.0' } - ) - NestedModules = @( - '.\compiled\icinga-powershell-cluster.ifw_compilation.psm1' - ) - FunctionsToExport = @( - 'Import-IcingaPowerShellComponentCluster', - 'Invoke-IcingaCheckClusterHealth', - 'Invoke-IcingaCheckClusterNetwork', - 'Invoke-IcingaCheckClusterSharedVolume', - 'Get-IcingaClusterSharedVolumeData' - ) - CmdletsToExport = @( - ) - VariablesToExport = @( - 'ClusterProviderEnums' - ) - PrivateData = @{ - PSData = @{ - Tags = @('icinga', 'icinga2', 'icingawindows', 'cluster', 'hyperv', 'clusterPlugins', 'windowsplugins', 'icingaforwindows') - LicenseUri = 'https://github.com/Icinga/icinga-powershell-cluster/blob/master/LICENSE' - ProjectUri = 'https://github.com/Icinga/icinga-powershell-cluster' - ReleaseNotes = 'https://github.com/Icinga/icinga-powershell-cluster/releases' - }; - Version = 'v1.3.0' - Name = 'Windows Cluster'; - Type = 'plugins'; - Function = ''; - Endpoint = ''; - } - HelpInfoURI = 'https://github.com/Icinga/icinga-powershell-cluster' -} - +@{ + ModuleVersion = '1.3.0' + GUID = 'e224db78-5f9a-43ea-a985-911da9da70c8' + Author = 'Yonas Habteab' + CompanyName = 'Icinga GmbH' + Copyright = '(c) 2020 Icinga GmbH | GPL v2.0' + Description = 'A collection of Cluster plugins for the Icinga Powershell Framework' + PowerShellVersion = '4.0' + RequiredModules = @( + @{ModuleName = 'icinga-powershell-framework'; ModuleVersion = '1.10.0' }, + @{ModuleName = 'icinga-powershell-plugins'; ModuleVersion = '1.10.0' } + ) + NestedModules = @( + '.\compiled\icinga-powershell-cluster.ifw_compilation.psm1' + ) + FunctionsToExport = @( + 'Import-IcingaPowerShellComponentCluster', + 'Invoke-IcingaCheckClusterHealth', + 'Invoke-IcingaCheckClusterNetwork', + 'Invoke-IcingaCheckClusterSharedVolume', + 'Get-IcingaClusterSharedVolumeData' + ) + CmdletsToExport = @( + ) + VariablesToExport = @( + 'ClusterProviderEnums' + ) + PrivateData = @{ + PSData = @{ + Tags = @('icinga', 'icinga2', 'icingawindows', 'cluster', 'hyperv', 'clusterPlugins', 'windowsplugins', 'icingaforwindows') + LicenseUri = 'https://github.com/Icinga/icinga-powershell-cluster/blob/master/LICENSE' + ProjectUri = 'https://github.com/Icinga/icinga-powershell-cluster' + ReleaseNotes = 'https://github.com/Icinga/icinga-powershell-cluster/releases' + }; + Version = 'v1.3.0' + Name = 'Windows Cluster'; + Type = 'plugins'; + Function = ''; + Endpoint = ''; + } + HelpInfoURI = 'https://github.com/Icinga/icinga-powershell-cluster' +} +