Batch Query Dell Service Tags

Anyone know of a way to get a bunch of information for a list of service tags, does Dell have a section on their site for this? I would also be open to any Perl / Python libraries or *nix shell scripts.

Right now I mostly want some sort of date for each tag.


Solution 1:

Download the following URL (replacing SVCTAG at the end with the actual service tag) for each tag:

http://support.dell.com/support/topics/global.aspx/support/my_systems_info/details?c=us&l=en&s=gen&ServiceTag=SVCTAG

Parsing the resulting page for the info you're interested in is left as an exercise for the reader :-)

Solution 2:

Add your system in the dell support site, in the section "my Systems". You can handle up to 100 systems.

You have to have an account to Dell site of course.

Unfortunately I don't know about a batch system to do the job, even if you can of course use curl, snoopy or whatever you are familiar with in order to automatically do the login, retrieve the list and parse the results.

Solution 3:

I know this is an old post, but I've spent a decent number of hours on this and thought I'd help anyone else that ran into this. Dell's new site is all javascript and I couldn't figure out how to code against it to query service tag data. After sometime I thought of using their mobile site instead (mobile = no javascript) and that worked for me using perl/LWP to pull data down on each service tag. I'm a perl hacker, so someone else may be able to write this a little more cleanly. The below pulls the original system config. The idea is that the first URL 'get' pulls a cookie with the service tag and the second URL get pulls the data you want about the service tag. You can then parse the "$answer" of the second get for the data you are looking for.

#!/usr/bin/perl

use strict;
use LWP::Simple;
use LWP::UserAgent;

my $inputfile  = $ARGV[0];

my ($url,$response,$answer);

open (DATA, $inputfile) or die "Can't open $inputfile \n";
foreach my $serviceTag (<DATA>)
{
   chomp $serviceTag;
   print "\n$serviceTag";

   ##### Allow Cookies
   my $browser = LWP::UserAgent->new;
   $browser->cookie_jar({});
   $browser->cookie_jar( HTTP::Cookies->new(
      'file' => 'cookies.lwp',  # where to read/write cookies
      'autosave' => 0           # do not save it to disk when done
   ));

   # declare agent as mozilla, not perl LWP
   $browser->agent("Mozilla/8.0");

   my $urlPartA = "http://m.dell.com/mt/www.dell.com/support/troubleshooting/us/en/19/Servicetag/";
   my $urlPartB = "?s=BIZ&un_jtt_redirect";
   my $firstURL = join('', $urlPartA,$serviceTag,$urlPartB);
   #print "\nURL = $firstURL";


   $url = URI->new("$firstURL");
   $response = $browser->get( $url );
   $answer = $response->content;
   #print "\nAnswer:\n$answer\n\n";

   $url = URI->new('http://m.dell.com/mt/www.dell.com/support/troubleshooting/us/en/555/TroubleShooting?name=TroubleShooting_SystemConfigurationTab');
   $response = $browser->get( $url );
   $answer = $response->content;
   #print "\nAnswer:\n$answer\n\n";
}