rearranged the exiting conditons/reponses/sensors
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7726 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
62464a182d
commit
8f19be2f03
@ -487,15 +487,10 @@ sub config {
|
||||
my $version_string;
|
||||
if ($rsct_ver) {$version_string="RSCT_VER=$rsct_ver"; }
|
||||
|
||||
my $result=`$version_string $::XCATROOT/sbin/rmcmon/mkrmcresources $::XCATROOT/lib/perl/xCAT_monitoring/rmc/resources/sn 2>&1`;
|
||||
if ($?) {
|
||||
my $error= "Error when creating predefined resources on $localhostname:\n$result";
|
||||
reportError($error, $callback);
|
||||
}
|
||||
my $result;
|
||||
if ($isSV) {
|
||||
$result=`$version_string $::XCATROOT/sbin/rmcmon/mkrmcresources $::XCATROOT/lib/perl/xCAT_monitoring/rmc/resources/node 2>&1`;
|
||||
} else {
|
||||
$result=`$version_string $::XCATROOT/sbin/rmcmon/mkrmcresources $::XCATROOT/lib/perl/xCAT_monitoring/rmc/resources/mn 2>&1`;
|
||||
$result=`$version_string $::XCATROOT/sbin/rmcmon/mkrmcresources $::XCATROOT/lib/perl/xCAT_monitoring/rmc/resources/sn 2>&1`; } else {
|
||||
$result=`$version_string $::XCATROOT/sbin/rmcmon/mkrmcresources $::XCATROOT/lib/perl/xCAT_monitoring/rmc/resources/mn 2>&1`;
|
||||
}
|
||||
if ($?) {
|
||||
my $error= "Error when creating predefined resources on $localhostname:\n$result";
|
||||
|
12
xCAT-rmc/resources/mn/IBM.Condition/AIXNodeCoreDump.pm
Normal file
12
xCAT-rmc/resources/mn/IBM.Condition/AIXNodeCoreDump.pm
Normal file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
$RES::Condition{'AIXNodeCoreDump'} = {
|
||||
Name => q(AIXNodeCoreDump),
|
||||
ResourceClass => q(IBM.Sensor),
|
||||
EventExpression => q(String=?"%label = CORE_DUMP%"),
|
||||
EventDescription => q(An event will be generated when a core dump is logged in the AIX Error log of a node in the cluster.),
|
||||
SelectionString => q(Name="ErrorLogSensor"),
|
||||
ManagementScope => q(4),
|
||||
Severity => q(0),
|
||||
};
|
||||
1;
|
12
xCAT-rmc/resources/mn/IBM.Condition/AllServiceableEvents.pm
Normal file
12
xCAT-rmc/resources/mn/IBM.Condition/AllServiceableEvents.pm
Normal file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
$RES::Condition{'AllServiceableEvents'} = {
|
||||
Name => q(AllServiceableEvents),
|
||||
ResourceClass => q(IBM.Sensor),
|
||||
EventExpression => q(String=?"LSSVCEVENTS_ALL%"),
|
||||
EventDescription => q(An event will be generated whenever there is outpout from running sensor related to any serviceable events.),
|
||||
SelectionString => q(Name="CSMServiceableEventSensor"),
|
||||
ManagementScope => q(4),
|
||||
Severity => q(0),
|
||||
};
|
||||
1;
|
12
xCAT-rmc/resources/mn/IBM.Condition/AnyNodeAnyLoggedError.pm
Normal file
12
xCAT-rmc/resources/mn/IBM.Condition/AnyNodeAnyLoggedError.pm
Normal file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
$RES::Condition{'AnyNodeAnyLoggedError'} = {
|
||||
Name => q(AnyNodeAnyLoggedError),
|
||||
ResourceClass => q(IBM.Sensor),
|
||||
EventExpression => q(String != ""),
|
||||
EventDescription => q(An event will be generated when an error is logged to either the AIX Error Log or the Linux Syslog of a node in the cluster.),
|
||||
SelectionString => q(Name="ErrorLogSensor"),
|
||||
ManagementScope => q(4),
|
||||
Severity => q(0),
|
||||
};
|
||||
1;
|
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
$RES::Condition{'AnyNodeFileSystemInodesUsed'} = {
|
||||
Name => q(AnyNodeFileSystemInodesUsed),
|
||||
ResourceClass => q(IBM.FileSystem),
|
||||
EventExpression => q(PercentINodeUsed>90),
|
||||
EventDescription => q(An event will be generated when more than 90 percent of the total inodes in the file system is in use.),
|
||||
RearmExpression => q(PercentINodeUsed<75),
|
||||
RearmDescription => q(A rearm event will be generated when the percentage of the inodes used in the file system falls below 75 percent.),
|
||||
ManagementScope => q(4),
|
||||
Severity => q(2),
|
||||
};
|
||||
1;
|
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
$RES::Condition{'AnyNodeFileSystemSpaceUsed'} = {
|
||||
Name => q(AnyNodeFileSystemSpaceUsed),
|
||||
ResourceClass => q(IBM.FileSystem),
|
||||
EventExpression => q(PercentTotUsed>90),
|
||||
EventDescription => q(An event will be generated when more than 90 percent of the total space of the file system is in use.),
|
||||
RearmExpression => q(PercentTotUsed<75),
|
||||
RearmDescription => q(A rearm event will be generated when the percentage of the space used in the file system falls below 75 percent.),
|
||||
ManagementScope => q(4),
|
||||
Severity => q(2),
|
||||
};
|
||||
1;
|
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
$RES::Condition{'AnyNodeNetworkInterfaceStatus'} = {
|
||||
Name => q(AnyNodeNetworkInterfaceStatus),
|
||||
ResourceClass => q(IBM.NetworkInterface),
|
||||
EventExpression => q(OpState!=1),
|
||||
EventDescription => q(An event will be generated whenever any network interface on the node is not online.),
|
||||
RearmExpression => q(OpState=1),
|
||||
RearmDescription => q(A rearm event will be generated when the network interface on the node becomes online again),
|
||||
ManagementScope => q(4),
|
||||
Severity => q(2),
|
||||
|
||||
};
|
||||
1;
|
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
$RES::Condition{'AnyNodePagingPercentSpaceFree'} = {
|
||||
Name => q(AnyNodePagingPercentSpaceFree),
|
||||
ResourceClass => q(IBM.Host),
|
||||
EventExpression => q(PctTotalPgSpFree<10),
|
||||
EventDescription => q(An event will be generated when the total amount of free paging space falls below 10 percent.),
|
||||
RearmExpression => q(PctTotalPgSpFree>15),
|
||||
RearmDescription => q(A rearm event will be generated when the free paging space increases to 15 percent.),
|
||||
ManagementScope => q(4),
|
||||
Severity => q(2),
|
||||
};
|
||||
1;
|
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
$RES::Condition{'AnyNodeProcessorsIdleTime'} = {
|
||||
Name => q(AnyNodeProcessorsIdleTime),
|
||||
ResourceClass => q(IBM.Host),
|
||||
EventExpression => q(PctTotalTimeIdle>=70),
|
||||
EventDescription => q(An event will be generated when the average time all processors are idle at least 70 percent of the time.),
|
||||
RearmExpression => q(PctTotalTimeIdle<10),
|
||||
RearmDescription => q(A rearm event will be generated when the idle time decreases below 10 percent.),
|
||||
ManagementScope => q(4),
|
||||
Severity => q(0),
|
||||
};
|
||||
1;
|
14
xCAT-rmc/resources/mn/IBM.Condition/AnyNodeTmpSpaceUsed.pm
Normal file
14
xCAT-rmc/resources/mn/IBM.Condition/AnyNodeTmpSpaceUsed.pm
Normal file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
$RES::Condition{'AnyNodeTmpSpaceUsed'} = {
|
||||
Name => q(AnyNodeTmpSpaceUsed),
|
||||
ResourceClass => q(IBM.FileSystem),
|
||||
EventExpression => q(PercentTotUsed>90),
|
||||
EventDescription => q(An event will be generated when more than 90 percent of the total space in the /tmp file system is in use.),
|
||||
RearmExpression => q(PercentTotUsed<75),
|
||||
RearmDescription => q(A rearm event will be generated when the percentage of the space used in the /tmp file system falls below 75 percent.),
|
||||
SelectionString => q(Name="/tmp"),
|
||||
ManagementScope => q(4),
|
||||
Severity => q(2),
|
||||
};
|
||||
1;
|
14
xCAT-rmc/resources/mn/IBM.Condition/AnyNodeVarSpaceUsed.pm
Normal file
14
xCAT-rmc/resources/mn/IBM.Condition/AnyNodeVarSpaceUsed.pm
Normal file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
$RES::Condition{'AnyNodeVarSpaceUsed'} = {
|
||||
Name => q(AnyNodeVarSpaceUsed),
|
||||
ResourceClass => q(IBM.FileSystem),
|
||||
EventExpression => q(PercentTotUsed>90),
|
||||
EventDescription => q(An event will be generated when more than 90 percent of the total space in the /var file system is in use.),
|
||||
RearmExpression => q(PercentTotUsed<75),
|
||||
RearmDescription => q(A rearm event will be generated when the percentage of the space used in the /var file system falls below 75 percent.),
|
||||
SelectionString => q(Name="/var"),
|
||||
ManagementScope => q(4),
|
||||
Severity => q(2),
|
||||
};
|
||||
1;
|
13
xCAT-rmc/resources/mn/IBM.Condition/IBSwitchLog.pm
Normal file
13
xCAT-rmc/resources/mn/IBM.Condition/IBSwitchLog.pm
Normal file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
$RES::Condition{'IBSwitchLog'} = {
|
||||
Name => q(IBSwitchLog),
|
||||
ResourceClass => q(IBM.Sensor),
|
||||
EventExpression => q(String != ""),
|
||||
EventDescription => q(An event will be generated when errors are logged to the Syslog in the local node for IB. The errors are saved in the String attribute in the event. However, if the String attribute in the event starts with XCAT_MONAIXSYSLOG_FILE:filename, then the errors can be found in the file. In this case, it is the responsibility of the response that associates with the condition to remove the temporary file.),
|
||||
SelectionString => q(Name="IBSwitchLogSensor"),
|
||||
Severity => q(0),
|
||||
};
|
||||
|
||||
|
||||
1;
|
11
xCAT-rmc/resources/mn/IBM.Condition/NodeReachability.pm
Normal file
11
xCAT-rmc/resources/mn/IBM.Condition/NodeReachability.pm
Normal file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
$RES::Condition{'NodeReachability'} = {
|
||||
Name => q(NodeReachability),
|
||||
ResourceClass => q(IBM.MngNode),
|
||||
EventExpression => q(Status!=Status@P),
|
||||
EventDescription => q(An event will be generated when a status changes),
|
||||
ManagementScope => q(1),
|
||||
Severity => q(2),
|
||||
};
|
||||
1;
|
@ -0,0 +1,29 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
BEGIN
|
||||
{
|
||||
$::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat';
|
||||
}
|
||||
use lib "$::XCATROOT/lib/perl";
|
||||
use xCAT::Utils;
|
||||
|
||||
if (exists($ENV{RSCT_VER})) {
|
||||
my $rsct_ver=$ENV{RSCT_VER};
|
||||
if (xCAT::Utils->CheckVersion($rsct_ver, "2.3.5.0") < 0) {
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
$RES::Condition{'NodeReachability_Batch'} = {
|
||||
Name => q(NodeReachability_Batch),
|
||||
ResourceClass => q(IBM.MngNode),
|
||||
EventExpression => q(Status!=Status@P),
|
||||
EventDescription => q(An event will be generated when a status changes),
|
||||
ManagementScope => q(1),
|
||||
EventBatchingInterval => q(60),
|
||||
EventBatchingMaxEvents => q(200),
|
||||
Severity => q(2),
|
||||
};
|
||||
|
||||
|
||||
1;
|
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
$RES::EventResponse{'LogEventToxCATDatabase'} = {
|
||||
Name => q(LogEventToxCATDatabase),
|
||||
Locked => q(0),
|
||||
Actions => q({[updatexCAT,{127},{0},{86400},/opt/xcat/sbin/rmcmon/logeventtoxcat,3,0,0,0,{},0]}),
|
||||
};
|
||||
1;
|
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/perl
|
||||
BEGIN
|
||||
{
|
||||
$::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat';
|
||||
}
|
||||
use lib "$::XCATROOT/lib/perl";
|
||||
use xCAT::Utils;
|
||||
|
||||
if (exists($ENV{RSCT_VER})) {
|
||||
my $rsct_ver=$ENV{RSCT_VER};
|
||||
if (xCAT::Utils->CheckVersion($rsct_ver, "2.3.5.0") < 0) { exit 0;}
|
||||
}
|
||||
|
||||
$RES::EventResponse{'LogEventToxCATDatabase_Batch'} = {
|
||||
Name => q(LogEventToxCATDatabase_Batch),
|
||||
Locked => q(0),
|
||||
EventBatching => q(1),
|
||||
Actions => q({[updatexCAT,{127},{0},{86400},/opt/xcat/sbin/rmcmon/logeventtoxcat,3,0,0,0,{},0]}),
|
||||
};
|
||||
1;
|
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/perl
|
||||
BEGIN
|
||||
{
|
||||
$::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat';
|
||||
}
|
||||
use lib "$::XCATROOT/lib/perl";
|
||||
use xCAT::Utils;
|
||||
|
||||
if (exists($ENV{RSCT_VER})) {
|
||||
my $rsct_ver=$ENV{RSCT_VER};
|
||||
if (xCAT::Utils->CheckVersion($rsct_ver, "2.3.5.0") < 0) { exit 0;}
|
||||
}
|
||||
|
||||
$RES::EventResponse{'UpdatexCATNodeStatus_Batch'} = {
|
||||
Name => q(UpdatexCATNodeStatus_Batch),
|
||||
Locked => q(0),
|
||||
EventBatching => q(1),
|
||||
Actions => q({[updatexCAT,{127},{0},{86400},/opt/xcat/sbin/rmcmon/updatexcatnodestatus,3,0,0,0,{},0]}),
|
||||
};
|
||||
1;
|
21
xCAT-rmc/resources/mn/IBM.Sensor/IBSwitchLogSensor.pm
Normal file
21
xCAT-rmc/resources/mn/IBM.Sensor/IBSwitchLogSensor.pm
Normal file
@ -0,0 +1,21 @@
|
||||
#!/usr/bin/perl
|
||||
BEGIN
|
||||
{
|
||||
$::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat';
|
||||
}
|
||||
use lib "$::XCATROOT/lib/perl";
|
||||
|
||||
my $cmd;
|
||||
if ($^O =~ /^linux/i) { $cmd="$::XCATROOT/sbin/rmcmon/monerrorlog";}
|
||||
else {$cmd="$::XCATROOT/sbin/rmcmon/monaixsyslog";}
|
||||
|
||||
$RES::Sensor{'IBSwitchLogSensor'} = {
|
||||
Name => q(IBSwitchLogSensor),
|
||||
Command => "$cmd -p local6.notice -f /var/log/xcat/syslog.fabric.notices",
|
||||
Description => "This sensor monitors the errors logged by IB Switch management software. The String attribute will get updated with the IB related errors happend within the last 60 seconds. If the length of the error messages is too long, the errors will be saved into a temporary file under /var/opt/xcat_aix_syslog. And the String attrubute will be updated with the file name instead. The format is XCAT_MONAIXSYSLOG_FILE:filename.",
|
||||
UserName => q(root),
|
||||
RefreshInterval => q(60),
|
||||
ErrorExitValue => q(1),
|
||||
ControlFlags => q(0),
|
||||
};
|
||||
1;
|
@ -1,12 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
$RES::Condition{'CFMRootModTimeChanged'} = {
|
||||
Name => q(CFMRootModTimeChanged),
|
||||
ResourceClass => q(IBM.Sensor),
|
||||
EventExpression => q(String!=String@P),
|
||||
EventDescription => q(An event will be generated whenever a file under /cfmroot is added or modified.),
|
||||
SelectionString => q(Name="CFMRootModTime"),
|
||||
ManagementScope => q(1),
|
||||
Severity => q(0),
|
||||
};
|
||||
1;
|
@ -1,13 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
BEGIN
|
||||
{
|
||||
$::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat';
|
||||
}
|
||||
|
||||
$RES::Sensor{'CFMRootModTime'} = {
|
||||
Name => q(CFMRootModTime),
|
||||
Command => "$::XCATROOT/sbin/rmcmon/mtime /cfmroot",
|
||||
UserName => q(root),
|
||||
RefreshInterval => q(60),
|
||||
};
|
||||
1;
|
Loading…
Reference in New Issue
Block a user