Skip to content

New-LMUptimeDevice

Terminal window
New-LMUptimeDevice -Name <String> -HostGroupIds <String[]> [-Description <String>] [-PollingInterval <Int32>]
[-AlertTriggerInterval <Int32>] [-GlobalSmAlertCond <String>] [-OverallAlertLevel <String>]
[-IndividualAlertLevel <String>] [-IndividualSmAlertEnable <Boolean>] [-UseDefaultLocationSetting <Boolean>]
[-UseDefaultAlertSetting <Boolean>] [-Properties <Object>] [-Template <String>] -Domain <String>
[-FolderPath <String>] [-StatusCode <String>] [-Keyword <String>] [-Schema <String>] [-IgnoreSSL <Boolean>]
[-PageLoadAlertTimeInMS <Int32>] [-AlertExpr <String>] [-TriggerSSLStatusAlert <Boolean>]
[-TriggerSSLExpirationAlert <Boolean>] [-Steps <Hashtable[]>] -TestLocationCollectorIds <Int32[]>
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
Terminal window
New-LMUptimeDevice -Name <String> -HostGroupIds <String[]> [-Description <String>] [-PollingInterval <Int32>]
[-AlertTriggerInterval <Int32>] [-GlobalSmAlertCond <String>] [-OverallAlertLevel <String>]
[-IndividualAlertLevel <String>] [-IndividualSmAlertEnable <Boolean>] [-UseDefaultLocationSetting <Boolean>]
[-UseDefaultAlertSetting <Boolean>] [-Properties <Object>] [-Template <String>] -Hostname <String>
[-Count <Int32>] [-PercentPktsNotReceiveInTime <Int32>] [-TimeoutInMSPktsNotReceive <Int32>]
[-TestLocationSmgIds <Int32[]>] [-TestLocationAll] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm]
[<CommonParameters>]
Terminal window
New-LMUptimeDevice -Name <String> -HostGroupIds <String[]> [-Description <String>] [-PollingInterval <Int32>]
[-AlertTriggerInterval <Int32>] [-GlobalSmAlertCond <String>] [-OverallAlertLevel <String>]
[-IndividualAlertLevel <String>] [-IndividualSmAlertEnable <Boolean>] [-UseDefaultLocationSetting <Boolean>]
[-UseDefaultAlertSetting <Boolean>] [-Properties <Object>] [-Template <String>] -Hostname <String>
[-Count <Int32>] [-PercentPktsNotReceiveInTime <Int32>] [-TimeoutInMSPktsNotReceive <Int32>]
-TestLocationCollectorIds <Int32[]> [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm]
[<CommonParameters>]
Terminal window
New-LMUptimeDevice -Name <String> -HostGroupIds <String[]> [-Description <String>] [-PollingInterval <Int32>]
[-AlertTriggerInterval <Int32>] [-GlobalSmAlertCond <String>] [-OverallAlertLevel <String>]
[-IndividualAlertLevel <String>] [-IndividualSmAlertEnable <Boolean>] [-UseDefaultLocationSetting <Boolean>]
[-UseDefaultAlertSetting <Boolean>] [-Properties <Object>] [-Template <String>] -Domain <String>
[-FolderPath <String>] [-StatusCode <String>] [-Keyword <String>] [-Schema <String>] [-IgnoreSSL <Boolean>]
[-PageLoadAlertTimeInMS <Int32>] [-AlertExpr <String>] [-TriggerSSLStatusAlert <Boolean>]
[-TriggerSSLExpirationAlert <Boolean>] [-Steps <Hashtable[]>] [-TestLocationSmgIds <Int32[]>]
[-TestLocationAll] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

The New-LMUptimeDevice cmdlet provisions an Uptime web or ping monitor (internal or external) through the LogicMonitor v3 device endpoint. It builds the appropriate payload shape, applies validation to enforce supported combinations, and submits the request with the required X-Version header. Supported monitor types include:

  • Internal Web Checks
  • External Web Checks
  • Internal Ping Checks
  • External Ping Checks
Terminal window
New-LMUptimeDevice -Name "web-int-01" -HostGroupIds 17 -Domain "app.example.com" -TestLocationCollectorIds 12

Creates a new internal web uptime check against app.example.com using collector 12.

Terminal window
New-LMUptimeDevice -Name "web-ext-01" -HostGroupIds 17 -Domain "app.example.com" -TestLocationSmgIds 2,3,4

