check_dell_warranty (Visit this link)

rating5 from 1 votes
A plugin to check the status of a Dell systems warranty using snmp, omreport or dmidecode.

check_dell_warranty will use SNMP, omreport, smbios or dmidecode to grab the system serial number, it will then make a query to Dell's website, parse the results, and print out a return.

By default a warning is issued when the warranty will expire in 30 days and critical is issued when it is going to expire in 10 days. These defaults can be changed on the command line.

Use ./check_dell_warranty --help for options.



A number of caveats:
This was tested on Python 2.4 and above, python 2.3 does not have the subprocess module that is needed, though you can still use the plugin if you specify the service tag using -s.

If you do not have OpenManage installed smbios will be used if not that than dmidecode will be used. Dmidecode needs to be of a newer version, for RedHat environments that means having at least RHEL 5, otherwise dmidecode does not support the 'system-serial-number' option. Smbios requires the plugin to be executed with root privileges dmidecode requires sudo privileges.

Outgoing HTTP connections will have to be enabled for the plugin to work.

omreport or dmidecode has to be in the $PATH.

Let me know if you run into any issues, or have any suggestions: erinn.looneytriggs@gmail.com

From ./check_dell_warranty.py -h:

Usage: check_dell_warranty [options]

Nagios plug-in to pull the  Dell service tag and check it against Dell's web
site to see how many  days remain. By default it issues a warning when there
is less than  thirty days remaining and critical when there is less than ten
days  remaining. These values can be adjusted using the command line, see
--help.

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -C COMMUNITY_STRING, --community=COMMUNITY_STRING
                        SNMP Community String to use. (Default: public)
  -c <ARG>, --critical=<ARG>
                        Number of days under which to return critical
                        (Default: 10)
  -H HOSTNAME, --hostname=HOSTNAME
                        Specify hostname for SNMP
  --mtk                 Get SNMP Community String from /etc/mtk.conf if mtk-
                        nagios plugin is installed. NOTE: This option will
                        make the mtk.conf community string take precedence
                        over anything entered at the command line (Default:
                        False)
  -s <ARG>, --serial-number=<ARG>
                        Dell Service Tag of system, to enter more than one use
                        multiple flags (Default: auto-detected)
  -S, --short           Display short output: only the status, service tag,
                        end date and days left for each warranty.
  -t <ARG>, --timeout=<ARG>
                        Set the timeout for the program to run (Default: 10
                        seconds)
  -w <ARG>, --warning=<ARG>
                        Number of days under which to return a warning
                        (Default: 30)

ChangeLog:

2010-07-19 2.1.2: Patch to again fix Dell's web page changes, thanks
to Jim Browne http://blog.jbrowne.com/ as well as a patch to work against
OM 5.3

2010-04-13 2.1.1: Change to deal with Dell's change to their website
dropping the warranty extension field.

2009-12-17 2.1: Change format back to % to be compatible with python 2.4
and older.

2009-11-16 2.0: Fix formatting issues, change some variable names, fix
a file open exception issue, Dell changed the interface so updated to
work with that, new option --short for short output.

2009-08-07 1.9: Add smbios as a way to get the serial number.
Move away from old string formatting to new string formatting.

2009-08-04 1.8: Improved the parsing of Dell's website, output is now much
more complete (read larger) and includes all warranties. Thresholds are
measured against the warranty with the greatest number of days remaining.
This fixes the bug with doubled or even tripled warranty days being reported.

2009-07-24 1.7: SNMP support, DRAC - Remote Access Controller, CMC -
Chassis Management Contorller and MD/PV Disk Enclosure support.
A huge thanks to Harald Jensas for the code and Trond Amundsen for the
testing and suggestions.

2009-07-09 1.6: Threads!

2009-06-25 1.5: Changed optparse to handle multiple serial numbers. Changed
the rest of the program to be able to handle multiple serial numbers. Added
a de-duper for serial numbers just in case you get two of the same from
the command line or as is the case with Dell blades, two of the same
from omreport. So this ought to handle blades, though I don't have
any to test against.

