I'd like to print each individual error from the AIX console log
for instance, there is an error at Wed Jan 16 at 00:44:18
the record finished either at EOF, or when the next error occurs, in
this case, (we have some Firmware problems :) 05:45
will be the record separator.
I don't like to put output to files if I can avoid it so it'll be
alog -o -f /var/adm/ras/conslog | awk '
I've got this bit to work (Korn Shell) counting all the records for
each calendar day, but would like to put something more meaningful in
the alert to Nagios. Yes, I know I don't need to use "set --" but I
just found it so wanted to play.
date_string=$(date +"%a %b %e")
set -- ${date_string}
week_day_name=$1
****ft
day_of_month=$1
****ft
month_name=$1
num_console_records=$(
alog -o -f /var/adm/ras/conslog | \
awk '
BEGIN {num_recs=0}
$1 == "0" && $2 == "'$week_day_name'" && $3 == "'$day_of_month'" && $4
== "'$month_name'" {++num_recs}
END {print num_recs}
'
0 Tue Jan 15 20:37:47 NZDT 2008 Tue Jan 15 20:37:47 NZDT 2008
0 Tue Jan 15 20:37:47 NZDT 2008 Automatic Error Log Analysis
for sysplanar0 has detected a problem.
The Service Request Number is
B150E678: CEC hardware Predictive Error, general. Refer to the
system
service do***entation for more information.
Additional Words: 2-030000F0 3-28DA4810 4-C13920FF
5-400000FF
6-00000007 7-000002BD 8-00000000
9-00000000.
0 Tue Jan 15 20:37:47 NZDT 2008
0 Wed Jan 16 00:44:18 NZDT 2008
0 Wed Jan 16 00:44:18 NZDT 2008 Wed Jan 16 00:44:18 NZDT 2008
0 Wed Jan 16 00:44:18 NZDT 2008 Automatic Error Log Analysis
for sysplanar0 has detected a problem.
The Service Request Number is
B150E67A: CEC hardware Predictive Error, degraded performance. Refer
to the
system service do***entation for more information.
Additional Words: 2-030000F0 3-28DA4810 4-C13920FF
5-400000FF
6-00000008 7-000003EC 8-00000000
9-00000000.
0 Wed Jan 16 00:44:18 NZDT 2008
0 Wed Jan 16 05:45:34 NZDT 2008
0 Wed Jan 16 05:45:34 NZDT 2008 Wed Jan 16 05:45:34 NZDT 2008
0 Wed Jan 16 05:45:34 NZDT 2008 Automatic Error Log Analysis
for sysplanar0 has detected a problem.
The Service Request Number is
B150E678: CEC hardware Predictive Error, general. Refer to the
system
service do***entation for more information.
Additional Words: 2-030000F0 3-28DA4810 4-C13920FF
5-400000FF
6-00000007 7-000002BD 8-00000000
9-00000000.
0 Wed Jan 16 05:45:34 NZDT 2008
0 Wed Jan 16 07:59:03 NZDT 2008
0 Wed Jan 16 07:59:03 NZDT 2008 Wed Jan 16 07:59:03 NZDT 2008
0 Wed Jan 16 07:59:03 NZDT 2008 Automatic Error Log Analysis
for sysplanar0 has detected a problem.
The Service Request Number is
B150E67A: CEC hardware Predictive Error, degraded performance. Refer
to the
system service do***entation for more information.
Additional Words: 2-030000F0 3-28DA4810 4-C13920FF
5-400000FF
6-00000009 7-000003EC 8-00000000
9-00000000.
0 Wed Jan 16 07:59:03 NZDT 2008


|