config/director/Invoke-IcingaCheckProcessCount.json

{"DataList":{"IcingaCheckProcessCount Verbosity":{"list_name":"IcingaCheckProcessCount 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":{"Invoke-IcingaCheckProcessCount":{"fields":[{"datafield_id":2,"is_required":"n","var_filter":null},{"datafield_id":3,"is_required":"n","var_filter":null},{"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}],"object_name":"Invoke-IcingaCheckProcessCount","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; exit 3; }; Exit-IcingaExecutePlugin -Command \u0027Invoke-IcingaCheckProcessCount\u0027 ","order":"0"},"-Verbosity":{"value":"$IcingaCheckProcessCount_Int32_Verbosity$","order":"5"},"-Warning":{"value":"$IcingaCheckProcessCount_Object_Warning$","order":"2"},"-Process":{"value":{"body":"var arr = macro(\"$IcingaCheckProcessCount_Array_Process$\");\r\n if (len(arr) == 0) {\r\n return \"@()\";\r\n }\r\n return 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(\",\");","type":"Function"},"order":"4"},"-Critical":{"value":"$IcingaCheckProcessCount_Object_Critical$","order":"3"},"-NoPerfData":{"set_if":"$IcingaCheckProcessCount_Switchparameter_NoPerfData$","set_if_format":"string","order":"99"}},"imports":["PowerShell Base"],"object_type":"object","vars":{"IcingaCheckProcessCount_Switchparameter_NoPerfData":false}},"PowerShell Base":{"methods_execute":"PluginCheck","object_name":"PowerShell Base","vars":{},"is_string":null,"command":"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe","zone":null,"disabled":false,"fields":[],"arguments":{},"imports":[],"object_type":"object","timeout":"180"}},"Datafield":{"2":{"settings":{"visbility":"visible"},"description":"Used to specify a Warning threshold. In this case an integer value.","caption":"Warning","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"2","varname":"IcingaCheckProcessCount_Object_Warning","format":null},"5":{"settings":{"visbility":"visible"},"description":null,"caption":"NoPerfData","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeBoolean","originalId":"5","varname":"IcingaCheckProcessCount_Switchparameter_NoPerfData","format":null},"4":{"settings":{"visbility":"visible"},"description":"Used to specify an array of processes to count and match against.\ne.g. conhost,wininit","caption":"Process","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"4","varname":"IcingaCheckProcessCount_Array_Process","format":null},"3":{"settings":{"visbility":"visible"},"description":"Used to specify a Critical threshold. In this case an integer value.","caption":"Critical","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"3","varname":"IcingaCheckProcessCount_Object_Critical","format":null},"6":{"settings":{"datalist":"IcingaCheckProcessCount Verbosity","behavior":"strict","data_type":"string"},"description":null,"caption":"Verbosity","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"6","varname":"IcingaCheckProcessCount_Int32_Verbosity","format":null}}}