- Community Home
- >
- Software
- >
- HPE OneView
- >
- Re: Cannot clear events, Get-HPOVAlert : The req...
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
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
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
тАО01-23-2019 03:42 PM
тАО01-23-2019 03:42 PM
I am trying to remove my cleared events. I have 75000 of them. I continually get this error
PS E:\Install> Get-HPOVAlert -State cleared -Count 10
Get-HPOVAlert : The requested resource '/rest/alerts/7353' could not be found. Provide a valid alert URI.
At line:1 char:1
+ Get-HPOVAlert -State cleared -Count 10
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (URI:String) [Get-HPOVAlert], ResourceNotFoundException
+ FullyQualifiedErrorId : ResourceNotFound,Get-HPOVAlert
PS E:\Install>
I have OneView 4.10.04 installed
POSH HPE.OneView.4.10.1928.2181.PowerShell.Library.exe installed
PS E:\Install> $PSVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
5 1 14409 1018
running on Windows 2012 R2 Standard
Any help on how to remove this corrupted entry or continue on would be appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-24-2019 04:34 AM
тАО01-24-2019 04:34 AM
Re: Cannot clear events, Get-HPOVAlert : The requested resource '/rest/alerts/7353' could not be f
Hello RussF,
Just to have a better understanding of the issue you face, is there an a warning message that you received or you just trying to clear some events for a reason? Furthermore, what is the status (active, locked) of your events?
m_icha
I'm an HPE EmployeeNeed assistance? Contact HPE Support
How to Say Thank You? Just click the KUDOS!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-24-2019 04:44 AM
тАО01-24-2019 04:44 AM
Re: Cannot clear events, Get-HPOVAlert : The requested resource '/rest/alerts/7353' could not be f
I don't have any Windows system. Using curl instead. I also have that alert, but it is automatically cleared by the system. I think yours should be also?
If I retrieve a list of all alerts, I see it in the results:
ALERTS=$(curl --insecure \ --header "content-type: application/json" \ --header "accept: application/json" \ --header "X-API-Version: ${currentVersion}" \ --header "auth: ${sessionID}" \ --request GET ${OneView}/rest/alerts?start=0&count=-1)
(currentVersion is set to 800, sessionID is set to my current session ID, and OneView is set to the URI to my appliance)
In the return, I see the alert. healthCategory is Appliance; alertTypeID is Alerts.DBMaxCapacity. I would think I could retrieve the specific alert with:
ALERTS=$(curl --insecure \ --header "content-type: application/json" \ --header "accept: application/json" \ --header "X-API-Version: ${currentVersion}" \ --header "auth: ${sessionID}" \ --request GET ${OneView}/rest/alerts?start=-&count=3&filter="healthCategory EQ 'Appliance'"&filter="alertTypeID EQ 'Alerts.DBMaxCapacity'")
but it retrieves a whole bunch and not just this type. I have a whole slew of alerts related to a root CA certificate that is invalid in FIPs mode. I'd like to just delete them all and remove that certificate (I have another post opened related to that). I'll keep watching to see if you find a way using the powershell commands to clear. If so, it should point me to the correct REST API command. :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-25-2019 10:05 AM - edited тАО01-25-2019 10:08 AM
тАО01-25-2019 10:05 AM - edited тАО01-25-2019 10:08 AM
Re: Cannot clear events, Get-HPOVAlert : The requested resource '/rest/alerts/7353' could not be f
I ran the same command you did and I received my 10 cleared alerts. My OneView is 4.10.03 (unable to test 4.10.4 yet) and I am using POSH HPE.OneView.4.10.1928.2185.PowerShell.Library.exe.
I suggest upgrading the PowerShell OneView module to the latest. You can also run the below command to see if you get the alerts you want:
Send-HPOVRequest -uri /rest/alerts?start=0'&'count=10'&'sort=created:ascending'&'filter="alertState EQ 'Cleared'"
This is the REST API call. If it returns alerts the issue might be with the command Get-HPOVAlert, but if it fails then it might be the OneView version IMO.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-28-2019 10:44 AM
тАО01-28-2019 10:44 AM
SolutionHi there, I had 75000 alerts that I wanted to clear out. I get an error for what appears to be one specific alert. I found that is I specified a /Start time the day after the event, that I was able to clear the bulk of them. I then used a /end and set it to the day before the alert. So now I have what appears to be one bad alert. I can't seem to look it up or see in the GUI. OneView is working just fine and I had a runaway authentication issue with an iLO (caused by another app) and wanted to clear the 1000's of alerts out of OneView. So I still have the bad alert in OneView, but I do have a work around.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-28-2019 11:21 AM
тАО01-28-2019 11:21 AM
Re: Cannot clear events, Get-HPOVAlert : The requested resource '/rest/alerts/7353' could not be f
Hi the Get-HPOVAlert command fails
PS C:\> Get-HPOVAlert
Get-HPOVAlert : The requested resource '/rest/alerts/7353' could not be found. Provide a valid alert URI.
At line:1 char:1
+ Get-HPOVAlert
+ ~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (URI:String) [Get-HPOVAlert], ResourceNotFoundException
+ FullyQualifiedErrorId : ResourceNotFound,Get-HPOVAlert
The command you gave me did return data
PS C:\> Send-HPOVRequest -uri /rest/alerts?start=0'&'count=10'&'sort=created:ascending'&'filter="alertState EQ 'Cleared'"
type : AlertResourceCollectionV3
uri : /rest/alerts?start=0&count=10&sort=created:ascending&filter=alertState EQ 'Cleared'
category : alerts
eTag :
created : 2019-01-28T19:12:30.420Z
modified : 2019-01-28T19:12:30.420Z
start : 0
count : 10
total : 158
prevPageUri :
nextPageUri : /rest/alerts?start=10&count=10&sort=created:ascending&filter=alertState EQ 'Cleared'
members : {@{type=AlertResourceV3; uri=/rest/alerts/7354; category=alerts; eTag=2018-01-04T20:31:44.604Z;
created=2018-01-04T20:31:41.147Z; modified=2018-01-04T20:31:44.604Z; associatedEventUris=System.Object[]; resourceID=;
assignedToUser=; activityUri=; changeLog=System.Object[]; clearedByUser=System; clearedTime=2018-01-04T20:31:44.604Z;
correctiveAction=Update the OneView trust store with a valid server iLO certificate using the link below. Refresh the server
[...] about 20 lines of data returned but trimmed out
alertSeverityCounts :
Not quite sure what to do with this or if its the magical '/rest/alerts/7353' that i am trying to get rid of.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2020 08:46 PM
тАО01-16-2020 08:46 PM
Re: Cannot clear events, Get-HPOVAlert : The requested resource '/rest/alerts/7353' could not be f
I too stumbled upon this issue with five of the OneVIew servers I manage. After picking the nuggets out of this thread, I cobbled a function together that will allow the user to run through their cleared events in chunks as small as one day, as far back as he/she needs to go, and keep as many or as few cleared alerts as desired.
Function defaults to four years seek-back, one day granularity, and 30 days retained (YMMV on the retention - you might get a day more or less than specified).
function Clear-HPOneViewAlerts {param(# Seek duration (how many days to go back)[Parameter(Mandatory = $False)][Alias('S')][int]$SeekDays = (365 * 4),# Interval to process (smaller blocks process quicker and guarantee more deletions when there are bad alerts)[Parameter(Mandatory = $False)][Alias('I')][int]$Interval = 1,# Max age of cleared events to keep[Parameter(Mandatory = $False)][alias('K')][int]$MaxAge = 30)$S = $SeekDays #How many days to go back$I = $Interval #Interval$K = $MaxAge #How many days to keep$E = $S - $Ifor ($S ; $E -ge $K; $S -= $I) {$E = $S - $I$StartDate = (Get-Date).AddDays(-$S)$SD = "$($StartDate.Year)-$($StartDate.Month)-$($StartDate.Day)"$EndDate = ((Get-Date).AddDays(-$E))$ED = "$($EndDate.Year)-$($EndDate.Month)-$($EndDate.Day)"Write-Host "Processing Alerts: Starting $SD ; Ending $ED"$null = Get-HPOVAlert -AlertState 'Cleared' -Start $SD -End $ED | Remove-HPOVAlert -Force -Confirm:$false}}