trouble with check_logfiles plugin
Posted: Sun Jan 19, 2014 6:46 pm
Hi Team,
I am facing issue with newly installed nagios plugin check_logfiles v3.5.3.2
installation went fine but I am not able to use that for searching scsi errors, I want to get alerts for following pattern in logs-
Jan 1 02:00:03 abcd123 scsi: [ID 107833 kern.warning] WARNING: /scsi_vhci/disk@g60060e800547a200000047a2000005fb (sd24):
Jan 1 02:00:03 abcd123 Error for Command: read(10) Error Level: Retryable
Jan 1 02:00:03 abcd123 scsi: [ID 107833 kern.notice] Requested Block: 20954674 Error Block: 20954674
Jan 1 02:00:03 abcd123 scsi: [ID 107833 kern.notice] Vendor: HITACHI Serial Number: 50 047A205FB
Jan 1 02:00:03 abcd123 scsi: [ID 107833 kern.notice] Sense Key: Unit_Attention
Jan 1 02:00:03 abcd123 scsi: [ID 107833 kern.notice] ASC: 0x2a (parameters changed), ASCQ: 0x0, FRU: 0x0
Jan 1 02:00:03 abcd123 scsi: [ID 107833 kern.warning] WARNING: /scsi_vhci/disk@g60060e800547a200000047a20000028c (sd61):
Jan 1 02:00:03 abcd123 Error for Command: write(10) Error Level: Retryable
Jan 1 02:00:03 abcd123 scsi: [ID 107833 kern.notice] Requested Block: 562 Error Block: 562
Jan 1 02:00:03 abcd123 scsi: [ID 107833 kern.notice] Vendor: HITACHI Serial Number: 50 047A2028C
Jan 1 02:00:03 abcd123 scsi: [ID 107833 kern.notice] Sense Key: Unit_Attention
Jan 1 02:00:03 abcd123 scsi: [ID 107833 kern.notice] ASC: 0x2a (parameters changed), ASCQ: 0x0, FRU: 0x0
Jan 1 02:00:03 abcd123 scsi: [ID 107833 kern.warning] WARNING: /scsi_vhci/disk@g60060e800547a200000047a200000274 (sd70):
Jan 1 02:00:03 abcd123 Error for Command: write(10) Error Level: Retryable
above errors are scattered over files messages, messages.0, messages.1 ........ and below is the config file I am passing to that plugin-
% check_logfiles -V
check_logfiles v3.5.3.2
% cat config
$seekfilesdir = '~/nagios4/var/tmp';
# where the state information will be saved.
$protocolsdir = '~/nagios4/var/tmp';
# where protocols with found patterns will be stored.
$scriptpath = '~/nagios4/var/tmp';
# where scripts will be searched for.
#$MACROS = { CL_DISK01 => "/dev/dsk/c0d1", CL_DISK02 => "/dev/dsk/c0d2" };
@searches = (
{
tag => 'scsi',
logfile => '/tmp/abcd123/messages',
rotation => 'messagesmessages0messages1messages2',
# criticalpatterns => '*scsi_vhci*:*kern.warning*',
criticalpatterns => [
'scsi_vhci*',
'kern.warning'
]
# warningpatterns => '"scsi_vhci":*kern.warning*',
# criticalexceptions => '/dev/testdisk',
# options => 'noprotocol'
}
);
but not able to get any single warning when I run this-
% ./check_logfiles -f config
OK - no errors or warnings|scsi_lines=0 scsi_warnings=0 scsi_criticals=0 scsi_unknowns=0
I played with criticalpatterns and warningpatterns to give different options like * or " but not able to get any warning/critical messages, please help me getting this plug in working
I am facing issue with newly installed nagios plugin check_logfiles v3.5.3.2
installation went fine but I am not able to use that for searching scsi errors, I want to get alerts for following pattern in logs-
Jan 1 02:00:03 abcd123 scsi: [ID 107833 kern.warning] WARNING: /scsi_vhci/disk@g60060e800547a200000047a2000005fb (sd24):
Jan 1 02:00:03 abcd123 Error for Command: read(10) Error Level: Retryable
Jan 1 02:00:03 abcd123 scsi: [ID 107833 kern.notice] Requested Block: 20954674 Error Block: 20954674
Jan 1 02:00:03 abcd123 scsi: [ID 107833 kern.notice] Vendor: HITACHI Serial Number: 50 047A205FB
Jan 1 02:00:03 abcd123 scsi: [ID 107833 kern.notice] Sense Key: Unit_Attention
Jan 1 02:00:03 abcd123 scsi: [ID 107833 kern.notice] ASC: 0x2a (parameters changed), ASCQ: 0x0, FRU: 0x0
Jan 1 02:00:03 abcd123 scsi: [ID 107833 kern.warning] WARNING: /scsi_vhci/disk@g60060e800547a200000047a20000028c (sd61):
Jan 1 02:00:03 abcd123 Error for Command: write(10) Error Level: Retryable
Jan 1 02:00:03 abcd123 scsi: [ID 107833 kern.notice] Requested Block: 562 Error Block: 562
Jan 1 02:00:03 abcd123 scsi: [ID 107833 kern.notice] Vendor: HITACHI Serial Number: 50 047A2028C
Jan 1 02:00:03 abcd123 scsi: [ID 107833 kern.notice] Sense Key: Unit_Attention
Jan 1 02:00:03 abcd123 scsi: [ID 107833 kern.notice] ASC: 0x2a (parameters changed), ASCQ: 0x0, FRU: 0x0
Jan 1 02:00:03 abcd123 scsi: [ID 107833 kern.warning] WARNING: /scsi_vhci/disk@g60060e800547a200000047a200000274 (sd70):
Jan 1 02:00:03 abcd123 Error for Command: write(10) Error Level: Retryable
above errors are scattered over files messages, messages.0, messages.1 ........ and below is the config file I am passing to that plugin-
% check_logfiles -V
check_logfiles v3.5.3.2
% cat config
$seekfilesdir = '~/nagios4/var/tmp';
# where the state information will be saved.
$protocolsdir = '~/nagios4/var/tmp';
# where protocols with found patterns will be stored.
$scriptpath = '~/nagios4/var/tmp';
# where scripts will be searched for.
#$MACROS = { CL_DISK01 => "/dev/dsk/c0d1", CL_DISK02 => "/dev/dsk/c0d2" };
@searches = (
{
tag => 'scsi',
logfile => '/tmp/abcd123/messages',
rotation => 'messagesmessages0messages1messages2',
# criticalpatterns => '*scsi_vhci*:*kern.warning*',
criticalpatterns => [
'scsi_vhci*',
'kern.warning'
]
# warningpatterns => '"scsi_vhci":*kern.warning*',
# criticalexceptions => '/dev/testdisk',
# options => 'noprotocol'
}
);
but not able to get any single warning when I run this-
% ./check_logfiles -f config
OK - no errors or warnings|scsi_lines=0 scsi_warnings=0 scsi_criticals=0 scsi_unknowns=0
I played with criticalpatterns and warningpatterns to give different options like * or " but not able to get any warning/critical messages, please help me getting this plug in working