add code for teal event table event_id mapping, feature #3166402
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9409 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
a73acc645d
commit
c3f6cce890
47
xCAT-rmc/lib/perl/TEAL/event_id.pm
Normal file
47
xCAT-rmc/lib/perl/TEAL/event_id.pm
Normal file
@ -0,0 +1,47 @@
|
||||
# IBM_PROLOG_BEGIN_TAG
|
||||
# This is an automatically generated prolog.
|
||||
#
|
||||
#
|
||||
#
|
||||
# Licensed Materials - Property of IBM
|
||||
#
|
||||
# (C) COPYRIGHT International Business Machines Corp. 2010,2011
|
||||
# All Rights Reserved
|
||||
#
|
||||
# US Government Users Restricted Rights - Use, duplication or
|
||||
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
|
||||
#
|
||||
# IBM_PROLOG_END_TAG
|
||||
package TEAL::event_id;
|
||||
|
||||
# This file contains the schema necessary to support the TEAL eventid
|
||||
|
||||
%tabeventid = (
|
||||
AIXNodeCoreDump => "XR000001",
|
||||
AllServiceableEvents => "XR000002",
|
||||
AnyNodeAnyLoggedError => "XR000003",
|
||||
AnyNodeFileSystemInodesUsed => "XR000004",
|
||||
AnyNodeFileSystemSpaceUsed => "XR000005",
|
||||
AnyNodeNetworkInterfaceStatus => "XR000006",
|
||||
AnyNodePagingPercentSpaceFree => "XR000007",
|
||||
AnyNodeProcessorsIdleTime => "XR000008",
|
||||
AnyNodeRealMemFree => "XR000009",
|
||||
AnyNodeTmpSpaceUsed => "XR000010",
|
||||
AnyNodeVarSpaceUsed => "XR000011",
|
||||
CheckCONSonSN => "XR000012",
|
||||
CheckDHCPonSN => "XR000013",
|
||||
CheckFTPonSN => "XR000014",
|
||||
CheckNAMEDonSN => "XR000015",
|
||||
CheckNFSonSN => "XR000016",
|
||||
CheckNTPonSN => "XR000017",
|
||||
CheckTFTPonSN => "XR000018",
|
||||
CheckxCATonSN => "XR000019",
|
||||
Drawer_not_configured => "XR000020",
|
||||
HFI_down => "XR000021",
|
||||
HFI_not_configured => "XR000022",
|
||||
IBSwitchLog => "XR000023",
|
||||
NodeReachability => "XR000024",
|
||||
VarSpaceUsed => "XR000025"
|
||||
);
|
||||
|
||||
1;
|
@ -16,12 +16,14 @@ use xCAT::Utils;
|
||||
use xCAT::MsgUtils;
|
||||
use IO::File;
|
||||
use TEAL::Semaphore;
|
||||
use TEAL::event_id;
|
||||
|
||||
my $batch=0;
|
||||
if (exists($ENV{ERRM_COND_BATCH})) { $batch=$ENV{ERRM_COND_BATCH}; }
|
||||
my @a=();
|
||||
my $condname=$ENV{ERRM_COND_NAME};
|
||||
my $respname=$ENV{ERRM_ER_NAME};
|
||||
my $eventid = $TEAL::event_id::tabeventid{$condname};
|
||||
|
||||
if (!$batch) { #handle single event
|
||||
my $time=$ENV{ERRM_TIME};
|
||||
@ -29,7 +31,7 @@ if (!$batch) { #handle single event
|
||||
$nodenamelist =~ s/\{(.*)\}/$1/;
|
||||
|
||||
my $event={
|
||||
event_id => "XR000001",
|
||||
event_id => $eventid,
|
||||
time_occurred => convertTime($time),
|
||||
src_comp => $ENV{ERRM_RSRC_CLASS_PNAME},
|
||||
src_loc_type => "A",
|
||||
@ -37,7 +39,7 @@ if (!$batch) { #handle single event
|
||||
rpt_comp => 'IBM.Condition',
|
||||
rpt_loc_type =>"A",
|
||||
rpt_loc => $ENV{ERRM_NODE_NAME} . "##" . $ENV{ERRM_COND_NAME},
|
||||
raw_data_fmt =>"0",
|
||||
raw_data_fmt =>"0",
|
||||
raw_data => $ENV{ERRM_ATTR_PNAME} . "=" . $ENV{ERRM_VALUE},
|
||||
};
|
||||
|
||||
@ -82,7 +84,7 @@ if (!$batch) { #handle single event
|
||||
my $nodenamelist=$content_hash{ERRM_NODE_NAMELIST};
|
||||
$nodenamelist =~ s/\{(.*)\}/$1/;
|
||||
my $event={
|
||||
event_id => "XR000001",
|
||||
event_id => $eventid,
|
||||
time_occurred => convertTime($time),
|
||||
src_comp => $content_hash{ERRM_RSRC_CLASS_PNAME},
|
||||
src_loc_type => "A",
|
||||
@ -90,7 +92,7 @@ if (!$batch) { #handle single event
|
||||
rpt_comp => "IBM.Condition",
|
||||
rpt_loc_type =>"A",
|
||||
rpt_loc => $content_hash{ERRM_NODE_NAME} . "##" . $content_hash{ERRM_COND_NAME},
|
||||
raw_data_fmt =>"0",
|
||||
raw_data_fmt => "0",
|
||||
raw_data => $content_hash{ERRM_ATTR_PNAME} . "=" . $content_hash{ERRM_VALUE},
|
||||
};
|
||||
push(@a, $event);
|
||||
|
Loading…
Reference in New Issue
Block a user