HP iLO get XML data

10,770

Solution 1

You asked a similar question last month, and I provided instructions on where to go on HP's Web site to get the tools you needed. Here are exact links:

  • You can get CPQLOCFG.EXE (as suggested by sleske) here.
  • You can get HPLOCFG.EXE (a similar tool) here.
  • You can get sample XML files and the Perl locfg.pl utility here.

I suggest also looking over the documentation on HP's Web site (at the link provided by sleske) as there is a wealth of information available.

Solution 2

I know this is old, bur someone addressed your question as if you were trying this from a windows box. In Linux , (NOT WINDOWS...everyone) you can do this without an EXE tool. You need to use Net::ILO perl module. This will enable you to write a script that logs in to your ILO servers and interact with them.

  1. download from http://search.cpan.org/~nlewis/Net-ILO-0.54/ (http://search.cpan.org/CPAN/authors/id/N/NL/NLEWIS/Net-ILO-0.54.tar.gz)
  2. after downloading :

    • tar -zxvf Net-ILO-0.54.tar.gz
    • cd Net-ILO
    • perl Makefile.pl
    • make install

3) after compiled and installed, write a little perl script: (here is one that just prints out the temps:

vim myscript.pl:

#!/usr/bin/perl
# FILE:     /home/myuser/myscript.pl
# CREATED:  07:22:37 07/11/2011
# MODIFIED: 07:46:30 07/11/2011
use Net::ILO

my $ilo = Net::ILO->new(
#address of your system
    address     => '192.168.2.111',
    username    => 'Administrator',
    password    => 'yourpassword',
);

my $temperatures = $ilo->temperatures;

foreach my $sensor (@$temperatures) {

    print "    Name: ", $sensor->{name},     "\n";
    print "Location: ", $sensor->{location}, "\n";
    print "   Value: ", $sensor->{value},    "\n";
    print "    Unit: ", $sensor->{unit},     "\n";
    print " Caution: ", $sensor->{caution},  "\n";
    print "Critical: ", $sensor->{critical}, "\n";
    print "  Status: ", $sensor->{status},   "\n\n";

}
#---------end script

4) run the script - perl myscript.pl

Solution 3

Your question is rather vague. What status data do you want? Please provide some examples.

That said, iLO offers scripting interfaces (via HP's tool CPQLOCFG.EXE, or via Perl). See the HP documentation on iLO for details.

Share:
10,770
Wegged
Author by

Wegged

Sysadmin of a small network ~30pc's 2 servers. I like IT, and i'm doing this as an extra responsability at my job. Keeping IT in the company works great for us :)

Updated on September 17, 2022

Comments

  • Wegged
    Wegged over 1 year

    I have a couple of HP servers with iLO interfaces. do you have any idea of how can i get status data of the server via an XML or something like that ?

    update: i want to be able to get the server temperature via a script running on a linux machine in order to monitor our windows HP iLO servcers.

  • Wegged
    Wegged almost 15 years
    what do i need CPQLOCFG.EXE for ? can't i just fire a perl script from a linux machine ?
  • Wegged
    Wegged almost 15 years
    where on earth can i find CPQLOCFG.EXE ? :-w
  • sleske
    sleske almost 15 years
    CPQLOCFG.EXE is HP's tool for managing iLO. It's available from HP, just googl it. As far as I understand, you do not really need it, you can also access the same functionality (and more) from perl, actually from any language, as the iLO is managed by sending XML files via HTTPS.
  • Peter Jenkins
    Peter Jenkins over 9 years
    These links no longer work :-(