config/director/Invoke-IcingaCheckCertificate.json

{"DataList":{"IcingaCheckCertificate Verbosity":{"list_name":"IcingaCheckCertificate 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"},"IcingaCheckCertificate CertStore":{"list_name":"IcingaCheckCertificate CertStore","originalId":"2","entries":[{"allowed_roles":null,"entry_value":"*","entry_name":"*","format":"string"},{"allowed_roles":null,"entry_value":"LocalMachine","entry_name":"LocalMachine","format":"string"},{"allowed_roles":null,"entry_value":"CurrentUser","entry_name":"CurrentUser","format":"string"}],"owner":"stein"}},"Command":{"Invoke-IcingaCheckCertificate":{"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},{"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},{"datafield_id":12,"is_required":"n","var_filter":null},{"datafield_id":13,"is_required":"n","var_filter":null}],"object_name":"Invoke-IcingaCheckCertificate","arguments":{"-CertStorePath":{"value":"$IcingaCheckCertificate_Object_CertStorePath$","order":"8"},"-CriticalEnd":{"value":"$IcingaCheckCertificate_Object_CriticalEnd$","order":"4"},"-Verbosity":{"value":"$IcingaCheckCertificate_Int32_Verbosity$","order":"11"},"-CertSubject":{"value":{"body":"var arr = macro(\"$IcingaCheckCertificate_Array_CertSubject$\");\r\nif (len(arr) == 0) {\r\nreturn \"@()\";\r\n}\r\nreturn arr.join(\",\");","type":"Function"},"order":"7"},"-WarningEnd":{"value":"$IcingaCheckCertificate_Object_WarningEnd$","order":"3"},"-CriticalStart":{"value":"$IcingaCheckCertificate_Object_CriticalStart$","order":"2"},"-C":{"value":"try { Use-Icinga; } 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-IcingaPluginNotInstalled \u0027Invoke-IcingaCheckCertificate\u0027; exit Invoke-IcingaCheckCertificate","order":"0"},"-CertStore":{"value":"$IcingaCheckCertificate_String_CertStore$","order":"5"},"-Trusted":{"set_if":"$IcingaCheckCertificate_Switchparameter_Trusted$","set_if_format":"string","order":"99"},"-CertPaths":{"value":{"body":"var arr = macro(\"$IcingaCheckCertificate_Array_CertPaths$\");\r\nif (len(arr) == 0) {\r\nreturn \"@()\";\r\n}\r\nreturn arr.join(\",\");","type":"Function"},"order":"9"},"-CertThumbprint":{"value":{"body":"var arr = macro(\"$IcingaCheckCertificate_Array_CertThumbprint$\");\r\nif (len(arr) == 0) {\r\nreturn \"@()\";\r\n}\r\nreturn arr.join(\",\");","type":"Function"},"order":"6"},"-Recurse":{"set_if":"$IcingaCheckCertificate_Switchparameter_Recurse$","set_if_format":"string","order":"99"},"-CertName":{"value":{"body":"var arr = macro(\"$IcingaCheckCertificate_Array_CertName$\");\r\nif (len(arr) == 0) {\r\nreturn \"@()\";\r\n}\r\nreturn arr.join(\",\");","type":"Function"},"order":"10"}},"imports":["PowerShell Base"],"object_type":"object","vars":{"IcingaCheckCertificate_Switchparameter_Recurse":false,"IcingaCheckCertificate_Switchparameter_Trusted":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":{"7":{"settings":{"visbility":"visible"},"description":"Used to specify an array of Thumbprints, which are used to determine what certificate to check, within the CertStore.","caption":"CertThumbprint","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"7","varname":"IcingaCheckCertificate_Array_CertThumbprint","format":null},"9":{"settings":{"visbility":"visible"},"description":"Used to specify which path within the CertStore should be checked.","caption":"CertStorePath","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"9","varname":"IcingaCheckCertificate_Object_CertStorePath","format":null},"10":{"settings":{"visbility":"visible"},"description":"Used to specify an array of paths on your system, where certificate files are. Use with CertName.","caption":"CertPaths","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"10","varname":"IcingaCheckCertificate_Array_CertPaths","format":null},"3":{"settings":{"visbility":"visible"},"description":"Used to specify a date. The start date of the certificate has to be past the date specified, otherwise the check results in critical. Use carefully.\nUse format like: \u0027yyyy-MM-dd\u0027","caption":"CriticalStart","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"3","varname":"IcingaCheckCertificate_Object_CriticalStart","format":null},"11":{"settings":{"visbility":"visible"},"description":"Used to specify an array of certificate names of certificate files to check. Use with CertPaths.","caption":"CertName","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"11","varname":"IcingaCheckCertificate_Array_CertName","format":null},"2":{"settings":{"visbility":"visible"},"description":"Used to switch on trusted behavior. Whether to check, If the certificate is trusted by the system root.\nWill return Critical in case of untrust.\n\nNote: it is currently required that the root and intermediate CA is known and trusted by the local system.","caption":"Trusted","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeBoolean","originalId":"2","varname":"IcingaCheckCertificate_Switchparameter_Trusted","format":null},"12":{"settings":{"visbility":"visible"},"description":null,"caption":"Recurse","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeBoolean","originalId":"12","varname":"IcingaCheckCertificate_Switchparameter_Recurse","format":null},"4":{"settings":{"visbility":"visible"},"description":"Used to specify a Warning range for the end date of an certificate. In this case a string.\nAllowed units include: ms, s, m, h, d, w, M, y","caption":"WarningEnd","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"4","varname":"IcingaCheckCertificate_Object_WarningEnd","format":null},"13":{"settings":{"datalist":"IcingaCheckCertificate Verbosity","behavior":"strict","data_type":"string"},"description":"Other","caption":"Verbosity","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"13","varname":"IcingaCheckCertificate_Int32_Verbosity","format":null},"6":{"settings":{"datalist":"IcingaCheckCertificate CertStore","behavior":"strict","data_type":"string"},"description":"Used to specify which CertStore to check. Valid choices are \u0027*\u0027, \u0027LocalMachine\u0027, \u0027CurrentUser\u0027","caption":"CertStore","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeDatalist","originalId":"6","varname":"IcingaCheckCertificate_String_CertStore","format":null},"5":{"settings":{"visbility":"visible"},"description":"Used to specify a Critical range for the end date of an certificate. In this case a string.\nAllowed units include: ms, s, m, h, d, w, M, y","caption":"CriticalEnd","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeString","originalId":"5","varname":"IcingaCheckCertificate_Object_CriticalEnd","format":null},"8":{"settings":{"visbility":"visible"},"description":"Used to specify an array of Subjects, which are used to determine what certificate to check, within the CertStore.","caption":"CertSubject","datatype":"Icinga\\Module\\Director\\DataType\\DataTypeArray","originalId":"8","varname":"IcingaCheckCertificate_Array_CertSubject","format":null}}}