Dell warranty checking script

Aaron McKinnon mckinnon at caltech.edu
Tue May 26 19:23:29 CDT 2009


All you need to change is the following:

    if int(days_left) <= int(options.critical_days):
        print 'CRITICAL: Warranty start date: %s End date: %s Days left: 
%s' \
        % (start_date, end_date, days_left)
        sys.exit(CRITICAL)
    elif int(days_left) <= int(options.warning_days):
        print 'WARNING: Warranty start date: %s End date: %s Days left: 
%s' \
        % (start_date, end_date, days_left)
        sys.exit(WARNING)
    else:
        print 'OK: Warranty start date: %s End date: %s Days left: %s' \
        % (start_date, end_date, days_left)
        sys.exit(OK)

Just adding the "int" made it go on my RHEL5 systems. The other changes 
are just ones I wanted...

-Aaron

Joshua Daniel Franklin wrote:
> Very nice--a lot like Seth Vidal's script but with dmidecode and
> nagios exit codes:
> http://linux.duke.edu/~skvidal/misc/dell-warranty-query/
>
> You might add ability for a verbose option to also output the service
> tag, system
> type, and maybe more.
>
>
> Somewhat unrelated--but if anyone at Dell is listening, I'd also still
> like a web
> service to query warranty status like this Apple JSON one:
> <https://selfsolve.apple.com/Warranty.do?serialNumber=W844502QPNZ&country=USA&fullCountryName=United%20States>
>
>
>
> On Tue, May 26, 2009 at 10:58 AM, Erinn Looney-Triggs
> <erinn.looneytriggs at gmail.com> wrote:
>   
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> This may or may not be useful to you folks. I have written a nagios
>> plugin in python to grab the system serial number using dmidecode then
>> make a call to Dell's website to check the status of the warranty. It is
>> designed for nagios but you can run it from the command line all the
>> same and get the pertinent info back.
>>
>> Here is a link:
>> http://www.monitoringexchange.org/cgi-bin/page.cgi?g=Detailed%2F3094.html;d=1
>>
>> Please take a look at the caveats listed in the description. If you have
>> any suggestions etc. please feel free to e-mail them to me.
>>
>> - -Erinn
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.9 (GNU/Linux)
>> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
>>
>> iEYEARECAAYFAkocLckACgkQJqsQ+sq8O4Ez8ACgiIjRl2NT+qEkrbG5dQUBEant
>> sCMAn1igujY9rn1Io5d0d6u4KBdmxIZ7
>> =KQUo
>> -----END PGP SIGNATURE-----
>>
>> _______________________________________________
>> Linux-PowerEdge mailing list
>> Linux-PowerEdge at lists.us.dell.com
>> https://lists.us.dell.com/mailman/listinfo/linux-poweredge
>> Please read the FAQ at http://lists.us.dell.com/faq
>>
>>     
>
> _______________________________________________
> Linux-PowerEdge mailing list
> Linux-PowerEdge at lists.us.dell.com
> https://lists.us.dell.com/mailman/listinfo/linux-poweredge
> Please read the FAQ at http://lists.us.dell.com/faq
>
>   



More information about the Linux-PowerEdge mailing list