- Community Home
- >
- Software
- >
- HPE OneView
- >
- HPOV Script to clear Activity Log files
-
- Forums
-
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
- HPE Blog, Austria, Germany & Switzerland
- Blog HPE, France
- HPE Blog, Italy
- HPE Blog, Japan
- HPE Blog, Middle East
- HPE Blog, Russia
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
-
Blogs
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Blog, Latin America
- HPE Blog, Middle East
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
-
Information
- Community
- Welcome
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Tips and Tricks
- Resources
- Announcements
- Email us
- Feedback
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Aruba Airheads Community
- Enterprise.nxt
- HPE Dev Community
- Cloud28+ Community
- Marketplace
-
Forums
-
Blogs
-
Information
-
English
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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.
I am an HPE employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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.
I am an HPE employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- 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.
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2021 Hewlett Packard Enterprise Development LP