-
Notifications
You must be signed in to change notification settings - Fork 0
/
Installing_CHeck_mk_gui_over_nagiosXI
78 lines (45 loc) · 4.31 KB
/
Installing_CHeck_mk_gui_over_nagiosXI
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
From blank centOS 6.5 x64bit system.
Installing nagios XI
echo nagios xi install cd /tmp tar -xvf xi-5.2.3.tar.gz cd nagiosxi/ ./fullinstall y
Now login to XI http://<your nagios Server>/nagiosxi/install.php
And fill out the default nagios admin user ID and password, select the timezone.
Installing check_mk
you can pull the installer from the new OMD or from the new check_mk installer with this path:
/check-mk-raw-1.2.6p16.cre/packages/check_mk
tar -xvf check-mk-raw-1.2.6p15.cre.tar.gz
cd check_mk-1.2.6p16/
change permissions on files if needed
./setup.sh
choose setup directories.. see final list below.
You have chosen the following directories:
Executable programs /usr/bin Check_MK configuration /etc/check_mk Check_MK software /usr/share/check_mk documentation /usr/share/doc/check_mk check manuals /usr/share/doc/check_mk/checks working directory of Check_MK /var/lib/check_mk extensions for agents /usr/lib/check_mk_agent configuration dir for agents /etc/check_mk Name of Nagios user nagios User of Apache process apache Common group of Nagios+Apache nagios Nagios binary /usr/local/nagios/bin/nagios Nagios main configuration file /usr/local/nagios/etc/nagios.cfg Nagios object directory /usr/local/nagios/etc/static Nagios startskript /etc/init.d/nagios Nagios command pipe /var/log/nagios/rw/nagios.cmd Check results directory /usr/local/nagios/var/spool/checkresults Nagios status file /usr/local/nagios/var/status.dat Path to check_icmp /usr/local/nagios/libexec/check_icmp URL Prefix for Web addons / Apache config dir /etc/httpd/conf.d HTTP authentication file /usr/local/nagiosxi/etc/htpasswd.users HTTP AuthName Nagios Core PNP4Nagios templates /usr/local/nagios/share/pnp/templates RRD files /var/lib/nagios/rrd rrdcached socket /tmp/rrdcached.sock compile livestatus module yes Nagios / Icinga version 4.1.1 check_mk's binary modules /usr/lib/check_mk Unix socket for Livestatus /var/log/nagios/rw/live Backends for other systems /usr/share/check_mk/livestatus Install Event Console no
y
----INSTALLING MOD PYTHON FOR CHECK_MK
yum update
--------------for redhat-----------------------
need to install mod python
http://dl.fedoraproject.org/pub/epel/6/x86_64/mod_python-3.3.1-16.el6.x86_64.rpm
yum install mod_python
need to restart the nagios service for the web gui to show up at this point.
--------------for cent OS-----------------------
Compiling and Installing To install mod_python in Apache we need to compile the module. We are going to install apache sources first (It need a binary included in these -apxs-). We also need the python sources and generic development tools.
yum install httpd httpd-devel python-devel yum groupinstall "Development Tools" Download module from http://modpython.org/ . Version 3.5.x. is required.
Untar and start the compilation process.
tar zxfv mod_python-3.5.0.tg cd mod_python-3.5.0 ./configure -with-apxs=/usr/bin/apxs
Before “make” we will modify two files. There is more information at the end of the
post in “References”. src/Makefile. Add the marked lines.
version.c: @MP_GIT_SHA=$$(git describe --always); \ echo > version.c ; \ echo "/* THIS FILE IS AUTO-GENERATED BY Makefile */" >> version.c ; \ echo "#include \"mp_version.h\"" >> version.c ; \ include/mod_python.h include/psp_flex.h include/psp_parser.h \ include/requestobject.h include/tableobject.h include/connobject.h \ include/finfoobject.h include/hlistobject.h include/mp_version.h \ include/_pspmodule.h include/psp_string.h include/serverobject.h \ include/util.h \ echo "const char * const mp_git_sha = \"$${MP_GIT_SHA}\";" >> version.c ; \ dist/version.sh. Coment / add the marked lines
!/bin/sh
MPV_PATH="dirname $0/../src/include/mp_version.h" MAJ=awk '/MP_VERSION_MAJOR/ {print $3}' $MPV_PATH MIN=awk '/MP_VERSION_MINOR/ {print $3}' $MPV_PATH PCH=awk '/MP_VERSION_PATCH/ {print $3}' $MPV_PATH
GIT=git describe --always
echo $MAJ.$MIN.$PCH-$GIT
echo $MAJ.$MIN.$PCH-
Now we’re going to finish compiling module.
make make install Testing mod_python module.
Activate Apache module in python. We create a file e.g. /etc/httpd/conf.modules.d/01-
mod_python.conf
FILE /etc/httpd/conf.modules.d/01-mod_python.conf
LoadModule python_module modules/mod_python.so Restart Apache.
------------------ Create the live stats folder if not existing
set permissions on /var/log/nagios/rw/ to allow nagios and apache full access
boom done