- Community Home
- >
- Software
- >
- HPE OneView
- >
- OneView Custom Report
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
тАО05-07-2018 11:46 AM
тАО05-07-2018 11:46 AM
Is there a way (PowerShell, etc) to run a script to get more information from OneView?
Our manager is looking for a report that will give the basic inventory of what we have in OV, along with physical inventory (specifically CPU and RAM) as well as CPU usage over a specific time-frame (weekly/monthly).
Any input is appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2018 03:50 PM
тАО05-07-2018 03:50 PM
SolutionHey Chris_L1
This has actually been a topic of interest for me as well recently. My management sometimes requests some reports from me, and though I try to steer them to the built in reports from OneView and the OneView Global Dashboard, they dont always like that and just want a .csv to filter through.
Now I havent really jumped into utilization, but I know that depending on what version OneView you are running and what version of the powershell library you have there is a show-hpovutilization cmdlet. You can apply the same principles as what I have done below to that most likely to build out your own reports.
I will disclaimer this with:
-this is all just fiddling around, and there are most likely 'cleaner' ways of pulling some of this information, I am just using this as an excuse to get a little better with my own powershell skills. I would love to hear if someone else can piggy back on some of the stuff I am doing and make it better!
Additional, I am running 3 instances of OneView 3.10.08 and I run these reports using the Powershell Library release Vers. 3.10.1588.1229
@ChrisLynch if I absolutely butcher something in here, just pretend like you didnt see it, I dont want you to think I just dump your awesome Powershell modules into a garbage disposal lol.
To begin, I have created a local read-only account on my OneView instances, lets call it 'ovreporting' and lets say it has a password of 'PASSWORD'. Lets also say my OneView appliances are named 'ovapp01' 'ovapp02' and 'ovapp03'
To begin I start my script by building out some variables I am going to use throughout. The formatting might get garbled in here, so apologies if this looks nasty
----------------------------------
$appliances = @('ovapp01','ovapp02','ovapp03')
$reportUsername = 'ovreporting'
$reportPassword = 'PASSWORD'
$filePath = "\\UNC_PATH\Scheduled_Reports\OneView_Reports\"
$date = Get-Date
$fileDate = "_" + $Date.Year + "-" + $Date.Month + "-" + $Date.Day
$reportName = @{
serverInventory = "Server_Inventory";
}
$exportPath = @{
serverInventory = $filePath + "Server_Inventory\" + $reportName.serverInventory + $fileDate + ".csv";
}
----------------------------------
I have several other reports that run in this manner, so you can follow that format within the $reportName and $exportPath variable depending on what info you are retreiving.
Note that you can also use the Global variable for appliance connection, I just wasnt aware of it when I initially started writing this script, and I just havent made it back around to correct, i just use the $appliances variable when i need to refer to 'all'
Then I loop through and connect to all of my appliances below
----------------------------------
ForEach ($appliance in $appliances)
{
Connect-HPOVMgmt -Hostname $appliance -AuthLoginDomain Local -UserName $reportUsername -Password $reportPassword
}
----------------------------------
From here I have jumped into a specific cmdlet 'Get-HPOVServer' and I pulled out only the information my Management wanted in a specific report. Again, I steer them to the built in reports as often as possible, but I still have to provide what is requested of me. I clean up the column headers just a touch and then just dump it to a .csv in the filepath we defined earlier.
----------------------------------
Get-HPOVServer -ApplianceConnection $appliances |
Select-Object -Property @{Name="Name"; Expression={$_.name}},
@{Name="Server Name"; Expression={$_.serverName}},
@{Name="Serial Number"; Expression={$_.serialNumber}},
@{Name="Asset Tag"; Expression={$_.assetTag}},
@{Name="Status"; Expression={$_.status}},
@{Name="Profile State"; Expression={$_.state}},
@{Name="Power State"; Expression={$_.powerState}},
@{Name="Intelligent Provisioning Version"; Expression={$_.intelligentProvisioningVersion}},
@{Name="License Type"; Expression={$_.licensingIntent}},
@{Name="Model"; Expression={$_.model}},
@{Name="Form Factor"; Expression={$_.formFactor}},
@{Name="Part Number"; Expression={$_.partNumber}},
@{Name="RAM Count - GB"; Expression={$_.memoryMb / 1024}},
@{Name="Processor Model"; Expression={$_.processorType}},
@{Name="Processor Speed MHz"; Expression={$_.processorSpeedMhz}},
@{Name="Processor Socket Count"; Expression={$_.processorCount}},
@{Name="Processor Core Count"; Expression={$_.processorCoreCount}},
@{Name="iLO Version"; Expression={$_.mpModel}},
@{Name="iLO Firmware Version"; Expression={$_.mpFirmwareVersion}},
@{Name="iLO Hostname"; Expression={$_.mpHostInfo.mpHostName}},
@{Name="iLO IP"; Expression={$_.mpHostInfo.mpIpAddresses | Select-Object -ExpandProperty address}},
@{Name="ROM Version"; Expression={$_.romVersion}},
@{Name="Source OneView Appliance"; Expression={$_.applianceConnection.name}} |
Export-Csv -NoTypeInformation -Path $exportPath.serverInventory
----------------------------------
Once that is done I just loop through a disconnect and there you have a quick and easy report from the Powershell modules.
----------------------------------
ForEach ($appliance in $appliances)
{
Disconnect-HPOVMgmt -Hostname $appliance
}
----------------------------------
I have used this method to build out several reports. There are several ways of pulling out what you need from a cmdlet to set up a different report. I personally prefer to pipe the results of a 'get-something' or 'show-something' cmdlet to 'format-custom' and then out-file so that I can open it up in notepad++ and have it as reference while I build out what I want from the report. You can also pipe to a 'Get-Member', or even a 'Select-Object *' to find out what all is returned.
I have a handy one I use to tell me which of my Servers have a broken registration to IRS
----------------------------------
Get-HPOVServer -ApplianceConnection $appliances |
Select-Object -Property @{Name="Name"; Expression={$_.name}},
@{Name="Serial Number"; Expression={$_.serialNumber}},
@{Name="Model"; Expression={$_.model}},
@{Name="IRS Status"; Expression={$_.remoteSupportSettings.remoteSupportCurrentState}},
@{Name="Registered Via"; Expression={$_.remoteSupportSettings.destination}} |
Export-Csv -NoTypeInformation -Path $exportPath.insightRemoteSupportStatus
----------------------------------
Hopefully that makes sense or gives you some guidance. Let me know if you have a question about my wall of text above, hopefully I will be able to answer it!
-Cottoc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-09-2018 07:11 AM
тАО05-09-2018 07:11 AM
Re: OneView Custom Report
Perfect outline to what I was looking for.
Thanks for the help - it is greatly appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-09-2018 10:41 AM
тАО05-09-2018 10:41 AM
Re: OneView Custom Report
Going to have to open new string - now requesting more information including:
CPU Utilization, Power Utilization, Temperature - on an hourly basis to span a full month.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-14-2018 02:51 AM
тАО09-14-2018 02:51 AM
Re: OneView Custom Report
HI Chris_L1 ,
I am a newbie in scripting. like you, i want to add more report to oneview (v4.10). I would like to make a script or report that is able to retrieve Memory/CPU performance in a week for in specific period,
Can you intruct me steps to create that.
Thank you a lot
Regards
Tien
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-14-2018 03:35 AM
тАО09-14-2018 03:35 AM
Re: OneView Custom Report
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-21-2018 07:49 AM
тАО11-21-2018 07:49 AM
Re: OneView Custom Report
this is a great post and learned me to get serverproperties. However I am looking for temperature values for each server. Any Idea how to get them via Powershell?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2020 01:41 PM
тАО11-17-2020 01:41 PM
Re: OneView Custom Report
hi I find some like your script.
1. Question. its posible get 3 months Cpu utilization information , or the quanty off the months could depends of the storage in the appliance? Oneview only have realtime information about power, cpu, power right.
Thks for your time and your experience.