added eventtype column in the eventlog table
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2666 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
aabf2df59d
commit
71b917124f
@ -584,7 +584,7 @@ performance => {
|
||||
},
|
||||
|
||||
eventlog => {
|
||||
cols => [qw(recid eventtime monitor monnode node application component id severity message rawdata comments disable)],
|
||||
cols => [qw(recid eventtime eventtype monitor monnode node application component id severity message rawdata comments disable)],
|
||||
keys => [qw(recid)],
|
||||
types => {
|
||||
recid => 'INTEGER AUTO_INCREMENT',
|
||||
@ -593,7 +593,8 @@ eventlog => {
|
||||
descriptions => {
|
||||
recid => 'The record id.',
|
||||
eventtime => 'The timestamp for the event.',
|
||||
monitor => 'The name of the monitor that monitors this event.', #in RMC, it's the condition name
|
||||
eventtype => 'The type of the event.', # for RMC it's either "Event" or "Rearm event".
|
||||
monitor => 'The name of the monitor that monitors this event.', #for RMC, it's the condition name
|
||||
monnode => 'The node that monitors this event.',
|
||||
node => 'The node where the event occurred.',
|
||||
application => 'The application that reports the event.', #RMC, Ganglia
|
||||
@ -1480,6 +1481,10 @@ push(@{$defspec{group}->{'attrs'}}, @nodeattrs);
|
||||
tabentry => 'eventlog.eventtime',
|
||||
access_tabentry => 'eventlog.recid=attr:recid',
|
||||
},
|
||||
{attr_name => 'eventtype',
|
||||
tabentry => 'eventlog.eventtype',
|
||||
access_tabentry => 'eventlog.recid=attr:recid',
|
||||
},
|
||||
{attr_name => 'monitor',
|
||||
tabentry => 'eventlog.monitor',
|
||||
access_tabentry => 'eventlog.recid=attr:recid',
|
||||
|
@ -2889,6 +2889,25 @@ sub get_image_name {
|
||||
rawdata -- The data that associated with the event.
|
||||
Returns:
|
||||
(ret code, error message)
|
||||
Example:
|
||||
my @a=();
|
||||
my $event={
|
||||
eventtime=>"07-28-2009 23:02:03",
|
||||
node => 'node1',
|
||||
rawdata => 'kjdlkfajlfjdlksaj',
|
||||
};
|
||||
push (@a, $event);
|
||||
|
||||
my $event1={
|
||||
node => 'cu03cp',
|
||||
monnode => 'cu03sv',
|
||||
application => 'RMC',
|
||||
component => 'IBM.Sensor',
|
||||
id => 'AIXErrorLogSensor',
|
||||
severity => 'warning',
|
||||
};
|
||||
push(@a, $event1);
|
||||
xCAT::Utils->logEventsToDatabase(\@a);
|
||||
|
||||
=cut
|
||||
|
||||
@ -2915,7 +2934,8 @@ sub logEventsToDatabase{
|
||||
}
|
||||
$event->{eventtime}=$currtime;
|
||||
}
|
||||
$tab->setAttribs(undef, $event);
|
||||
my @ret=$tab->setAttribs(undef, $event);
|
||||
if (@ret > 1) { return (1, $ret[1]); }
|
||||
}
|
||||
$tab->commit;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user