So, I spent my day today trying to reduce the amount of manual updating I do to our list of servers, their purchase date and service tags. Almost all of our servers are Dell PowerEdges running OpenManage Server Assistant (OMSA), so they have a handy place to record their purchase data. But, how to populate it?
I could, if it was just a few systems, go to the Warranty Status form, put in the Service Tag and then manually enter the date into the OMSA web interface and update it manually on my [spreadsheet, text doc, wiki page, etc]. But, why do that when you can automate it?
So, I set out to write something portable (VBscript?) that could:
- Get the Service Tag
- Query the Warranty Status page and parse it for the Ship Date
- Populate the “Purchase Date” field with omconfig
So, I did, it’s available on NetFiles. The script has to be run once on each server once OMSA is installed, but that’s it. At least until it gets reinstalled. (And, I am not a VBscript programmer and have never played one on TV, that script comes with no warranties expressed or implied.)
We also run IT Assistant and after an Inventory occurs (or you force it), we can query the SQL database for the ship date and other things with something like:
SELECT [Device].[DeviceName]
,[Device].[DeviceServiceTag]
,[Device].[DeviceSystemModelType]
,[Device].[SystemRevisionNumber]
,[CostOfOwnership].[PurchaseDate]
FROM [ITAssist].[dbo].[CostOfOwnership],[ITAssist].[dbo].[Device]
where [CostOfOwnership].[DeviceId] = [Device].[DeviceId]
order by [CostOfOwnership].[PurchaseDate]
That will give you some easily parsed csv data that you can do whatever you want with.
Sweet. Something else to add to the standard server install process.
(And, thanks to Erinn Looney-Triggs and the check_dell_warranty nagios plugin as a starting inspiration for this.)