forked from lausser/check_logfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadditional_note_by_ganesh
53 lines (42 loc) · 1.91 KB
/
additional_note_by_ganesh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
--PRE_REQ--
Debian OS
apt-get intall git
apt-get install build-essential
apt-get install g++
apt-get install autoconf
apt-get install libtool
--DOWNLOAD and COMPILE
git clone x.git
cd <to project dir>
autoreconf -i
./configure
make
make install
--TEST PLUGIN--
vi sample.log and insert some lines
./check_logfiles --logfile=sample.log -criticalpattern="critical"
CRITICAL - (1 errors in check_logfiles.protocol-2019-06-22-11-28-43) - this is a critical error |'default_lines'=1 'default_warnings'=0 'default_criticals'=1 'default_unknowns'=0
./check_logfiles --logfile=sample.log -warningpattern="warning"
WARNING - (1 warnings in check_logfiles.protocol-2019-06-22-11-29-45) - this is a warning error |'default_lines'=1 'default_warnings'=1 'default_criticals'=0 'default_unknowns'=0
--or
Create a search config file as below
@searches = (
{
tag => 'software_errors',
logfile => '/tmp/test.log',
rotation => 'bmwhpux',
criticalpatterns => ['CRITICAL_ERRORS', 'critical line'],
warningpatterns => ['WARNING_ERRORS', 'warning line'],
options => 'script,protocol,nocount'
}
)
CRITICAL - (1 errors, 1 warnings in sample.protocol-2019-06-22-11-38-12) - critical line |'software_errors_lines'=1 'software_errors_warnings'=1 'software_errors_criticals'=1 'software_errors_unknowns'=0
--TROUBLESHOOTING--
1. Create a directory as "/etc/mtab" if you hit below error
readline() on closed filehandle MTAB at ./check_logfiles line 1833.
2. In progress
Use of uninitialized value $script in concatenation (.) or string at ./check_logfiles line 1665, <GEN1> line 1.
Use of uninitialized value $script in sprintf at ./check_logfiles line 1666, <GEN1> line 1.
Use of uninitialized value $script in sprintf at ./check_logfiles line 1667, <GEN1> line 1.
Can't exec "/bin/": Permission denied at ./check_logfiles line 1742, <GEN1> line 1.
Use of uninitialized value in sprintf at ./check_logfiles line 3829.