Add-KrHealthProcessProbe
SYNOPSIS
Registers a health probe that executes an external process.
SYNTAX
__AllParameterSets
Add-KrHealthProcessProbe [[-Server] <KestrunHost>] [-Name] <string> [-FilePath] <string>
[[-Arguments] <string>] [[-Tags] <string[]>] [[-Timeout] <timespan>] [-PassThru]
[<CommonParameters>]
ALIASES
This cmdlet has the following aliases, {{Insert list of aliases}}
DESCRIPTION
Creates a Kestrun ProcessProbe that launches the specified command, waits for completion, and interprets the exit code or JSON payload to determine health. Provide tags to support filtering and optionally adjust the timeout enforced on the subprocess.
EXAMPLES
EXAMPLE 1
Add-KrHealthProcessProbe -Name DiskSpace -FilePath ‘pwsh’ -Arguments ‘-File ./Scripts/Check-Disk.ps1’ -Tags ‘infra’ Registers a process probe that runs a PowerShell script to evaluate disk capacity.
PARAMETERS
-Arguments
Command-line arguments passed to the process. Defaults to an empty string.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 3
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-FilePath
The executable or script to launch.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 2
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Name
Unique name for the probe.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 1
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-PassThru
Emits the configured server instance so the call can be chained.
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Server
The Kestrun host instance to configure. If omitted, the current server context is resolved automatically.
Type: Kestrun.Hosting.KestrunHost
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: false
ValueFromPipeline: true
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Tags
Optional set of tags used to include or exclude the probe when requests filter by tag.
Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 4
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Timeout
Optional timeout applied to the process execution. Defaults to 10 seconds.
Type: System.TimeSpan
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 5
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
Kestrun.Hosting.KestrunHost
{{ Fill in the Description }}
OUTPUTS
Kestrun.Hosting.KestrunHost
{{ Fill in the Description }}
NOTES
RELATED LINKS
{{ Fill in the related links here }}