Skip to content

Suspend GrafanaAlert

Stephen Valdinger edited this page Apr 8, 2019 · 1 revision

external help file: PSGrafana-help.xml Module Name: PSGrafana online version: schema: 2.0.0

Suspend-GrafanaAlert

SYNOPSIS

Pause a Grafana Alert by Name, ID, or pause ALL alerts in Grafana

SYNTAX

Name (Default)

Suspend-GrafanaAlert [-AlertName <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Id

Suspend-GrafanaAlert [-AlertId <Int32>] [-WhatIf] [-Confirm] [<CommonParameters>]

All

Suspend-GrafanaAlert [-All] [-Credential] <PSCredential> [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

This cmdlet provides a way to pause Grafana alerts via the API

EXAMPLES

EXAMPLE 1

Suspend-GrafanaAlert -AlertId 12

EXAMPLE 2

Suspend-GrafanaAlert -AlertName WebResponseTime

EXAMPLE 3

Suspend-GrafanaAlert -All -Credential _username_

EXAMPLE 4

Suspend-GrafanaAlert -All -Credential (Get-Credential)

PARAMETERS

-AlertId

The ID of the Grafana Alert you wish to pause

Type: Int32
Parameter Sets: Id
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-AlertName

The Name of the Grafana Alert you wish to pause

Type: String
Parameter Sets: Name
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-All

Pause all Grafana Alerts

Type: SwitchParameter
Parameter Sets: All
Aliases:

Required: True
Position: 1
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Credential

The credential to use to pause all Grafana alerts

Type: PSCredential
Parameter Sets: All
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

The -Credential parameter is required when pausing all alerts. This is due to how the API handles the authentication header for that operation

RELATED LINKS

Get-GrafanaAlert

Clone this wiki locally