Creates a new external web uptime check using the specified public locations.

Terminal window
New-LMUptimeDevice -Name "ping-int-01" -HostGroupIds 17 -Host "intranet.local" -TestLocationCollectorIds 5

Creates an internal ping uptime check that targets intranet.local.

Terminal window
New-LMUptimeDevice -Name "ping-ext-01" -HostGroupIds 17 -Host "api.example.net" -TestLocationSmgIds 2,4

Creates an external ping uptime check using the provided public locations.

Specifies the device name. Required for every parameter set.

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

Specifies one or more device group identifiers to assign to the Uptime device.

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

Provides an optional description for the device.

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

Sets the polling interval in minutes. Valid values are 1-10, 30 or 60.

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

Specifies the number of consecutive failures required to trigger an alert. Valid values are 1-10, 30, 60. Default is 1.

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

Defines the global synthetic alert condition threshold.

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

Specifies the alert level for overall checks. Valid values are warn, error, or critical.

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

Specifies the alert level for individual checks. Valid values are warn, error, or critical.

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

Indicates whether individual synthetic alerts are enabled. Defaults to $true.

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

Indicates whether default location settings should be used. Defaults to $true.

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

Indicates whether default alert settings should be used. Defaults to $true.

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

Provides a hashtable of custom properties for the device. Keys map to property names.

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

Specifies an optional website template identifier.

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

Specifies the domain for web checks. Required for web parameter sets.

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

Specifies the folder path to use for web checks. Defaults to empty string.

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

Specifies the expected status code for web checks. Defaults to 200.

Type: String
Parameter Sets: WebInternal, WebExternal
Aliases:
Required: False
Position: Named
Default value: 200
Accept pipeline input: False
Accept wildcard characters: False

Specifies the keyword to match for web checks. Defaults to empty string.

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

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

Type: String
Parameter Sets: WebInternal, WebExternal
Aliases:
Required: False
Position: Named
Default value: Https
Accept pipeline input: False
Accept wildcard characters: False

Indicates whether SSL warnings should be ignored for web checks. Defaults to $true.

Type: Boolean
Parameter Sets: WebInternal, WebExternal
Aliases:
Required: False
Position: Named
Default value: True
Accept pipeline input: False
Accept wildcard characters: False

Specifies the page load alert threshold in milliseconds for web checks.

Type: Int32
Parameter Sets: WebInternal, WebExternal
Aliases:
Required: False
Position: Named
Default value: 30000
Accept pipeline input: False
Accept wildcard characters: False

Specifies the SSL alert expression for web checks.

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

Indicates whether SSL status alerts are enabled for web checks.

Type: Boolean
Parameter Sets: WebInternal, WebExternal
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Indicates whether SSL expiration alerts are enabled for web checks.

Type: Boolean
Parameter Sets: WebInternal, WebExternal
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Provides the scripted step definitions for web checks. Defaults to a single GET script step when omitted.

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

Fill Hostname Description

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

Specifies ping attempts per collection for ping checks. Valid values: 5, 10, 15, 20, 30, 50.

Type: Int32
Parameter Sets: PingExternal, PingInternal
Aliases:
Required: False
Position: Named
Default value: 5
Accept pipeline input: False
Accept wildcard characters: False

Defines the packet loss percentage threshold for ping checks.

Type: Int32
Parameter Sets: PingExternal, PingInternal
Aliases:
Required: False
Position: Named
Default value: 80
Accept pipeline input: False
Accept wildcard characters: False

Defines the packet response timeout threshold in milliseconds for ping checks.

Type: Int32
Parameter Sets: PingExternal, PingInternal
Aliases:
Required: False
Position: Named
Default value: 500
Accept pipeline input: False
Accept wildcard characters: False

Specifies collector identifiers for internal checks. Required for internal parameter sets.

Type: Int32[]
Parameter Sets: WebInternal, PingInternal
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Specifies synthetic monitoring group identifiers for external checks.

Type: Int32[]
Parameter Sets: PingExternal, WebExternal
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

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

Type: SwitchParameter
Parameter Sets: PingExternal, WebExternal
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

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

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

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

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

You must run Connect-LMAccount before invoking this cmdlet. This function sends requests to /device/devices with X-Version 3 and returns LogicMonitor.LMUptimeDevice objects.