- Community Home
- >
- Software
- >
- HPE OneView
- >
- HPOV Script to clear Activity Log files
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
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
04-19-2017 07:03 AM
04-19-2017 07:03 AM
Good day - is there a simple OneView command/script that can be run to clear the Activity Logs? I get the daily message of "logs full" at the 75,000 mark. It is more an annoyance than anything else but if there is a simple command to clear this - I would appreciate any details.
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2017 10:27 AM
04-19-2017 10:27 AM
SolutionAs you stated, the message is annoying and does not prohibit operations from ocurring. If you wish to remove cleared, old alerts faster than what the appliance will do (which is 1000 at a time today), I will be publishing an update to the HPE OneView 3.0 PowerShell library today (3.0.1293.3770) that will include Remove-HPOVAlert Cmdlet that will help in removing alert resources. The command could be used:
Get-HPOVAlert -State Cleared | Remove-HPOVAlert -Confirm:$false
If you have a lot of alerts, the -Confirm:$false parameter will proceed forward with deleting the alert object. Omitting it will cause the Remove-HPOVAlert Cmdlet to prompt you for each alert you wish to delete.
[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
04-19-2017 10:48 AM
04-19-2017 10:48 AM
Re: HPOV Script to clear Activity Log files
Thank you very much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2017 08:49 AM
04-21-2017 08:49 AM
Re: HPOV Script to clear Activity Log files
Thanks for the addition! This works great but I noticed that I have to clear the logs in increments. If I try to do 2000 or more - I receive a JSON error:
Get-HPOVAlert : Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on
the maxJsonLength property.
Parameter name: input
At line:1 char:1
+ Get-HPOVAlert -State Cleared -Count 2000 | Remove-HPOVAlert -Confirm:$false
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-HPOVAlert], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,Get-HPOVAlert
I can - successfully - clear 1500 at a time. So - this works and I appreciate it. Just wanted to share the limitation I saw.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2017 08:53 AM
04-21-2017 08:53 AM
Re: HPOV Script to clear Activity Log files
Hmm... I was not aware of that limitation. Please submit an issue on the project tracker so I can investigate it, and provide a solution.
[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
05-01-2017 08:48 AM
05-01-2017 08:48 AM
Re: HPOV Script to clear Activity Log files
I also had the limitation issue - my number was 1791 at a single time. I was still able to remove all errors except for a couple of dozen in "Error" state. All pertained to Client Certificate Generation.