Server Management - Systems Insight Manager
Showing results for 
Search instead for 
Did you mean: 

Custom inventory / reports

Frequent Advisor

Custom inventory / reports

I'm trying to devise a method of running custom inventory reports that will give me results I can plunk into an excel sheet (or better yet have it do so automatically).

I was hoping to leverage some of the command line scripting that HP SIM allows to solve this.

Particularly the ' %r% (rt[.attribute]%) ' parametter looked promissing.

Unfortunately my command line skills arn't what they ought to be, and I'm under a deadline to get this thing rolling.

The pseudo-code level that I can think of would be something like:

echo "'%r% (MgmyProcToServer.a%)'; " >> c:\inventorylist.txt

So I still need to solve or figure out what terms are needed to retrieve the data I need so that I can run this script against. (which is a task and a half in it's self)

I'm hoping it's possible to retrieve the following system attributes using the %r% (rt[.attribute]%) parameter:

-DNS name
-IP address
-iLo address
-System Serial Number
-Product Number (only when available)
-Model Number
-Operating System (Windows Server 2003 r2 sp2, not something like 'build 5.11.12')
-Ram slots
-Size of local Storage
-CPU model
-CPU x64 support
-CPU speed

I know this may not be the easiest or most straightforward request, but I would greatly appreciate any help on the issue.

Occasional Advisor

Re: Custom inventory / reports

Aaron, the best way I have found to a run a customized report is to use the Visual Studio included with Sql 2005 tools and dig the database. If you have around someone with SQL experience you will be able to get some very nice rdl reports in no time. For an example on what you can get go to Query Analyzer in your SQL server, choose you ISM Database and run this:

SELECT deviceNames.nameFullDNS, IPAddress.IPAddress, R_OperatingSystem.Description, R_OperatingSystem.Version, R_Inventory.SerialNumber
FROM deviceNames, IPAddress, R_OperatingSystem, R_Inventory
WHERE deviceNames.DeviceKey = IPAddress.DeviceKey AND deviceNames.DeviceKey = R_OperatingSystem.DeviceKey AND
deviceNames.DeviceKey = R_Inventory.DeviceKey

If you have SQL reporting services some where it will run the report on your behalf. Someone with SQL query experience can qet this done for you in couple hours. Mind that I have HPSIM 5.3 and the tables in the example might be diferent.
Rob Buxton
Honored Contributor

Re: Custom inventory / reports

yep, I agree with the previous poster, and to also help if you run a standard report from HPSIM you can get it to show you the SQL Query it used to get the information.

You can then use this in the script.

You do need to get familiar with a scripting language though. I use perl, but you may want to look at Powershell in a Windows environment.
Frequent Advisor

Re: Custom inventory / reports

Sounds great.

Though for future reference, I am interesting in knowing how to get the %r% (rt[.attribute]%) parameter to work in the command line. No matter how I format it it simply returns that the parameter was unable to expand.
Frequent Advisor

Re: Custom inventory / reports

Your little blurb of an example script worked quite well. (Seems to be repeating each entry for each non-null colum of description, version, and serial number).

I'm using SQL server 2005, and SQL Server management studio express. Just need to make a new query, drop your code in it, execute, then select all & copy to pull the data out.

I would be most grateful for a direction to a resource that'll help me solve this as far as writing a proper SQL query that'll get me the info that I am looking for. And more specific directives on how to discover what attributes with which I should be populating the SQL Query.
Rob Buxton
Honored Contributor

Re: Custom inventory / reports

You can pull the variables from custom commands.
Again I use perl, as part of that you use the "use env;" line.
Then you can use the HPSIM variables which are documented in the HPSIM Technical reference Guide.
You can use those as part of formatting a query which you then send to SQL - you can use something like ISQL to do that.
Frequent Advisor

Re: Custom inventory / reports

I have nearly everything I need, just stuck on a couple tricky parts.

In HP SIM, it will tell you which iLo is associated with which machine. But no where in the reports (or the SQL database) can I find anything similar.

How to determine how many total (filled & unfilled) ram slots are in the computer.

How to determine if the processor supports 64bit processing.

How to have the reports differentiate local storage and the attached SAN drives.

A couple of headscratchers to start off the weekend.