Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/HewlettPackard/POSH-HPEOneView/llms.txt

Use this file to discover all available pages before exploring further.

Synopsis

Retrieve HPE OneView alerts with support for rich filtering options.

Syntax

Get-OVAlert
    [-InputObject <Object>]
    [-Severity <String>]
    [-HealthCategory <AlertHealthCategoryEnum>]
    [-AssignedToUser <String>]
    [-AlertState <String>]
    [-Count <Int>]
    [-TimeSpan <TimeSpan>]
    [-Start <DateTime>]
    [-End <DateTime>]
    [-ApplianceConnection <Object>]
    [<CommonParameters>]

Description

Get-OVAlert queries the HPE OneView alert index and returns matching HPEOneView.Alert objects. Results are sorted by creation date, most recent first. Alerts can be filtered by severity (Critical, Warning, OK, etc.), health category (Logical-Interconnect, Server, Storage, etc.), alert state (Active, Cleared, Locked), the user the alert is assigned to, and a creation time range. You can optionally pipe a supported resource object (server hardware, enclosure, logical enclosure, server profile, interconnect, or logical interconnect) to scope results to that resource.
Calling Get-OVAlert without any filters in a large environment can return thousands of records and take a very long time. Always filter by -AlertState, -Severity, or another parameter when possible.

Parameters

InputObject
Object
A resource object whose alerts you want to retrieve. Accepted resource categories:
  • server-hardware
  • enclosures
  • logical-enclosures
  • server-profiles
  • interconnects
  • logical-interconnects
  • spp (firmware baselines)
Can be provided via the pipeline.
Severity
String
Filter alerts by severity level. Valid values:
  • Unknown
  • OK
  • Disabled
  • Warning
  • Critical
HealthCategory
AlertHealthCategoryEnum
Filter alerts by health category (resource area). Examples include Logical-Interconnect, Server, Storage, Appliance, Network.
AssignedToUser
String
Filter alerts that are assigned to the specified username.
AlertState
String
Filter alerts by their current state. Common values:
  • Active — alert is unresolved
  • Cleared — alert has been acknowledged
  • Locked — alert cannot be cleared by normal means
Alias: -State
Count
Int
Maximum number of alert records to return. Defaults to 0 (all results).
TimeSpan
TimeSpan
Return only alerts created within the specified time span measured back from now. For example, [TimeSpan]::FromHours(24) returns alerts from the last 24 hours.Mutually exclusive with -Start and -End.
Start
DateTime
Return alerts created after this date/time. Use with -End to define a date range.
End
DateTime
Return alerts created before this date/time. Defaults to the current date and time.
ApplianceConnection
Object
Specify one or more appliance connection objects or names. Defaults to the default connection in $ConnectedSessions.

Examples

Get all active critical alerts

Get-OVAlert -AlertState Active -Severity Critical

Get active interconnect alerts and assign them to a user

$alerts = Get-OVAlert -HealthCategory Logical-Interconnect -AlertState Active

foreach ($alert in $alerts)
{
    Set-OVAlert -InputObject $alert -AssignToUser Sally
}

Get alerts for a specific server

$server = Get-OVServer -Name 'Encl1, Bay 1'
Get-OVAlert -InputObject $server -AlertState Active

Get alerts from the last 48 hours

Get-OVAlert -AlertState Active -TimeSpan ([TimeSpan]::FromHours(48))

Get the 10 most recent alerts

Get-OVAlert -Count 10

Get alerts assigned to a specific user

Get-OVAlert -AssignedToUser Sally -AlertState Active

Output

HPEOneView.Alert Each object includes properties such as:
PropertyTypeDescription
descriptionStringHuman-readable description of the alert
severityStringSeverity level (Critical, Warning, OK, etc.)
alertStateStringCurrent state (Active, Cleared, Locked)
healthCategoryStringResource area that generated the alert
assignedToUserStringUsername the alert is assigned to
createdDateTimeWhen the alert was created
modifiedDateTimeWhen the alert was last modified
resourceUriStringURI of the associated resource
uriStringURI of the alert itself