New-LMUptimeDevice
Syntax
WebInternal (Default)
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>]PingExternal
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>]PingInternal
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>]WebExternal
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>]Description
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
Examples
Example 1
New-LMUptimeDevice -Name "web-int-01" -HostGroupIds 17 -Domain "app.example.com" -TestLocationCollectorIds 12Creates a new internal web uptime check against app.example.com using collector 12.
Example 2
New-LMUptimeDevice -Name "web-ext-01" -HostGroupIds 17 -Domain "app.example.com" -TestLocationSmgIds 2,3,4Creates a new external web uptime check using the specified public locations.
Example 3
New-LMUptimeDevice -Name "ping-int-01" -HostGroupIds 17 -Host "intranet.local" -TestLocationCollectorIds 5Creates an internal ping uptime check that targets intranet.local.
Example 4
New-LMUptimeDevice -Name "ping-ext-01" -HostGroupIds 17 -Host "api.example.net" -TestLocationSmgIds 2,4Creates an external ping uptime check using the provided public locations.
Parameters
-Name
Specifies the device name. Required for every parameter set.
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-HostGroupIds
Specifies one or more device group identifiers to assign to the Uptime device.
Type: String[]Parameter Sets: (All)Aliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Description
Provides an optional description for the device.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-PollingInterval
Sets the polling interval in minutes. Valid values are 1-10, 30, or 60.
Type: Int32Parameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: 5Accept pipeline input: FalseAccept wildcard characters: False-AlertTriggerInterval
Fill AlertTriggerInterval Description
Type: Int32Parameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: 1Accept pipeline input: FalseAccept wildcard characters: False-GlobalSmAlertCond
Defines the global synthetic alert condition threshold.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: AllAccept pipeline input: FalseAccept wildcard characters: False-OverallAlertLevel
Specifies the alert level for overall checks. Valid values are warn, error, or critical.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: WarnAccept pipeline input: FalseAccept wildcard characters: False-IndividualAlertLevel
Specifies the alert level for individual checks. Valid values are warn, error, or critical.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: ErrorAccept pipeline input: FalseAccept wildcard characters: False-IndividualSmAlertEnable
Indicates whether individual synthetic alerts are enabled. Defaults to $true.
Type: BooleanParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: TrueAccept pipeline input: FalseAccept wildcard characters: False-UseDefaultLocationSetting
Indicates whether default location settings should be used. Defaults to $true.
Type: BooleanParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: TrueAccept pipeline input: FalseAccept wildcard characters: False-UseDefaultAlertSetting
Indicates whether default alert settings should be used. Defaults to $true.
Type: BooleanParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: TrueAccept pipeline input: FalseAccept wildcard characters: False-Properties
Provides a hashtable of custom properties for the device. Keys map to property names.
Type: ObjectParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Template
Specifies an optional website template identifier.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Domain
Specifies the domain for web checks. Required for web parameter sets.
Type: StringParameter Sets: WebInternal, WebExternalAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-FolderPath
Specifies the folder path to use for web checks. Defaults to empty string.
Type: StringParameter Sets: WebInternal, WebExternalAliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-StatusCode
Specifies the expected status code for web checks. Defaults to 200.
Type: StringParameter Sets: WebInternal, WebExternalAliases:
Required: FalsePosition: NamedDefault value: 200Accept pipeline input: FalseAccept wildcard characters: False-Keyword
Specifies the keyword to match for web checks. Defaults to empty string.
Type: StringParameter Sets: WebInternal, WebExternalAliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Schema
Defines the HTTP schema (http or https) for web checks. Defaults to https.
Type: StringParameter Sets: WebInternal, WebExternalAliases:
Required: FalsePosition: NamedDefault value: HttpsAccept pipeline input: FalseAccept wildcard characters: False-IgnoreSSL
Indicates whether SSL warnings should be ignored for web checks. Defaults to $true.
Type: BooleanParameter Sets: WebInternal, WebExternalAliases:
Required: FalsePosition: NamedDefault value: TrueAccept pipeline input: FalseAccept wildcard characters: False-PageLoadAlertTimeInMS
Specifies the page load alert threshold in milliseconds for web checks.
Type: Int32Parameter Sets: WebInternal, WebExternalAliases:
Required: FalsePosition: NamedDefault value: 30000Accept pipeline input: FalseAccept wildcard characters: False-AlertExpr
Specifies the SSL alert expression for web checks.
Type: StringParameter Sets: WebInternal, WebExternalAliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-TriggerSSLStatusAlert
Indicates whether SSL status alerts are enabled for web checks.
Type: BooleanParameter Sets: WebInternal, WebExternalAliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False-TriggerSSLExpirationAlert
Indicates whether SSL expiration alerts are enabled for web checks.
Type: BooleanParameter Sets: WebInternal, WebExternalAliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False-Steps
Provides the scripted step definitions for web checks. Defaults to a single GET script step when omitted.
Type: Hashtable[]Parameter Sets: WebInternal, WebExternalAliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Hostname
Fill Hostname Description
Type: StringParameter Sets: PingExternal, PingInternalAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Count
Specifies ping attempts per collection for ping checks. Valid values: 5, 10, 15, 20, 30, 60.
Type: Int32Parameter Sets: PingExternal, PingInternalAliases:
Required: FalsePosition: NamedDefault value: 5Accept pipeline input: FalseAccept wildcard characters: False-PercentPktsNotReceiveInTime
Defines the packet loss percentage threshold for ping checks.
Type: Int32Parameter Sets: PingExternal, PingInternalAliases:
Required: FalsePosition: NamedDefault value: 80Accept pipeline input: FalseAccept wildcard characters: False-TimeoutInMSPktsNotReceive
Defines the packet response timeout threshold in milliseconds for ping checks.
Type: Int32Parameter Sets: PingExternal, PingInternalAliases:
Required: FalsePosition: NamedDefault value: 500Accept pipeline input: FalseAccept wildcard characters: False-TestLocationCollectorIds
Specifies collector identifiers for internal checks. Required for internal parameter sets.
Type: Int32[]Parameter Sets: WebInternal, PingInternalAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-TestLocationSmgIds
Specifies synthetic monitoring group identifiers for external checks.
Type: Int32[]Parameter Sets: PingExternal, WebExternalAliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-TestLocationAll
Indicates that all public locations should be used for external checks.
Type: SwitchParameterParameter Sets: PingExternal, WebExternalAliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameterParameter Sets: (All)Aliases: wi
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameterParameter Sets: (All)Aliases: cf
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-ProgressAction
Fill ProgressAction Description
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseCommonParameters
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. This function sends requests to /device/devices with X-Version 3 and returns LogicMonitor.LMUptimeDevice objects.