Free utility Integration

IBM, HP, and Lenovo Support Added To Device42 Warranty Check Script

**2018 UPDATE: Automatic Dell, IBM, HP, and Lenovo warranty check / warranty auto-discovery is now built right into the Device42 UI!**
See the latest Automatic Warranty Discovery Documentation here!

Say goodbye to your “warranty tracking” spreadsheet. No more wondering when your warranties are going to expire, and no more manual look-ups rack by rack, server by server.


Software is great at is handling tasks that can otherwise be monotonous and error prone when tackled manually. Let’s face it: humans tend to make mistakes and forget things, while computers don’t. In the spirit of ensuring you don’t miss a beat in your data center, the Device42’s automated Dell, Lenovo, IBM, and HP Warranty Check has been updated, and now works with more vendors, too! Device42 is committed to making your life easier, and this update ensure the script does just that, automatically pulling warranty data from vendors like Lenovo, IBM and HP and populating discovered contract information into Device42. As long as the device’s model and serial number are present, the warranty check script will do the rest!


Full script details follow.


Supported Models:

  • Dell (previously supported)
  • HP (Hewlett Packard)
  • IBM
  • Lenovo


Other Changes:

  1. Instead of displaying only the last date found, all warranties and services retrieved by the API call are now displayed.
  2. Fewer queries are made; instead of a query for all devices, only queries for a given vendor are made. Virtual machines & other manufactures hardware now skipped.
  3. Limited request offset to 100 devices at a time vs. a full request of all devices.
  4. A brief pause has been inserted between API calls to prevent API rate limit blocking (1 sec. pause/req.).
  5. An error message has been added if the session’s API call returns http code 401 (401 = unauthorized).



  1. In order for the script to successfully retrieve warranty information for a given device, the device’s model and serial must be correctly entered.
  2. Python 2.7 must be installed along with the python library requests. Install using pip or easy_install. Run: $ pip install requests
  3. Device42 Model field must be set to one of the following: “Dell”, “Hewlett Packard”, “IBM” or “Lenovo”. A valid serial number must be set as well.
  4. A Dell API key must be obtained to enable Device42 to retrieve warranty information from Dell. Instructions to obtain a Dell API key are available (Note that this now requires a tech-direct membership & valid login):
  5. An HP API key must be obtained to enable Device42 to retrieve HP warranty information. Instructions to obtain HP API key:



    1. Create working directory. Copy files in Device42’s GitHub warranty_check Repo
    2. Copy warranty.cfg.example to warranty.cfg
    3. Set the required parameters in warranty.cfg [D42 instance info & API keys]:
# set Device42 params
username =
password =
url =


# set api_key as provided by Dell
api_key =
url =


# set api_key as provided by HP for hp warranty check
api_key =
api_secret =
url = 


  1. Run the script! [ $ python ]



Consult the README.MD file for more information.


Grab a .zip of the new script or visit the repo. The updates should result in more efficient data gathering (we send less requests to each API), a greater likelihood of success in gathering warranty data (smarter requests + rate limiting), more complete data (all returned dates), and lastly better feedback if things don’t work as planned (401 unauthorized messages).

Revolutionize your IT - Download a Device42 Free Trial Today

If things aren’t working as you’d expect, and you’ve verified you are meeting all prerequisites, please do let us know. Same goes if any significant performance regressions or other unexpected results we didn’t uncover in our testing are noticed — we really do appreciate the feedback, positive or otherwise! Don’t lose any more sleep over your warrantys; Let Device42 automatically handle your Dell service tag checks and your HP server warranty checks from now on.

Oh, and if you aren’t currently a Device42 user, what are you waiting for!? Download Device42 today!

Share this post

About the author