New-LMUptimeDevice
Syntax
Section titled “Syntax”WebInternal (Default)
Section titled “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
Section titled “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
Section titled “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
Section titled “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
Section titled “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
Section titled “Examples”Example 1
Section titled “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
Section titled “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
Section titled “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
Section titled “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
Section titled “Parameters”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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-AlertTriggerInterval”Specifies the number of consecutive failures required to trigger an alert. Valid values are 1-10, 30, 60. Default is 1.
Type: Int32Parameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: 1Accept pipeline input: FalseAccept wildcard characters: False-GlobalSmAlertCond
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-Template”Specifies an optional website template identifier.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Domain
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-Hostname”Fill Hostname Description
Type: StringParameter Sets: PingExternal, PingInternalAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Count
Section titled “-Count”Specifies ping attempts per collection for ping checks. Valid values: 5, 10, 15, 20, 30, 50.
Type: Int32Parameter Sets: PingExternal, PingInternalAliases:
Required: FalsePosition: NamedDefault value: 5Accept pipeline input: FalseAccept wildcard characters: False-PercentPktsNotReceiveInTime
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-ProgressAction”Fill ProgressAction Description
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseCommonParameters
Section titled “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
Section titled “Inputs”Outputs
Section titled “Outputs”LogicMonitor.LMUptimeDevice
Section titled “LogicMonitor.LMUptimeDevice”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.