Subject: | Perl Cisco::UCS issue? |
Date: | Thu, 13 Jun 2013 11:46:55 +0200 |
To: | "bug-Cisco-UCS [...] rt.cpan.org" <bug-Cisco-UCS [...] rt.cpan.org> |
From: | Fernando Coelho <F.Coelho [...] payvision.com> |
Hi,
I am starting to develop a probe for Nagios using the Cisco::UCS and I have this issue.
See below the error.
Using chassis:
Show quoted text
--- Login ---
--- Cookie ---
1371115985/159c1ec7-1547-46e7-a138-237db76087fd--- Cluster ---
10.202.27.102--- Dn ---
sys----------
---------- 1 ----
---------- 2 ----
Use of uninitialized value $id in hash element at /usr/local/share/perl5/Cisco/UCS.pm line 965.
Warning: <trigMeta> element has non-unique value in 'name' key attribute: at /usr/local/share/perl5/Cisco/UCS.pm line 268.
Warning: <trigMeta> element has non-unique value in 'name' key attribute: at /usr/local/share/perl5/Cisco/UCS.pm line 268.
Chassis 1 serial : FOX1532GPBX
---------- close ucs ----
Using interconnect:
---------- 1 ----
Warning: <trigMeta> element has non-unique value in 'name' key attribute: at /usr/local/share/perl5/Cisco/UCS.pm line 268.
Warning: <trigMeta> element has non-unique value in 'name' key attribute: at /usr/local/share/perl5/Cisco/UCS.pm line 268.
---------- 2 ----
Interconnect Cisco::UCS::Interconnect=HASH(0x254ff70)->id operability is Cisco::UCS::Interconnect=HASH(0x254ff70)->operability
Interconnect Cisco::UCS::Interconnect=HASH(0x254a650)->id operability is Cisco::UCS::Interconnect=HASH(0x254a650)->operability
Platform:
CENTOS 6.4 x64
Perl version is : This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi
Test-Simple-0.98
XML-Simple-2.20
libwww-perl-6.05
sample of the code:
# basic requirements
use strict;
use Getopt::Long;
use File::Basename;
use Pod::Usage;
use Data::Dumper;
use Cisco::UCS;
code for chassis:
# Open UCS Session
my $ucs = new Cisco::UCS (
cluster => $opt_cluster,
port => $port,
proto => $proto,
username => $opt_user,
passwd => $opt_password
);
print ("--- Login ---\n");
$ucs->login();
print ("--- Cookie ---\n");
print $ucs->cookie;
print ("--- Cluster ---\n");
print $ucs->cluster;
print ("--- Dn ---\n");
print $ucs->dn;
print ("----------\n");
print ("---------- 1 ----\n");
map {
print '-'x50,"\n";
print "ID : " . $_->id . "\n";
print "Severity : " . $_->severity . "\n";
print "Description : " . $_->description . "\n";
} grep {
$_->severity !~ /cleared/i;
} $ucs->get_errors;
print ("---------- 2 ----\n");
foreach my $chassis ($ucs->chassis) {
print "Chassis " . $chassis->id . " serial : " . $chassis->serial . "\n"
}
print ("---------- close ucs ----\n");
#close UCS
$ucs->logout();
print ("---------- $states{OK} ----\n");
exit($states{OK});
[cid:image001.jpg@01CE682B.68F4F710]<http://www.payvision.com/payvision-wins-best-cnp-program-outside-the-us-award>
Kind regards,
Fernando Coelho
Mission Critical Engineer
Payvision B.V.
Keizersgracht 668c
1017 ET Amsterdam
The Netherlands
Tel: +31 (0) 20 794 23 00
Mobile: +31 (0) 6 2628 68 41
Fax: +31 (0) 20 794 23 32
Email: f.coelho@payvision.com<mailto:f.coelho@payvision.com>
www.payvision.com<http://www.payvision.com> - Connect and Grow!
blog.payvision.com<http://blog.payvision.com/> - Corporate Blog
Amsterdam | Auckland | Berlin | Hong Kong | London | Macau | Madrid | New York | Paris | Utah | Singapore | Tokyo
Disclaimer:
This e-mail message is intended exclusively for the addressee or addressees. If the e-mail was sent to you by mistake, would you please contact us immediately by e-mail at service@payvision.com<mailto:service@payvision.com>. In that case, we also request that you destroy the e-mail and that you neither use the contents nor disclose them in any manner to third parties, because the message may contain confidential information.
Message body is not shown because it is too large.