New PodeAzureLoggingMethod - mdaneri/Pode GitHub Wiki
external help file: Pode-help.xml Module Name: Pode online version: PodeType: LoggingMethod schema: 2.0.0
Configures logging to Azure Monitor Logs.
New-PodeAzureLoggingMethod -WorkspaceId <String> -AuthorizationHeader <String> [-LogType <String>]
[-FailureAction <String>] [-SkipCertificateCheck] [-AsUTC] [-DefaultTag <String>] [-DataFormat <String>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
New-PodeAzureLoggingMethod -WorkspaceId <String> -AuthorizationHeader <String> [-LogType <String>]
[-FailureAction <String>] [-SkipCertificateCheck] [-AsUTC] [-DefaultTag <String>] [-ISO8601]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
The `New-PodeAzureLoggingMethod` function sets up logging for Azure Monitor Logs, allowing log data to be sent to a specified Azure Log Analytics workspace. It uses the shared key authorization method to authenticate with Azure.
New-PodeAzureLoggingMethod -WorkspaceId '12345' -AuthorizationHeader 'SharedKey 12345:abcdef...' -LogType 'ApplicationLogs'
Sets up Azure Monitor logging with the specified workspace ID and authorization details.
If present, converts timestamps to UTC.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseThe authorization header for Azure, generated using the Workspace ID and shared key.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe custom date format for log entries. Mutually exclusive with ISO8601.
Type: String
Parameter Sets: DataFormat
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSets a default tag for log entries. Defaults to `-`.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: -
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the action to take if the logging request fails. Valid values are `Ignore`, `Report`, and `Halt`. The default is `Ignore`.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: Ignore
Accept pipeline input: False
Accept wildcard characters: FalseIf set, uses the ISO 8601 date format for log entries. Mutually exclusive with DataFormat.
Type: SwitchParameter
Parameter Sets: ISO8601
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseThe custom log type name in Azure Monitor. Defaults to `CustomLog`.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: CustomLog
Accept pipeline input: False
Accept wildcard characters: False{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseIf present, skips SSL certificate validation when sending logs.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseThe Azure Log Analytics Workspace ID.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
This function sends logs to Azure Monitor Logs using the Azure REST API, formatted for ingestion by Azure Log Analytics.