- Community Home
- >
- Servers and Operating Systems
- >
- HPE Synergy
- >
- HPE Synergy
- >
- OneView - Clearing Alerts via PowerShell based on ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2023 03:54 AM - last edited on 02-09-2023 11:17 AM by support_s
02-09-2023 03:54 AM - last edited on 02-09-2023 11:17 AM by support_s
Hello!
I currently use PowerShell command to clear Locked alerts when necessary, but I need the ability to clear alerts based on the Name/Description of the alert.
Get-OVServer | Get-OVAlert -State Locked | Set-OVAlert -Cleared
The above works, but I need to define the alert based on the name to clear specific alerts.
I tried the below, with no luck.
Get-OVServer | Get-OVAlert -Description "Overall security status of the system is at risk" -State Active | Set-OVAlert -Cleared
Any help would be great! Also, it needs to be PowerShell.
Solved! Go to Solution.
- Tags:
- Synergy system
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2023 10:49 AM
02-09-2023 10:49 AM
SolutionThe only way to accomplish this is with the following 1-liner:
Get-OVServer | Get-OVAlert -State Active | ? description -eq "Overall security status of the system is at risk" | Set-OVAlert -Cleared -Notes "Clearing locked alert from PowerShell by $($ConnectedSessions.Username)"
I am an HPE employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2023 11:15 AM
02-09-2023 11:15 AM
Re: OneView - Clearing Alerts via PowerShell based on Alert "Description"
Thanks Chris! Works well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2023 07:50 PM
02-09-2023 07:50 PM
Re: OneView - Clearing Alerts via PowerShell based on Alert "Description"
Hello @gcj2021,
Awesome!
We are glad to know your concern has been addressed.
Sunitha G
I'm an HPE employee.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2024 08:19 AM - edited 03-25-2024 08:24 AM
03-25-2024 08:19 AM - edited 03-25-2024 08:24 AM
Re: OneView - Clearing Alerts via PowerShell based on Alert "Description"
Any idea why this is not working? I've a few servers with disk errors (false alarms as this now happens on all server with PCIe NVMes after update)
# Get-OVServer | Get-OVAlert -State Active | ? description -like "The status of the PCIe disk at location*"
Severity Resource Created Modified State AssignedToUser Description
-------- -------- ------- -------- ----- -------------- -----------
Warning kdev0112 Sun 17 Mar 2024 10:05:04 Sun 17 Mar 2024 10:05:04 Active The status of the PCIe disk at location Embedded:Port=4A:Box=1:Bay=2 is deg…
Warning kdev0113 Mon 18 Mar 2024 11:21:43 Mon 18 Mar 2024 11:21:43 Active The status of the PCIe disk at location Embedded:Port=4A:Box=1:Bay=2 is deg…
Warning kdev0114 Mon 18 Mar 2024 18:32:35 Mon 18 Mar 2024 18:32:35 Active The status of the PCIe disk at location Embedded:Port=3A:Box=1:Bay=4 is deg…
Not sure what this etag is, pretty new to OV + pwsh.
# Get-OVServer | Get-OVAlert -State Active | ? description -like "The status of the PCIe disk at location*" | Set-OVAlert -Cleared
Set-OVAlert: [Send-OVRequest]: The specified ETag does not match the current ETag of the alert. Specify a valid ETag for the alert.
Note parameter is also not accepted. HPEOneView.850 used.
Get-OVServer -Name kdev0112* | Get-OVAlert -State Active | ? description -like "The status of the PCIe disk at location*" | Set-OVAlert -Cleared -Notes "test"
Set-OVAlert: Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided.
I was able to clear other types like below sucessfully.
# Get-OVServer | Get-OVAlert -State Active | ? description -like "Platform Configuration Register(PCR)*" | Set-OVAlert -Cleared