Skip to content

Set-LMUptimeDevice

Syntax

IdGeneral (Default)

Terminal window
Set-LMUptimeDevice -Id <Int32> [-PropertiesMethod <String>] [-Description <String>] [-HostGroupIds <String[]>]
[-PollingInterval <Int32>] [-AlertTriggerInterval <Int32>] [-GlobalSmAlertCond <String>]
[-OverallAlertLevel <String>] [-IndividualAlertLevel <String>] [-IndividualSmAlertEnable <Boolean>]
[-UseDefaultLocationSetting <Boolean>] [-UseDefaultAlertSetting <Boolean>] [-Properties <Hashtable>]
[-Template <String>] [-TestLocationCollectorIds <Int32[]>] [-TestLocationSmgIds <Int32[]>] [-TestLocationAll]
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

IdPing

Terminal window
Set-LMUptimeDevice -Id <Int32> [-PropertiesMethod <String>] [-Description <String>] [-HostGroupIds <String[]>]
[-PollingInterval <Int32>] [-AlertTriggerInterval <Int32>] [-GlobalSmAlertCond <String>]
[-OverallAlertLevel <String>] [-IndividualAlertLevel <String>] [-IndividualSmAlertEnable <Boolean>]
[-UseDefaultLocationSetting <Boolean>] [-UseDefaultAlertSetting <Boolean>] [-Properties <Hashtable>]
[-Template <String>] [-Hostname <String>] [-Count <Int32>] [-PercentPktsNotReceiveInTime <Int32>]
[-TimeoutInMSPktsNotReceive <Int32>] [-TestLocationCollectorIds <Int32[]>] [-TestLocationSmgIds <Int32[]>]
[-TestLocationAll] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

IdWeb

Terminal window
Set-LMUptimeDevice -Id <Int32> [-PropertiesMethod <String>] [-Description <String>] [-HostGroupIds <String[]>]
[-PollingInterval <Int32>] [-AlertTriggerInterval <Int32>] [-GlobalSmAlertCond <String>]
[-OverallAlertLevel <String>] [-IndividualAlertLevel <String>] [-IndividualSmAlertEnable <Boolean>]
[-UseDefaultLocationSetting <Boolean>] [-UseDefaultAlertSetting <Boolean>] [-Properties <Hashtable>]
[-Template <String>] [-Domain <String>] [-Schema <String>] [-IgnoreSSL <Boolean>]
[-PageLoadAlertTimeInMS <Int32>] [-AlertExpr <String>] [-TriggerSSLStatusAlert <Boolean>]
[-TriggerSSLExpirationAlert <Boolean>] [-Steps <Hashtable[]>] [-TestLocationCollectorIds <Int32[]>]
[-TestLocationSmgIds <Int32[]>] [-TestLocationAll] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm]
[<CommonParameters>]

NamePing

Terminal window
Set-LMUptimeDevice -Name <String> [-PropertiesMethod <String>] [-Description <String>]
[-HostGroupIds <String[]>] [-PollingInterval <Int32>] [-AlertTriggerInterval <Int32>]
[-GlobalSmAlertCond <String>] [-OverallAlertLevel <String>] [-IndividualAlertLevel <String>]
[-IndividualSmAlertEnable <Boolean>] [-UseDefaultLocationSetting <Boolean>]
[-UseDefaultAlertSetting <Boolean>] [-Properties <Hashtable>] [-Template <String>] [-Hostname <String>]
[-Count <Int32>] [-PercentPktsNotReceiveInTime <Int32>] [-TimeoutInMSPktsNotReceive <Int32>]
[-TestLocationCollectorIds <Int32[]>] [-TestLocationSmgIds <Int32[]>] [-TestLocationAll]
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

NameWeb

Terminal window
Set-LMUptimeDevice -Name <String> [-PropertiesMethod <String>] [-Description <String>]
[-HostGroupIds <String[]>] [-PollingInterval <Int32>] [-AlertTriggerInterval <Int32>]
[-GlobalSmAlertCond <String>] [-OverallAlertLevel <String>] [-IndividualAlertLevel <String>]
[-IndividualSmAlertEnable <Boolean>] [-UseDefaultLocationSetting <Boolean>]
[-UseDefaultAlertSetting <Boolean>] [-Properties <Hashtable>] [-Template <String>] [-Domain <String>]
[-Schema <String>] [-IgnoreSSL <Boolean>] [-PageLoadAlertTimeInMS <Int32>] [-AlertExpr <String>]
[-TriggerSSLStatusAlert <Boolean>] [-TriggerSSLExpirationAlert <Boolean>] [-Steps <Hashtable[]>]
[-TestLocationCollectorIds <Int32[]>] [-TestLocationSmgIds <Int32[]>] [-TestLocationAll]
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

NameGeneral