2009-06-05 1.4 Changed optparse to display %default in help output. Pretty
up the help output with ARG instead of variable names. Add description
to optparse. Will now prefer omreport to dmidecode for systems
that have omreport installed and in $PATH. Note, that you do not have to be
root to run omreport and get the service tag.

2009-05-29 1.3 Display output for all warranties for a system. Add up the
number of days left to give an accurate count of the time remaining. Fix
basic check for Dell's database being down. Fixed regex to be non-greedy
Start and end dates for warranty now takes all warranties into account.
Date output is now yyyy-mm-dd because we don't all live in America ;)

2009-05-28 1.2 Added service tag to output for nagios. Fixed some typos.
Added command-line option for specifying a serial number. This gets
rid of the sudo dependency when you use -s as well as the newer python dependency
allowing it to run on older RHEL distros. Thanks to Justin Ellison for the service tag option.

2009-05-27 Version 1.1: Fixed string conversions to do int comparisons properly.
Remove import csv as I am not using that yet. Add a license to the file.



Future plans (in no order):
Output to file (In a format that is pretty)
Read input(s) from file

Known bugs:

 

Submitted by: erinn
Hits: 2013
Overall downloads: 357
Added: 2009-05-26 00:00:00
Last Modified: 2010-07-20 23:53:18

Filename Preview Size Description DL
check_dell_warranty.py 25 kb check_dell_warranty 2.1.1 170
check_dell_warranty.py 26 kb check_dell_warranty version 2.1.2 11

Comments


Leave a reply

If you just want to rate the project leave the other field empty.
Even though it would be nice if you would drop a line.

Allowed tags: blockquote, strong, a, b, i, u, code

Captcha Reload Image


  • check dell openmanage

    rating5 from 8 votes
    This plugin checks the status of objects monitored by Dell OpenManage via SNMP and returns OK, WARNING, CRITICAL or UNKNOWN. This plugin focuses on low bandwidth and speed. If a failure occurs it will describe the subsystem that failed and the failure code. As featured in Linux Journal issue 182
  • check_openmanage

    rating5 from 9 votes
    check_openmanage checks the hardware health of Dell servers running OpenManage Server Administrator (OMSA). The plugin can be used remotely with SNMP or locally with NRPE, check_by_ssh or similar, whichever suits your needs and particular taste. The plugin checks the health of the storage subsystem, power supplies, memory modules, temperature probes etc., and gives an alert if any of the components are faulty or operate outside normal parameters.
  • Dell OpenManage Nagios Plugin

    rating from 0 votes
    Official Nagios® plugin for Dell® OpenManage(TM) servers to monitor health and individual properties of Dell servers.
  • BMC IPMI Checks

    rating from 0 votes
    This is a check plugin for the Dell BMC IPMI interface. This has been tested and developed with the PowerEdge 2950.
  • check_omsa_snmp

    rating4 from 1 votes
    Remotely check Dell PowerEdge Servers with OMSA installed via SNMP (no omreport involved).
  • Check Dell Megaraid - PercSNMP controller and drives status and errors

    rating from 0 votes
    This is updated and partially rewritten version of John Reuning\'s check_megaraid which in addition to supporting report of status of logical and physical drives now also checks for medium and other errors. Reporting format is also extended.
  • PERC3Di I

    rating from 0 votes
    plugin for checking DELL raid controllers
  • OM Python Plugin

    rating from 0 votes
    Python Plugin to retrieve data from DELL servers Open Manager.
  • check_perc

    rating from 0 votes
    A perl script that uses SNMP to monitor Global State, Logical Disk States, Physical Disk States, and Controller States for either Array Manager or Storage Manager.
  • check_dell_aacraid

    rating from 0 votes
    Nagios plugin for checking the status of a Dell RAID array using \'afacli\'
Catalot 1.3.0 (appkit/v0.9.0-dev, Agavi/1.0.0) | www.netways.de | Legal
© 2009 NETWAYS GmbH. The Program is provided AS IS, without warranty. Licensed under GPLv3.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3.