Get-LXCOAlerts
This cmdlet returns a list of alerts or information about a specific alert.
Note
You cannot pipe objects to this cmdlet.
Syntax
Get-LXCOAlerts [-Connection LXCOConnection]
-ID String
[CommonParameters]
Get-LXCOAlerts [-Connection LXCOConnection]
-Excluded
[-Severity String[]]
[-Message String]
[-System String]
[-EventId String]
[-AlertDate String[]]
[CommonParameters]
Get-LXCOAlerts [-Connection LXCOConnection]
[-ActiveAlerts]
[-Serviceability String[]]
[-Severity String[]]
[-Message String]
[-System String]
[-EventId String]
[-AlertDate String[]]
[-ResourceType String[]]
[-SourceType String[]]
[-GroupName String]
[CommonParameters]
Parameters
- -Connection LXCAConnection
- Specifies the connection to the Lenovo XClarity Orchestrator server. If no connection is specified, the result from the last Connect-LXCO cmdlet is used.
- -ID String
- Specifies the ID of the alert to return.
- -Excluded
- When specified, this cmdlet returns a list of all excluded alerts.
- -Severity String[]
- Specifies the severity. This can be one of the following values.
- Informational. Information only. No action is necessary.
- Warning. User can decide if action is needed.
- Critical. Action is needed immediately, and the scope is broad (perhaps an imminent outage to a critical resource will result).
- -Message String
- Specifies the full or partial message text. All alerts that contain the specified pattern are returned..
- -System String
- Specifies the full or partial resource name. All alerts that contain the specified pattern are returned.
- -EventId String
- Specifies the full or partial event code. All alerts that contain the specified pattern are returned.
- -AlertDate String[]
- Specifies the alert dates as range, using the following format: {startDate},{endDate}. The end date is optional. If is not specified, the current date is used by default.
- -ActiveAlerts String
- When specified, this cmdlet returns a list of all active alerts.
- -Serviceability String[]
- Specifies the serviceability. This can be one of the following values.
- None. (default). Not serviceable.
- Serviceable. Serviceable by Lenovo. If Call Home is configured, service ticket is opened with the Lenovo Support Center, and service data is collected and sent for the device, resource manager, and XClarity Orchestrator.
- Unknown. Serviceability is not known
- User. Serviceable by the user
- -ResourceType String[]
- Specifies the resource type. This can be one of the following values.
- Chassis
- Server
- LXCA. XClarity Administrator
- LXCO. XClarity Orchestrator
- Storage
- Switch
- -SourceType String[]
- Specifies the source type. This can be one of the following values.
- Analytics
- Device
- Management
- System
- -GroupName String
- Specifies the full or partial resource-group name. All alerts that contain the specified pattern are returned.
- CommonParameters
- This cmdlet supports the following common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable, -OutBuffer, -PipelineVariable, -OutVariable. For detailed information about each common parameter, see the Microsoft PowerShell Common Parameters webpage.
Results
- Lenovo.XClarityOrchestrator.PowerShell.Data.Alerts.AlertData[]
If -ID is not specified, this cmdlet returns an array of AlertData objects that contains high-level information for each alert.
- Lenovo.XClarityOrchestrator.PowerShell.Data.Alerts.AlertFullData
If the request was accepted by the orchestrator server, this cmdlet returns an AlertFullData object that contains detailed information about a specific alert.
- Lenovo.XClarityOrchestrator.PowerShell.Data.RequestStatusMessage
If an error occurred, this cmdlet returns a RequestStatusMessage object that contains information about the reason of the failure.
Examples
The following example returns information about all alerts
$cred = Get-Credential
Connect-LXCO <span className="ph">-HostUri</span> 192.0.2.0 -Credential $cred -SkipCertificateCheck
$result = Get-LXCOAlerts
$result|Format-List
Disconnect-LXCO
The following example returns information about certain excluded alerts that were raised since January 10, 2022.
Connect-LXCO <span className="ph">-HostUri</span> 192.0.2.0 -Credential $cred -SkipCertificateCheck
$result = Get-LXCOAlerts -Excluded `
-AlertDate '1.10.2022 14:30:00' `
-EventId 2552 `
-Message 25522 `
-Severity Critical `
-System Orchestrator
$result|Format-List
Disconnect-LXCO
The following example returns information about a specific excluded alert.
$cred = Get-Credential
Connect-LXCO <span className="ph">-HostUri</span> 192.0.2.0 -Credential $cred -SkipCertificateCheck
$result = Get-LXCOAlerts -ID 0X806F06080A01FF03
$result
Disconnect-LXCO
Give feedback