Terminal window
Set-LMUptimeDevice -Name <String> [-PropertiesMethod <String>] [-Description <String>]
[-HostGroupIds <String[]>] [-PollingInterval <Int32>] [-AlertTriggerInterval <Int32>]
[-GlobalSmAlertCond <String>] [-OverallAlertLevel <String>] [-IndividualAlertLevel <String>]
[-IndividualSmAlertEnable <Boolean>] [-UseDefaultLocationSetting <Boolean>]
[-UseDefaultAlertSetting <Boolean>] [-Properties <Hashtable>] [-Template <String>]
[-TestLocationCollectorIds <Int32[]>] [-TestLocationSmgIds <Int32[]>] [-TestLocationAll]
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

The Set-LMUptimeDevice cmdlet updates internal or external Uptime monitors (web or ping) by submitting a PATCH request to the LogicMonitor v3 device endpoint. It resolves the device ID from name when necessary, validates location combinations, and constructs the appropriate payload structure before issuing the request.

Examples

Example 1

Terminal window
Set-LMUptimeDevice -Id 123 -PollingInterval 10 -Transition 2

Updates the polling interval and transition threshold for the uptime device with ID 123.

Example 2

Terminal window
Set-LMUptimeDevice -Name "web-ext-01" -TestLocationSmgIds 2,4,6 -TriggerSSLStatusAlert $true

Resolves the ID from the device name and updates external web check locations and SSL alerts.

Parameters

-Id

Specifies the device identifier to update. Accepts pipeline input by property name.

Type: Int32
Parameter Sets: IdGeneral, IdPing, IdWeb
Aliases:
Required: True
Position: Named
Default value: 0
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Name

Specifies the device name to update. The cmdlet resolves the corresponding ID prior to issuing the request.

Type: String
Parameter Sets: NamePing, NameWeb, NameGeneral
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PropertiesMethod

Determines how custom properties are applied when supplied. Valid values are Add, Replace, or Refresh.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: Replace
Accept pipeline input: False
Accept wildcard characters: False

-Description

Updates the description of the Uptime device.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostGroupIds

Sets the group identifiers assigned to the Uptime device.

Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PollingInterval

Configures the polling interval in minutes.

Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AlertTriggerInterval

Specifies the number of consecutive failures before alerting.

Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GlobalSmAlertCond

Sets the synthetic monitoring global alert condition (all, half, moreThanOne, any).

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OverallAlertLevel

Configures the overall alert level (warn, error, critical).

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IndividualAlertLevel

Configures the individual alert level (warn, error, critical).

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IndividualSmAlertEnable

Enables or disables individual synthetic alerts.

Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseDefaultLocationSetting

Controls whether default location settings are used for the Uptime device.

Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseDefaultAlertSetting

Controls whether default alert settings are used for the Uptime device.

Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Properties

Hashtable of custom properties to apply to the Uptime device.

Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Template

Specifies an optional template identifier.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Domain

Updates the domain for web checks.

Type: String
Parameter Sets: IdWeb, NameWeb
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Schema

Defines the HTTP schema (http or https) for web checks.

Type: String
Parameter Sets: IdWeb, NameWeb
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IgnoreSSL

Enables or disables SSL certificate validation warnings.

Type: Boolean
Parameter Sets: IdWeb, NameWeb
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PageLoadAlertTimeInMS

Sets the page load alert threshold for web checks.

Type: Int32
Parameter Sets: IdWeb, NameWeb
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AlertExpr

Configures the SSL alert expression for web checks.

Type: String
Parameter Sets: IdWeb, NameWeb
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TriggerSSLStatusAlert

Enables or disables SSL status alerts.

Type: Boolean
Parameter Sets: IdWeb, NameWeb
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TriggerSSLExpirationAlert

Enables or disables SSL expiration alerts.

Type: Boolean
Parameter Sets: IdWeb, NameWeb
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Steps

Provides an array of step definitions for web checks.

Type: Hashtable[]
Parameter Sets: IdWeb, NameWeb
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Hostname

Updates the hostname/IP for ping checks.

Type: String
Parameter Sets: IdPing, NamePing
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Count

Sets the number of ping attempts per polling cycle.

Type: Int32
Parameter Sets: IdPing, NamePing
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PercentPktsNotReceiveInTime

Defines the allowed packet loss percentage before alerting.

Type: Int32
Parameter Sets: IdPing, NamePing
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TimeoutInMSPktsNotReceive

Defines the timeout threshold in milliseconds for ping checks.

Type: Int32
Parameter Sets: IdPing, NamePing
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TestLocationCollectorIds

Specifies collector identifiers for internal checks.

Type: Int32[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TestLocationSmgIds

Specifies synthetic monitoring group identifiers for external checks.

Type: Int32[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TestLocationAll

Indicates that all public locations should be used for external checks.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
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

-ProgressAction

Fill ProgressAction Description

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
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

LogicMonitor.LMUptimeDevice

Notes

You must run Connect-LMAccount before invoking this cmdlet.