|
Installing Nagios Core From Source$ ?! ]0 C. m0 h# S. B+ a$ x
This document describes how to install Nagios Core from source. This guide is broken up into several sections and covers different operating system (OS) distributions. If your OS Distribution is not included in this guide then please contact us to see if we can get it added. Some distributions may be missing as we don't have access to a test environment that allows us to develop the documentation. Nagios Core 4.4.0 and Nagios Plugins 2.2.1 is what this guide instructs you to install, however future versions should also work fine with these steps. This documentation is broken up into two distinct sections: - Install Nagios Core& ~) {/ E3 @+ z3 u& O
- Install Nagios Plugins
4 X1 ~5 M5 m# V7 q; ] i' ?- P# M+ F" O; y: A0 @
This separation is to make a clear distinction as to what prerequisite packages are required by the OS it is being installed on. For example the SNMP packages are installed as part of the Nagios Plugins section, as SNMP is not required by Nagios Core.
& k& B4 l; S2 O5 J) r+ _) q) LPlease select your OS:
9 Z( ^' H( K, }% K$ G6 G/ L" D# v7 @* q
- T! f& A; a- Z6 O: a+ i
CentOS | RHEL | Oracle Linux Security-Enhanced LinuxThis guide is based on SELinux being disabled or in permissive mode. Steps to do this are as follows. sed -i 's/SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config1 F0 M# q: I* C ?* l
setenforce 0: }0 V' n4 s: O) @, `
PrerequisitesPerform these steps to install the pre-requisite packages. yum install -y gcc glibc glibc-common wget unzip httpd php gd gd-devel perl postfix Downloading the Sourcecd /tmp
L# ]) R! o9 E. i+ V7 \wget -O nagioscore.tar.gz https://github.com/NagiosEnterpr ... nagios-4.4.0.tar.gz
2 K. H8 d/ C/ E( X) K# l4 htar xzf nagioscore.tar.gz
9 S" X; p/ r. H; O* r5 Z {Compilecd /tmp/nagioscore-nagios-4.4.0/
4 P2 y. o$ f8 d: L1 S$ P% D./configure5 T9 o+ R2 ?& Y8 F- p
make all% X) L" `. U* }3 ?- U& C+ z
Create User And GroupThis creates the nagios user and group. The apache user is also added to the nagios group. make install-groups-users
2 [3 G. J9 G' b( w5 Musermod -a -G nagios apache& U0 k; E7 ?4 F' w" Z! y" b5 J
Install BinariesThis step installs the binary files, CGIs, and HTML files. make install
( e+ x1 [! l1 X; a- ?/ k; z& O YInstall Service / DaemonThis installs the service or daemon files and also configures them to start on boot. The Apache httpd service is also configured at this point. ===== CentOS 5.x / 6.x | RHEL 5.x / 6.x | Oracle Linux 5.x / 6.x ===== make install-init
& K% g9 T8 ?# L; Ochkconfig --level 2345 httpd on; q% }1 T; @( B# L/ r& I* r
===== CentOS 7.x | RHEL 7.x | Oracle Linux 7.x ===== make install-init
8 j4 E1 r. _4 e% K9 lsystemctl enable httpd.service
* u) T; R# u: H3 M9 iInformation on starting and stopping services will be explained further on.
) K' B z3 m$ n; m; b3 JInstall Command ModeThis installs and configures the external command file. make install-commandmode5 d9 |9 P/ t& t* A/ u+ a8 j( k, [
Install Configuration FilesThis installs the *SAMPLE* configuration files. These are required as Nagios needs some configuration files to allow it to start. make install-config. l. ?4 l* n# I( d- Z2 D
Install Apache Config FilesThis installs the Apache web server configuration files. Also configure Apache settings if required. make install-webconf# O+ S) W& H/ N V8 ]
Configure FirewallYou need to allow port 80 inbound traffic on the local firewall so you can reach the Nagios Core web interface. ===== CentOS 5.x / 6.x | RHEL 5.x / 6.x | Oracle Linux 5.x / 6.x ===== iptables -I INPUT -p tcp --destination-port 80 -j ACCEPT, J5 c3 `. M, V2 t
service iptables save/ @1 X7 @) F! G0 ~; W% j$ U8 j/ S
ip6tables -I INPUT -p tcp --destination-port 80 -j ACCEPT
1 P- q1 ]+ g: W8 w W/ a1 _) O/ Y1 Yservice ip6tables save$ }- v6 I8 g- g7 C6 f
===== CentOS 7.x | RHEL 7.x | Oracle Linux 7.x ===== firewall-cmd --zone=public --add-port=80/tcp& ?6 n) B9 @* y" J) M& E% e3 R
firewall-cmd --zone=public --add-port=80/tcp --permanent
" k \6 U, x5 u7 [5 m6 TCreate nagiosadmin User AccountYou'll need to create an Apache user account to be able to log into Nagios. The following command will create a user account called nagiosadmin and you will be prompted to provide a password for the account. htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
7 s8 s5 r! V$ z# h" a/ nWhen adding additional users in the future, you need to remove -c from the above command otherwise it will replace the existing nagiosadmin user (and any other users you may have added). 3 s3 f6 G: H/ F g
; Y8 U+ B( }4 k8 F; f" Q" t. cStart Apache Web Server===== CentOS 5.x / 6.x | RHEL 5.x / 6.x | Oracle Linux 5.x / 6.x ===== service httpd start3 I) x8 M7 b8 ~$ B" I, [
===== CentOS 7.x | RHEL 7.x | Oracle Linux 7.x ===== systemctl start httpd.service f, \; w% z8 }1 v/ W3 |4 N
Start Service / DaemonThis command starts Nagios Core. ===== CentOS 5.x / 6.x | RHEL 5.x / 6.x | Oracle Linux 5.x / 6.x ===== service nagios start. p! q' b' E/ V% R/ L5 a
===== CentOS 7.x | RHEL 7.x | Oracle Linux 7.x ===== systemctl start nagios.service
: a! B. R5 i0 j& a9 M" qTest NagiosNagios is now running, to confirm this you need to log into the Nagios Web Interface. Point your web browser to the ip address or FQDN of your Nagios Core server, for example: http://10.25.5.143/nagios http://core-013.domain.local/nagios You will be prompted for a username and password. The username is nagiosadmin (you created it in a previous step) and the password is what you provided earlier. Once you have logged in you are presented with the Nagios interface. Congratulations you have installed Nagios Core. BUT WAIT ...Currently you have only installed the Nagios Core engine. You'll notice some errors under the hosts and services along the lines of: (No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_load, ...) failed. errno is 2: No such file or directory These errors will be resolved once you install the Nagios Plugins, which is covered in the next step.
# |' K0 h! ]& y" m( l6 q$ vInstalling The Nagios PluginsNagios Core needs plugins to operate properly. The following steps will walk you through installing Nagios Plugins. These steps install nagios-plugins 2.2.1. Newer versions will become available in the future and you can use those in the following installation steps. Please see the releases page on GitHub for all available versions. }/ ]0 T' m% h
Please note that the following steps install most of the plugins that come in the Nagios Plugins package. However there are some plugins that require other libraries which are not included in those instructions. Please refer to the following KB article for detailed installation instructions:
0 ^8 I/ Z2 L* \" g: i# |. O; }PrerequisitesMake sure that you have the following packages installed. ===== CentOS 5.x ===== yum install -y gcc glibc glibc-common make gettext automake wget openssl-devel net-snmp net-snmp-utils epel-release9 r1 C+ b1 V- N4 W: } C, f, r
yum install -y perl-Net-SNMP
9 X6 V* p2 @) M6 d$ R. E7 X0 Ecd /tmp; {: E& F, L3 e6 k% h' @
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz6 @- n& C8 s4 Y9 I
tar xzf autoconf-2.60.tar.gz
r/ _. D6 s% {0 p, [cd /tmp/autoconf-2.60) i5 s3 h3 G: T4 ~4 u0 P7 T
./configure : O3 a' ]7 |% B6 L& b
make t0 S3 d: A1 E1 q$ `3 p
make install* X) Q5 H# i5 {, u
===== CentOS 6.x / 7.x ===== yum install -y gcc glibc glibc-common make gettext automake autoconf wget openssl-devel net-snmp net-snmp-utils epel-release1 q! O6 p: ~$ e0 S
yum install -y perl-Net-SNMP( g2 y; p. s& |! E
===== RHEL 5.x | Oracle Linux 5.x ===== cd /tmp
7 U: S! ~9 _2 ?: hwget http://archives.fedoraproject.or ... latest-5.noarch.rpm/ H# j* `( |. A* q7 |1 e
rpm -ihv epel-release-latest-5.noarch.rpm
0 U3 B m1 T4 a) ^0 @yum install -y gcc glibc glibc-common make gettext automake wget openssl-devel net-snmp net-snmp-utils
& w7 Y6 v2 I& w! z% r, Zyum install -y perl-Net-SNMP* ?; b6 z6 O: B3 T
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz0 Y9 e( Z8 @" Y' D; U4 Y, s
tar xzf autoconf-2.60.tar.gz
m' Y% I( E1 ]) w0 \; `cd /tmp/autoconf-2.60* A* D3 A& H* H% n: |/ P0 Y
./configure
, c" G- Y; E) Z2 k* i+ Kmake$ `3 P5 ]7 P, T' }0 V4 N8 a
make install
) R/ `6 _- ^( W8 x===== RHEL 6.x | Oracle Linux 6.x ===== cd /tmp. j' ^4 x0 p6 s1 x( ^
wget https://dl.fedoraproject.org/pub ... latest-6.noarch.rpm3 L; q) L7 N: m/ [6 @* g1 m6 V
rpm -ihv epel-release-latest-6.noarch.rpm/ l; i, U! y* G. R4 q# A
yum install -y gcc glibc glibc-common make gettext automake autoconf wget openssl-devel net-snmp net-snmp-utils
! U R$ q$ V, Zyum install -y perl-Net-SNMP
8 t! `! _8 }2 q% ]===== RHEL 7.x ===== cd /tmp5 o2 Z: r& ^" Z
wget https://dl.fedoraproject.org/pub ... latest-7.noarch.rpm( w" l6 Z" _6 A4 `0 a# b, r* p
rpm -ihv epel-release-latest-7.noarch.rpm
* x( H3 b# v8 y3 }: l, x6 dsubscription-manager repos --enable=rhel-7-server-optional-rpms
/ [( M ~1 Y0 \5 E# W* M( n/ pyum install -y gcc glibc glibc-common make gettext automake autoconf wget openssl-devel net-snmp net-snmp-utils O2 B9 i/ N$ w# r
yum install -y perl-Net-SNMP7 X6 z) b+ |# ^. w% d7 N' `+ p
===== Oracle Linux 7.x ===== yum install -y yum-utils
# l+ A T, r- \' \% Nyum-config-manager --enable ol7_optional_latest
. F" f# y" J- T6 ecd /tmp" Y2 I9 ]# P) _
wget https://dl.fedoraproject.org/pub ... latest-7.noarch.rpm
: F% P# O% z% prpm -ihv epel-release-latest-7.noarch.rpm0 }% |# M4 ^' k& w
yum install -y gcc glibc glibc-common make gettext automake autoconf wget openssl-devel net-snmp net-snmp-utils: i6 |2 N( b' |1 z7 j3 a
yum install -y perl-Net-SNMP
' P& W. V5 [+ {8 C- m' J( x1 wDownloading The Sourcecd /tmp: e. ?+ R: H6 B9 c/ I: O
wget --no-check-certificate -O nagios-plugins.tar.gz https://github.com/nagios-plugin ... elease-2.2.1.tar.gz0 N6 F' O+ G- w7 v" c( \1 Y1 \3 m
tar zxf nagios-plugins.tar.gz! Q4 q5 f* _. N
Compile + Installcd /tmp/nagios-plugins-release-2.2.1// e$ H3 b' `$ U
./tools/setup# ^1 Z* r2 `1 l$ p0 P" D! B( M
./configure
$ _4 o0 I8 s! N. |" R( _make
" P2 u6 P/ B9 j9 cmake install
3 S3 F! a! B; \. c* E9 GTest PluginsPoint your web browser to the ip address or FQDN of your Nagios Core server, for example: http://10.25.5.143/nagios http://core-013.domain.local/nagios Go to a host or service object and "Re-schedule the next check" under the Commands menu. The error you previously saw should now disappear and the correct output will be shown on the screen. * U( D' S* W3 w/ b! u, G
Service / Daemon CommandsDifferent Linux distributions have different methods of starting / stopping / restarting / status Nagios. ===== CentOS 5.x / 6.x | RHEL 5.x / 6.x | Oracle Linux 5.x / 6.x ===== service nagios start' e2 x8 q' C* ~4 @9 O1 f
service nagios stop8 T/ p, b; _6 p5 @" W4 n0 R- }
service nagios restart0 L n3 d( P8 D, Z: e7 @2 S
service nagios status
) ^9 H8 H$ ]/ X1 }5 _9 w===== CentOS 7.x | RHEL 7.x | Oracle Linux 7.x ===== systemctl start nagios.service
2 ^" `+ m8 o& N; v' |( {* h$ u- C3 tsystemctl stop nagios.service4 p; _) ?( u6 Z$ ?% z7 ]3 o
systemctl restart nagios.service
5 h0 \5 z' H* N$ O; rsystemctl status nagios.service7 J. j; W$ H& _4 H' u
1 Q# M$ E& P7 L d& w
L* _ A3 T/ e& _
Ubuntu Security-Enhanced LinuxThis guide is based on SELinux being disabled or in permissive mode. SELinux is not enabled by default on Ubuntu. If you would like to see if it is installed run the following command: sudo dpkg -l selinux*& v* {( J; }% K) U! T; A. o& f
PrerequisitesPerform these steps to install the pre-requisite packages. ===== Ubuntu 14.x / 15.x ===== sudo apt-get update+ {4 f9 W( {+ E b4 L( g/ l
sudo apt-get install -y autoconf gcc libc6 make wget unzip apache2 apache2-utils php5 libgd2-xpm-dev
9 `! `& A" J( V3 K3 }, L8 r) I===== Ubuntu 16.x / 17.x ===== sudo apt-get update6 t6 C- E3 S; ~. m: e
sudo apt-get install -y autoconf gcc libc6 make wget unzip apache2 php libapache2-mod-php7.0 libgd2-xpm-dev
9 z2 C" i; X+ h. |" M4 M: C===== Ubuntu 18.x ===== sudo apt-get update
* |) n( s6 R, w7 h0 Csudo apt-get install -y autoconf gcc libc6 make wget unzip apache2 php libapache2-mod-php7.2 libgd-dev' ]7 v/ y6 B. l
Downloading the Sourcecd /tmp
2 a2 F& w/ c* T& Jwget -O nagioscore.tar.gz https://github.com/NagiosEnterpr ... nagios-4.4.0.tar.gz! j" [6 `, d1 U* o1 |
tar xzf nagioscore.tar.gz3 {0 o; Z% c) u. H1 q0 F6 Z3 |
Compilecd /tmp/nagioscore-nagios-4.4.0// P& s! J I. s1 @
sudo ./configure --with-httpd-conf=/etc/apache2/sites-enabled
0 `; `" [5 P( Q5 H. S; {& bsudo make all
: B+ O* o# ? Y: ZCreate User And GroupThis creates the nagios user and group. The www-data user is also added to the nagios group. sudo make install-groups-users# B1 F7 A5 J8 W- X d
sudo usermod -a -G nagios www-data
- l* h. R) \! ^% D: z% u/ dInstall BinariesThis step installs the binary files, CGIs, and HTML files. sudo make install. P- J) I, W: _0 J# ?9 J
Install Service / DaemonThis installs the service or daemon files and also configures them to start on boot. sudo make install-init
' U% E6 G- @+ @( ^3 xInformation on starting and stopping services will be explained further on. ; c% p9 Z c9 l9 f6 ]# F6 G" Y
Install Command ModeThis installs and configures the external command file. sudo make install-commandmode* ]( J) W5 f+ N+ N
Install Configuration FilesThis installs the *SAMPLE* configuration files. These are required as Nagios needs some configuration files to allow it to start. sudo make install-config6 g3 { x3 ?" F: f" j
Install Apache Config FilesThis installs the Apache web server configuration files and configures Apache settings. sudo make install-webconf
; S9 o( f7 x! isudo a2enmod rewrite# r4 K8 S' }# q" C! |2 F. K
sudo a2enmod cgi
8 h* P9 t& r6 i% vConfigure FirewallYou need to allow port 80 inbound traffic on the local firewall so you can reach the Nagios Core web interface. sudo ufw allow Apache4 G7 ?* P: {3 j3 F* Y
sudo ufw reload
9 K( u: g7 H, P0 S* d7 u/ vCreate nagiosadmin User AccountYou'll need to create an Apache user account to be able to log into Nagios. The following command will create a user account called nagiosadmin and you will be prompted to provide a password for the account. sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
( W8 J2 A% S+ n& x5 A# ?, OWhen adding additional users in the future, you need to remove -c from the above command otherwise it will replace the existing nagiosadmin user (and any other users you may have added).
5 ^9 }' L6 [5 L/ g0 v: N$ x5 h1 d" ~5 c, R4 @
Start Apache Web Server===== Ubuntu 14.x ===== Need to restart it because it is already running. sudo service apache2 restart
- C& W L3 B5 K! n0 x8 v===== Ubuntu 15.x / 16.x / 17.x /18.x ===== Need to restart it because it is already running. sudo systemctl restart apache2.service
% h1 F4 z* k8 B* rStart Service / DaemonThis command starts Nagios Core. ===== Ubuntu 14.x ===== sudo start nagios0 m) T- s7 E9 f
===== Ubuntu 15.x / 16.x / 17.x / 18.x ===== sudo systemctl start nagios.service
4 F% p L+ }/ |* m* D9 e) [Test NagiosNagios is now running, to confirm this you need to log into the Nagios Web Interface. Point your web browser to the ip address or FQDN of your Nagios Core server, for example: http://10.25.5.143/nagios http://core-013.domain.local/nagios You will be prompted for a username and password. The username is nagiosadmin (you created it in a previous step) and the password is what you provided earlier. Once you have logged in you are presented with the Nagios interface. Congratulations you have installed Nagios Core. BUT WAIT ...Currently you have only installed the Nagios Core engine. You'll notice some errors under the hosts and services along the lines of: (No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_load, ...) failed. errno is 2: No such file or directory These errors will be resolved once you install the Nagios Plugins, which is covered in the next step.
% Y4 z, W9 F. g. ]5 c" `) T- E$ ?Installing The Nagios PluginsNagios Core needs plugins to operate properly. The following steps will walk you through installing Nagios Plugins. These steps install nagios-plugins 2.2.1. Newer versions will become available in the future and you can use those in the following installation steps. Please see the releases page on GitHub for all available versions.
e; E4 R% D' q- s% L/ x. d4 VPlease note that the following steps install most of the plugins that come in the Nagios Plugins package. However there are some plugins that require other libraries which are not included in those instructions. Please refer to the following KB article for detailed installation instructions:
! i1 C/ D3 k% K. C9 d4 ]& mPrerequisitesMake sure that you have the following packages installed. sudo apt-get install -y autoconf gcc libc6 libmcrypt-dev make libssl-dev wget bc gawk dc build-essential snmp libnet-snmp-perl gettext
/ L5 O6 F8 I( R" D* bDownloading The Sourcecd /tmp
{+ b- w+ @: w$ ewget --no-check-certificate -O nagios-plugins.tar.gz https://github.com/nagios-plugin ... elease-2.2.1.tar.gz
# N* Z5 g1 Y3 ytar zxf nagios-plugins.tar.gz2 u" [2 j$ k! w4 J% C+ b0 `, H
Compile + Installcd /tmp/nagios-plugins-release-2.2.1/
1 j1 G5 p% `# e+ N$ z+ Usudo ./tools/setup
6 Q' X8 j. i0 d) w- T5 n" F0 Csudo ./configure& _4 |! L# Q; I
sudo make. ^; R& ?% q( ~( E) {+ g
sudo make install
: }3 M% ~, j7 \- J: J' {, D) z" Y1 F+ z yTest PluginsPoint your web browser to the ip address or FQDN of your Nagios Core server, for example: http://10.25.5.143/nagios http://core-013.domain.local/nagios Go to a host or service object and "Re-schedule the next check" under the Commands menu. The error you previously saw should now disappear and the correct output will be shown on the screen. % D3 T- F, s' ~/ b; f8 _
Service / Daemon CommandsDifferent Linux distributions have different methods of starting / stopping / restarting / status Nagios. ===== Ubuntu 14.x ===== sudo start nagios
4 [( p5 q0 w* ?7 asudo stop nagios
$ K( @- a0 [( ]( x$ nsudo restart nagios
5 D E# u7 `% z4 K& {" bsudo status nagios1 _& C6 `( ?3 `1 i& M* r9 Z ~
===== Ubuntu 15.x / 16.x / 17.x / 18.x ===== sudo systemctl start nagios.service
8 K }6 p) w/ G4 ?0 Vsudo systemctl stop nagios.service
6 W. [$ p4 r0 X4 {% B5 K5 osudo systemctl restart nagios.service
5 S2 S: u) A7 Y: I: q# N1 {sudo systemctl status nagios.service
9 T8 o& H1 t3 r) h. O" l
) }/ H# t6 v. `- k' g1 ^( z
6 d( ^+ J9 M8 B( a% o+ G7 b# L$ eSUSE SLES | openSUSE Leap Security-Enhanced LinuxThis guide is based on SELinux being disabled or in permissive mode. SELinux is not enabled by default on SUSE. If you would like to see if it is enabled run the following command: ls -la /etc/selinux/configIf the file does not exist, SELinux is not enabled. - _% L6 `* U) m
PrerequisitesPerform these steps to install the pre-requisite packages. ===== SUSE SLES 11.3 ===== cd /tmp+ S- m, U9 u a2 @9 K
wget 'https://nu.novell.com/repo/$RCE/SLE11-SDK-SP3-Pool/sle-11-x86_64/rpm/x86_64/sle-sdk-release-11.3-1.69.x86_64.rpm'
2 I `, s' V2 ?" Twget 'https://nu.novell.com/repo/$RCE/SLE11-SDK-SP3-Pool/sle-11-x86_64/rpm/x86_64/sle-sdk-release-SDK-11.3-1.69.x86_64.rpm'8 j3 ?" V. c' C' Z k$ Q
sudo rpm -ivh sle-sdk-release-*
) e; a+ l h- D3 [sudo suse_register# c+ i9 g% L, n1 F' L3 U* F$ `
sudo zypper --non-interactive install autoconf gcc glibc make wget unzip apache2 apache2-utils php53 apache2-mod_php53 gd gd-devel
) I j' D6 t# x" Q. s- f) w===== SUSE SLES 11.4 ===== cd /tmp
$ y j7 e- g$ t0 awget 'https://nu.novell.com/repo/$RCE/SLE11-SDK-SP4-Pool/sle-11-x86_64/rpm/x86_64/sle-sdk-release-11.4-1.55.x86_64.rpm'
; p* }4 Z+ ?5 j2 owget 'https://nu.novell.com/repo/$RCE/SLE11-SDK-SP4-Pool/sle-11-x86_64/rpm/x86_64/sle-sdk-release-SDK-11.4-1.55.x86_64.rpm'6 r- y4 A o) L; v" X) Y1 R1 N; x7 A( e
sudo rpm -ivh sle-sdk-release-*. c7 }: I6 g" B8 a
sudo suse_register: L5 ?& ]7 E' X8 [+ p
sudo zypper --non-interactive install autoconf gcc glibc make wget unzip apache2 apache2-utils php53 apache2-mod_php53 gd gd-devel s: e+ w; P O" R) d }
===== SUSE SLES 12 ===== sudo SUSEConnect -p sle-sdk/12/x86_64
; u$ z- A: B4 B/ p, t" K* fsudo SUSEConnect -p sle-module-web-scripting/12/x86_64
4 \$ I8 Z% E \) [9 G% Osudo zypper --non-interactive install autoconf gcc glibc make wget unzip apache2 apache2-utils php5 apache2-mod_php5 gd gd-devel
8 H/ W$ g! U% y1 O! t- e===== SUSE SLES 12.1 ===== sudo SUSEConnect -p sle-sdk/12.1/x86_64' V- i- {+ S' Z, j, d5 j3 L0 Z1 \
sudo SUSEConnect -p sle-module-web-scripting/12/x86_64- ]1 R% `0 S" G6 p
sudo zypper --non-interactive install autoconf gcc glibc make wget unzip apache2 apache2-utils php5 apache2-mod_php5 gd gd-devel
# i+ X) N7 m* S% D===== SUSE SLES 12.2 ===== sudo SUSEConnect -p sle-sdk/12.2/x86_64
# l( ^4 @3 w8 V+ C9 _ Asudo SUSEConnect -p sle-module-web-scripting/12/x86_647 f h4 D9 L! `. b$ T' N! {" w2 Y
sudo zypper --non-interactive install autoconf gcc glibc make wget unzip apache2 apache2-utils php5 apache2-mod_php5 gd gd-devel
" @' I! b9 R/ n0 e p) M) d+ S===== SUSE SLES 12.3 ===== sudo SUSEConnect -p sle-sdk/12.3/x86_64# @! q$ f6 B7 [, d" ~/ u. @
sudo SUSEConnect -p sle-module-web-scripting/12/x86_648 ^* F) [. ]% r0 Z9 x
sudo zypper --non-interactive install autoconf gcc glibc make wget unzip apache2 apache2-utils php5 apache2-mod_php5 gd gd-devel/ ~; d/ ~) w1 D- E$ e: ~
===== openSUSE Leap 42.x ===== sudo zypper --non-interactive install autoconf gcc glibc make wget unzip apache2 apache2-utils php5 apache2-mod_php5 gd gd-devel7 R: |1 a/ a/ m. A- X1 R# A8 K G q3 j
===== openSUSE Leap 15.x ===== sudo zypper --non-interactive install autoconf gcc glibc make wget unzip apache2 apache2-utils php7 apache2-mod_php7 gd gd-devel
5 F+ w( m8 H" @; V
8 E2 F# \! I6 ]3 T4 FDownloading the Sourcecd /tmp# Q+ a* S$ ~5 n3 {6 P8 i' _+ d
wget -O nagioscore.tar.gz https://github.com/NagiosEnterpr ... nagios-4.4.0.tar.gz
& {0 t, b" m; ~; s0 F: o/ ztar xzf nagioscore.tar.gz5 E9 w9 a" a) u" n- h
Compilecd /tmp/nagioscore-nagios-4.4.0/+ ]+ C1 k1 l+ i/ [( F
sudo ./configure --with-httpd-conf=/etc/apache2/vhosts.d, S8 V, K3 F+ b; P$ t
sudo make all
; w% P9 N3 e' nCreate User And GroupThis creates the nagios user and group. The apache user is also added to the nagios group. ===== SUSE SLES 11.x ===== sudo make install-groups-users
, s2 d" D+ g. @) o4 B/ e, I! hsudo /usr/sbin/usermod -A nagios wwwrun3 O: G( c" z; W" V
===== SUSE SLES 12.x | openSUSE Leap 42.x / 15.x ===== sudo make install-groups-users
* b% K+ t# Y/ }2 d( Rsudo /usr/sbin/usermod -a -G nagios wwwrun/ O: G' M5 u$ s& ~6 R7 _. r1 q
Install BinariesThis step installs the binary files, CGIs, and HTML files. sudo make install' W3 e9 a$ V+ p* v8 H0 [
Install Service / DaemonThis installs the service or daemon files and also configures them to start on boot. sudo make install-init
. j" I& ~% f" MInformation on starting and stopping services will be explained further on.
$ a9 u% [1 \% h; W7 F0 ^( T. pInstall Command ModeThis installs and configures the external command file. sudo make install-commandmode
1 u. Q! i" g' d3 ZInstall Configuration FilesThis installs the *SAMPLE* configuration files. These are required as Nagios needs some configuration files to allow it to start. sudo make install-config
0 q; H+ u/ @' YInstall Apache Config FilesThis installs the Apache web server configuration files. Also configure Apache settings if required. ===== SUSE SLES 11.x ===== sudo make install-webconf
" h! P1 F6 E K( |7 r8 psudo /usr/sbin/a2enmod rewrite
+ q1 ~1 D8 ]2 f Z7 ]; Y; ]sudo /usr/sbin/a2enmod cgi
" ]) s. A9 f2 Ysudo /usr/sbin/a2enmod version$ z5 M- w1 y! |
sudo /usr/sbin/a2enmod php5
$ ?8 x9 W: b; }/ _* }+ c& `7 wsudo /sbin/chkconfig --set apache2 on
2 T, Y4 c: w; l) {" R2 g===== SUSE SLES 12.x | openSUSE Leap 42.x ===== sudo make install-webconf6 ?' C5 P1 y$ R
sudo /usr/sbin/a2enmod rewrite3 v# e- `1 N2 Y* m1 Q: j9 N8 b
sudo /usr/sbin/a2enmod cgi
" p/ V. ]% |2 ?7 p) j9 hsudo /usr/sbin/a2enmod version
7 b Z+ Q/ v Csudo /usr/sbin/a2enmod php50 L+ T w& \- Z; _) h4 T) _" F
sudo systemctl enable apache2.service3 O5 X- H5 X0 o* Q) h
===== openSUSE Leap 15.x ===== sudo make install-webconf
( @( P, \1 W& u. S' z, ysudo /usr/sbin/a2enmod rewrite2 [; k# b: @ o0 M" K, F" T4 Q
sudo /usr/sbin/a2enmod cgi0 u% a' x# Z, ~% K7 h$ h
sudo /usr/sbin/a2enmod version
% _9 b4 i" q! \; ~sudo /usr/sbin/a2enmod php7
- ]6 C" E& r5 t5 `8 esudo systemctl enable apache2.service
' T/ L# ^5 F# VConfigure FirewallYou need to allow port 80 inbound traffic on the local firewall so you can reach the Nagios Core web interface. ===== SUSE SLES 11.x ===== sudo sed -i '/FW_SERVICES_EXT_TCP=/s/\"$/\ 80\"/' /etc/sysconfig/SuSEfirewall2
1 U* @# d4 x7 a' U! `sudo /sbin/service SuSEfirewall2_init restart: \; B1 F; n x5 F: h; B7 Z$ ?
sudo /sbin/service SuSEfirewall2_setup restart" U1 v$ ] L# X8 _/ \! q
===== SUSE SLES 12.x ===== sudo /usr/sbin/SuSEfirewall2 open EXT TCP 80
8 c0 t/ q9 A( u [% Osudo systemctl restart SuSEfirewall20 W% U1 `2 Q. P3 e. P% A' Q
===== openSUSE Leap 42.x ===== Port 80 is enabled when Apache is installed, nothing needs to be done.
' G* t0 U. i( R' ]0 f===== openSUSE Leap 15.x ===== sudo firewall-cmd --zone=public --add-port=80/tcp
" v* P v: L( dsudo firewall-cmd --zone=public --add-port=80/tcp --permanent0 D( o0 l/ _! i- S4 I! p
# J) h# {7 |+ p0 s5 m+ X- x
Create nagiosadmin User AccountYou'll need to create an Apache user account to be able to log into Nagios. The following command will create a user account called nagiosadmin and you will be prompted to provide a password for the account. sudo htpasswd2 -c /usr/local/nagios/etc/htpasswd.users nagiosadmin. @! r/ B% a, o9 u$ u3 A9 c
When adding additional users in the future, you need to remove -c from the above command otherwise it will replace the existing nagiosadmin user (and any other users you may have added). 3 F( h# e; L: U; d5 T; b
0 }% [7 _" l! }! Y: }. Q8 S; V, S
Start Apache Web Server===== SUSE SLES 11.x ===== sudo /sbin/service apache2 start
$ A$ l& Y3 i5 Z2 ], [===== SUSE SLES 12.x | openSUSE Leap 42.x / 15.x ===== sudo systemctl start apache2.service
3 J. c' q; U1 V5 ZStart Service / DaemonThis command starts Nagios Core. ===== SUSE SLES 11.x ===== sudo /sbin/service nagios start
$ \. k( u7 v" p* G6 f===== SUSE SLES 12.x | openSUSE Leap 42.x / 15.x ===== sudo systemctl start nagios.service
. S4 a# B! c- OTest NagiosNagios is now running, to confirm this you need to log into the Nagios Web Interface. Point your web browser to the ip address or FQDN of your Nagios Core server, for example: http://10.25.5.143/nagios http://core-013.domain.local/nagios You will be prompted for a username and password. The username is nagiosadmin (you created it in a previous step) and the password is what you provided earlier. Once you have logged in you are presented with the Nagios interface. Congratulations you have installed Nagios Core. BUT WAIT ...Currently you have only installed the Nagios Core engine. You'll notice some errors under the hosts and services along the lines of: (No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_load, ...) failed. errno is 2: No such file or directory These errors will be resolved once you install the Nagios Plugins, which is covered in the next step. - \5 z4 X# s6 }7 O
Installing The Nagios PluginsNagios Core needs plugins to operate properly. The following steps will walk you through installing Nagios Plugins. These steps install nagios-plugins 2.2.1. Newer versions will become available in the future and you can use those in the following installation steps. Please see the releases page on GitHub for all available versions. & S4 S4 O* v. V, h/ C$ f n7 H! C
Please note that the following steps install most of the plugins that come in the Nagios Plugins package. However there are some plugins that require other libraries which are not included in those instructions. Please refer to the following KB article for detailed installation instructions:
+ I }/ e9 ?# \4 W4 i7 uPrerequisitesMake sure that you have the following packages installed. ===== SUSE SLES 11.x / 12.x | openSUSE Leap 42.x ===== sudo zypper --non-interactive install autoconf gcc glibc libmcrypt-devel make libopenssl-devel wget gettext gettext-runtime automake net-snmp perl-Net-SNMP# L) b8 h6 N6 g- W& }
===== openSUSE Leap 15.x ===== sudo zypper --non-interactive install autoconf gcc glibc libgcrypt-devel make libopenssl-devel wget gettext gettext-runtime automake net-snmp perl-Net-SNMP
) W! _& Z- C3 \. ]8 F, a! |' Z+ fDownloading The Sourcecd /tmp
; M% _ _. F) L& \: kwget --no-check-certificate -O nagios-plugins.tar.gz https://github.com/nagios-plugin ... elease-2.2.1.tar.gz
& V* _0 O$ q; W* ytar zxf nagios-plugins.tar.gz
* m7 k! \# H8 | TCompile + Installcd /tmp/nagios-plugins-release-2.2.1/! e( A0 H9 l4 @4 t }5 g
sudo ./tools/setup
3 J: u0 Q) I- L( ]sudo ./configure" X4 U' `# Q+ q+ ^; f" @
sudo make
! Q$ t+ l2 T2 U! S* }, lsudo make install t/ p c! c& @7 `# z# ~6 Z- g% a
Test PluginsPoint your web browser to the ip address or FQDN of your Nagios Core server, for example: http://10.25.5.143/nagios http://core-013.domain.local/nagios Go to a host or service object and "Re-schedule the next check" under the Commands menu. The error you previously saw should now disappear and the correct output will be shown on the screen. : S' b9 t* q8 M) |9 W8 m
Service / Daemon CommandsDifferent Linux distributions have different methods of starting / stopping / restarting / status Nagios. ===== SUSE SLES 11.x ===== sudo /sbin/service nagios start
5 u! Z" n: e* T, w/ b5 o' Jsudo /sbin/service nagios stop3 s" D6 N! |' F+ e% b# u
sudo /sbin/service nagios restart
% v5 ?5 p* g8 p1 C" esudo /sbin/service nagios status ===== SUSE SLES 12.x | openSUSE Leap 42.x / 15.x ===== sudo systemctl start nagios.service
# |- k3 }) I7 g( c7 @3 A5 k$ T- xsudo systemctl stop nagios.service
) a- v! |/ x/ x- Qsudo systemctl restart nagios.service
% E3 L# W4 L2 ~. |2 U7 d3 [" Rsudo systemctl status nagios.service5 d/ @+ r. _( f' O/ {9 X! w
8 T$ L1 }( z- O% G
0 n8 g( U$ d" S6 CDebian | Raspbian All steps on Debian require to run as root. To become root simply run: Debian: su0 [9 g) m# n7 G7 B8 N9 X- @( k
Raspbian: sudo -i
% u y' F9 ^( y6 ]6 v$ k2 N6 AAll commands from this point onwards will be as root.
8 Y, E' K) x9 @* v* @3 I$ @; dSecurity-Enhanced LinuxThis guide is based on SELinux being disabled or in permissive mode. SELinux is not enabled by default on Debian. If you would like to see if it is installed run the following command: dpkg -l selinux*
0 D' B: G: u5 R2 }) r* h% Q' ~& L9 kPrerequisitesPerform these steps to install the pre-requisite packages. ===== 7.x / 8.x ===== apt-get update
# z7 I( S( U7 ]. napt-get install -y autoconf gcc libc6 make wget unzip apache2 apache2-utils php5 libgd2-xpm-dev. Y) Z/ X* b; h% r2 D7 e* q$ K
===== 9.x ===== apt-get update
' f7 a |& Q2 m, F) _; Bapt-get install -y autoconf gcc libc6 make wget unzip apache2 apache2-utils php libgd-dev
, U: f5 P1 ]+ V8 O5 y: DDownloading the Sourcecd /tmp
- j7 d4 D( J# k& f( }. A Pwget -O nagioscore.tar.gz https://github.com/NagiosEnterpr ... nagios-4.4.0.tar.gz
8 a% g2 u7 B# Z& z: Q/ s6 C* Jtar xzf nagioscore.tar.gz
4 C0 S2 F3 l" g' oCompilecd /tmp/nagioscore-nagios-4.4.0/$ L# {6 G+ E2 h# P8 {! }
./configure --with-httpd-conf=/etc/apache2/sites-enabled4 l+ i5 e+ I! t1 Q& h9 I
make all& K/ w, P/ J8 ]: Y! U. Z
Create User And GroupThis creates the nagios user and group. The www-data user is also added to the nagios group. make install-groups-users1 ^1 ]: `1 Z" |
usermod -a -G nagios www-data
7 j4 j# t8 t' i+ ~7 EInstall BinariesThis step installs the binary files, CGIs, and HTML files. make install" c( N! d4 D. ~4 X- I5 ]" i7 \; U
Install Service / DaemonThis installs the service or daemon files and also configures them to start on boot. make install-init+ ^! H5 {' C! F
Information on starting and stopping services will be explained further on. 7 X* J# M; v2 o: B+ c F
Install Command ModeThis installs and configures the external command file. make install-commandmode; h6 }: Q! n, F' s+ m
Install Configuration FilesThis installs the *SAMPLE* configuration files. These are required as Nagios needs some configuration files to allow it to start. make install-config
0 R8 e+ l+ p0 JInstall Apache Config FilesThis installs the Apache web server configuration files and configures the Apache settings. make install-webconf
0 b# T* k" \& h) qa2enmod rewrite' a! y9 A$ U4 q( p) z* K
a2enmod cgi3 `/ r- D4 n8 q
Configure FirewallYou need to allow port 80 inbound traffic on the local firewall so you can reach the Nagios Core web interface. iptables -I INPUT -p tcp --destination-port 80 -j ACCEPT* N5 z! ~3 x% a: j% G2 W `4 b4 m
apt-get install -y iptables-persistentAnswer yes to saving existing rules 4 Y k4 f* p. ]' u
Create nagiosadmin User AccountYou'll need to create an Apache user account to be able to log into Nagios. The following command will create a user account called nagiosadmin and you will be prompted to provide a password for the account. htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
8 f" Q6 N! o9 X4 }' VWhen adding additional users in the future, you need to remove -c from the above command otherwise it will replace the existing nagiosadmin user (and any other users you may have added).
$ H- O/ @5 o* y. F7 m4 [4 l. W8 w D8 c2 b/ l1 \* t! k
Start Apache Web Server===== 7.x ===== Need to restart it because it is already running. service apache2 restart
P. {* ^2 K& z) h' ]===== 8.x / 9.x ===== Need to restart it because it is already running. systemctl restart apache2.service
; A7 [. \0 o4 K) uStart Service / DaemonThis command starts Nagios Core. ===== 7.x ===== service nagios start, `/ ?8 H" K% i# |
===== 8.x / 9.x ===== systemctl start nagios.service' {) l8 t* M* S8 c9 q9 y
Test NagiosNagios is now running, to confirm this you need to log into the Nagios Web Interface. Point your web browser to the ip address or FQDN of your Nagios Core server, for example: http://10.25.5.143/nagios http://core-013.domain.local/nagios You will be prompted for a username and password. The username is nagiosadmin (you created it in a previous step) and the password is what you provided earlier. Once you have logged in you are presented with the Nagios interface. Congratulations you have installed Nagios Core. BUT WAIT ...Currently you have only installed the Nagios Core engine. You'll notice some errors under the hosts and services along the lines of: (No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_load, ...) failed. errno is 2: No such file or directory These errors will be resolved once you install the Nagios Plugins, which is covered in the next step.
% G7 j* }& V. P$ D; nInstalling The Nagios PluginsNagios Core needs plugins to operate properly. The following steps will walk you through installing Nagios Plugins. These steps install nagios-plugins 2.2.1. Newer versions will become available in the future and you can use those in the following installation steps. Please see the releases page on GitHub for all available versions.
$ X: P, ]$ f* N! @2 Q: `; a9 EPlease note that the following steps install most of the plugins that come in the Nagios Plugins package. However there are some plugins that require other libraries which are not included in those instructions. Please refer to the following KB article for detailed installation instructions:
. z' q3 n& |3 W1 I- |, x% `PrerequisitesMake sure that you have the following packages installed. apt-get install -y autoconf gcc libc6 libmcrypt-dev make libssl-dev wget bc gawk dc build-essential snmp libnet-snmp-perl gettext1 y2 g& T w9 p8 ^4 P% s w
Downloading The Sourcecd /tmp
; b; G/ X9 d3 y/ g% Cwget --no-check-certificate -O nagios-plugins.tar.gz https://github.com/nagios-plugin ... elease-2.2.1.tar.gz
( N3 q. y* o" }$ j& c$ c" Y4 Utar zxf nagios-plugins.tar.gz' X- c' M/ T8 i8 C- K \8 R
Compile + Installcd /tmp/nagios-plugins-release-2.2.1/
: |( c4 @( L8 C6 j) O3 D& M./tools/setup
+ `/ y' Z7 n* M, |1 u: [& i6 t2 M ~) ^./configure& d/ V1 W) S7 i! D. _' _
make. T5 j5 A! ]& P ~( t' d8 T
make install
/ u2 U+ }2 h1 f$ p! n) t: v( z2 PTest PluginsPoint your web browser to the ip address or FQDN of your Nagios Core server, for example: http://10.25.5.143/nagios http://core-013.domain.local/nagios Go to a host or service object and "Re-schedule the next check" under the Commands menu. The error you previously saw should now disappear and the correct output will be shown on the screen. . @. i; T$ [) l; ~) Y# L
Service / Daemon CommandsDifferent Linux distributions have different methods of starting / stopping / restarting / status Nagios. ===== 7.x ===== service nagios start6 z, d% \( O! A
service nagios stop
& C" I W$ {+ {- {service nagios restart
" y, z$ j) p& tservice nagios status! ]3 J8 W7 y' p- g! D: X
===== 8.x / 9.x ===== systemctl start nagios.service
- _1 @9 q! i6 L9 |systemctl stop nagios.service
! o! ]) @! c4 f5 dsystemctl restart nagios.service9 _5 l2 r* M5 O
systemctl status nagios.service# \1 |2 c8 y3 Z2 H! p$ q7 O
! {+ c& e! u. D8 A
6 S! C8 A7 s6 H2 O" }3 o7 _, p
Fedora Security-Enhanced LinuxThis guide is based on SELinux being disabled or in permissive mode. Steps to do this are as follows. sed -i 's/SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
& }" \. z1 R- j: p0 |setenforce 0
1 C" }8 \0 `+ n( aPrerequisitesPerform these steps to install the pre-requisite packages. dnf install -y gcc glibc glibc-common perl httpd php wget gd gd-devel/ ^0 e0 x* z& A. x
dnf update -y Downloading the Sourcecd /tmp' D* p8 _6 W) i
wget -O nagioscore.tar.gz https://github.com/NagiosEnterpr ... nagios-4.4.0.tar.gz" N/ L2 S$ e" B* X0 ~- B
tar xzf nagioscore.tar.gz& u/ `; w% N6 F
Compilecd /tmp/nagioscore-nagios-4.4.0/; u9 |8 e0 v2 \" h6 U$ b' u
./configure% f/ R- j' U4 ]2 j- s
make all
: [5 V) { S& y! i" X9 ]% nCreate User And GroupThis creates the nagios user and group. The apache user is also added to the nagios group. make install-groups-users( u7 b" y9 U; \+ o: L/ w
usermod -a -G nagios apache
1 T7 b& }9 F6 n q; v) Q W dInstall BinariesThis step installs the binary files, CGIs, and HTML files. make install2 k; B: B( p) m
Install Service / DaemonThis installs the service or daemon files and also configures them to start on boot. The Apache httpd service is also configured at this point. make install-init
/ I. C, {' @3 c3 m; e. A6 E# rsystemctl enable httpd.service
3 R! ~5 T8 k S' z3 [Information on starting and stopping services will be explained further on.
( G( p) n9 \) c4 y9 L2 \& E' PInstall Command ModeThis installs and configures the external command file. make install-commandmode9 I c9 Y( W9 P/ _0 ^# a- }3 n
Install Configuration FilesThis installs the *SAMPLE* configuration files. These are required as Nagios needs some configuration files to allow it to start. make install-config0 M! ?* H9 ]# G7 C
Install Apache Config FilesThis installs the Apache web server configuration files. Also configure Apache settings if required. make install-webconf; f+ b5 s* B8 z k C5 q% [; u/ Y
Configure FirewallYou need to allow port 80 inbound traffic on the local firewall so you can reach the Nagios Core web interface. firewall-cmd --zone=FedoraServer --add-port=80/tcp& u: [* G' ?; L+ ]1 e
firewall-cmd --zone=FedoraServer --add-port=80/tcp --permanent
, ^$ O# s# a. A9 c$ ~. a, nCreate nagiosadmin User AccountYou'll need to create an Apache user account to be able to log into Nagios. The following command will create a user account called nagiosadmin and you will be prompted to provide a password for the account. htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin6 t! ^1 T9 f6 @8 j e+ `9 d8 W( {
When adding additional users in the future, you need to remove -c from the above command otherwise it will replace the existing nagiosadmin user (and any other users you may have added). 3 e! b8 |3 U2 Y
6 x) {% Y2 X. F% iStart Apache Web Serversystemctl start httpd.service
$ e, [1 x; D' H ~' o' vStart Service / DaemonThis command starts Nagios Core. systemctl start nagios.service
" u2 _6 S4 ^% c' a( @0 D" i- F8 ?Test NagiosNagios is now running, to confirm this you need to log into the Nagios Web Interface. Point your web browser to the ip address or FQDN of your Nagios Core server, for example: http://10.25.5.143/nagios http://core-013.domain.local/nagios You will be prompted for a username and password. The username is nagiosadmin (you created it in a previous step) and the password is what you provided earlier. Once you have logged in you are presented with the Nagios interface. Congratulations you have installed Nagios Core. BUT WAIT ...Currently you have only installed the Nagios Core engine. You'll notice some errors under the hosts and services along the lines of: (No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_load, ...) failed. errno is 2: No such file or directory These errors will be resolved once you install the Nagios Plugins, which is covered in the next step. 8 u8 ?$ r4 X2 M+ |. j' U, [+ `1 ~
Installing The Nagios PluginsNagios Core needs plugins to operate properly. The following steps will walk you through installing Nagios Plugins. These steps install nagios-plugins 2.2.1. Newer versions will become available in the future and you can use those in the following installation steps. Please see the releases page on GitHub for all available versions.
& F% w0 C5 \, e' l$ TPlease note that the following steps install most of the plugins that come in the Nagios Plugins package. However there are some plugins that require other libraries which are not included in those instructions. Please refer to the following KB article for detailed installation instructions: ' @7 ~/ @, Z, _1 W9 t# z! E3 g
PrerequisitesMake sure that you have the following packages installed. dnf install -y gcc glibc glibc-common openssl-devel perl wget gettext make net-snmp net-snmp-utils perl-Net-SNMP automake autoconf; t9 V( {2 S3 O. u8 S; W
Downloading The Sourcecd /tmp% k! d- U0 g+ V8 i+ M) T
wget --no-check-certificate -O nagios-plugins.tar.gz https://github.com/nagios-plugin ... elease-2.2.1.tar.gz& s# p: d& I3 q* b* u
tar zxf nagios-plugins.tar.gz
7 o O- B4 w( G$ @Compile + Installcd /tmp/nagios-plugins-release-2.2.1/
6 `4 t5 X$ A# }2 U p9 r2 P./tools/setup
1 i4 K* l d2 w5 p6 d2 @$ X$ ?./configure; t8 d9 d* x+ ~; z8 y7 k
make
0 m! @ m6 c7 m8 }- ]3 R% S0 Omake install
4 r; g4 k( n* k) UTest PluginsPoint your web browser to the ip address or FQDN of your Nagios Core server, for example: http://10.25.5.143/nagios http://core-013.domain.local/nagios Go to a host or service object and "Re-schedule the next check" under the Commands menu. The error you previously saw should now disappear and the correct output will be shown on the screen. . M; ?& F2 W, ~
Service / Daemon CommandsThese commands are for starting / stopping / restarting / status Nagios. systemctl start nagios.service( f A0 e0 T2 }# D! S- i5 X
systemctl stop nagios.service
$ }2 X* X, n4 f- a! k* ksystemctl restart nagios.service: s4 |) W2 m+ _: t, R
systemctl status nagios.service! y2 ~0 r2 }% Z- c8 I
/ x( `; m4 x! f
Arch Linux Security-Enhanced LinuxThis guide is based on SELinux being disabled or in permissive mode. SELinux is not installed on a base build of Arch Linux. If you would like to see if it is enabled run the following command: ls -la /etc/selinux/configIf the file does not exist, SELinux is not enabled.
; q+ W" [7 `: Y* J2 M5 w$ l8 q7 |PrerequisitesPerform these steps to install the pre-requisite packages. pacman --noconfirm -Syyu
- I5 R% f c* K" C/ a( S; U7 spacman --noconfirm -S gcc glibc make wget unzip apache php gd traceroute php-apache Downloading the Sourcecd /tmp
% p8 K6 u, @6 J( S+ d7 l; |wget -O nagioscore.tar.gz https://github.com/NagiosEnterpr ... nagios-4.4.0.tar.gz
3 U( Y) _$ }; Atar xzf nagioscore.tar.gz
- X" R0 U/ c: g6 x% I0 xCompilecd /tmp/nagioscore-nagios-4.4.0/; u6 ^$ ~% `5 A' V
./configure --with-httpd-conf=/etc/httpd/conf/extra* Y. h% c6 P5 [# R) Z2 E
make all
' G2 j" W- K: E8 }- lCreate User And GroupThis creates the nagios user and group. The http user is also added to the nagios group. make install-groups-users8 L$ T0 b q# |7 [9 w) X8 y
usermod -a -G nagios http( V8 B, ?! h- j7 f q0 e! ~+ l
Install BinariesThis step installs the binary files, CGIs, and HTML files. make install
% e/ Y* B5 S& r- |Install Service / DaemonThis installs the service or daemon files and also configures them to start on boot. The Apache httpd service is also configured at this point. make install-init
: ], s" e0 V9 |+ H' D* Y% zsystemctl enable httpd.service0 V8 P# L' `' k" C
Install Command ModeThis installs and configures the external command file. make install-commandmode
5 z7 c2 B: o3 t) TInstall Configuration FilesThis installs the *SAMPLE* configuration files. These are required as Nagios needs some configuration files to allow it to start. make install-config: t% E, E* i! D( i' W
Install Apache Config FilesThis installs the Apache web server configuration files. make install-webconf
1 m- o: A2 u% B5 jAs well as installing the Apache web server configuration files, there are additional changes required to the Apache config file httpd.conf to enable modules. Commands that do all of these changes are below, but first is a list of the changes being made. Change this: LoadModule mpm_event_module modules/mod_mpm_event.soTo this: #LoadModule mpm_event_module modules/mod_mpm_event.so! Y' P) K# S) s0 |' V% y6 u- @
Change this: #LoadModule mpm_prefork_module modules/mod_mpm_prefork.soTo this: LoadModule mpm_prefork_module modules/mod_mpm_prefork.so+ I- X4 u1 F h4 T% t" i2 u D
Change this: <IfModule !mpm_prefork_module>0 J9 p, P& z. T! F
#LoadModule cgid_module libexec/apache24/mod_cgid.so
( Z. z% A' u. ~( C) O% T/ K* @$ k</IfModule>, K' N- i# C9 m. a8 `5 z3 o [9 x
<IfModule mpm_prefork_module>
! B, N/ m( Q2 h; v ` #LoadModule cgi_module libexec/apache24/mod_cgi.so v1 Q+ V& v* a' p O+ G6 s, X
</IfModule>To this: <IfModule !mpm_prefork_module>& H, X& y9 |% _ b+ t, \3 a
LoadModule cgid_module libexec/apache24/mod_cgid.so
* `; |0 T1 B) U$ S/ r4 q6 [* t- Y</IfModule>
5 ]% M+ C8 |& n. g% N<IfModule mpm_prefork_module>' S/ R; q, m3 h( N' \
LoadModule cgi_module libexec/apache24/mod_cgi.so
7 E3 j( ?4 o( m' y</IfModule>! B: t/ I5 E/ _5 Z2 N* o* C% @+ ^
Change this: <IfModule dir_module>
+ q8 w# r+ ?2 Z" k$ v" i# p DirectoryIndex index.html
9 C5 s* L- ~- e, S) A</IfModule>To this: <IfModule dir_module>4 U: F5 c3 J5 w" ~+ d
DirectoryIndex index.php index.html index.htm AddType application/x-httpd-php .phpAddType application/x-httpd-php-source .phps' j+ T/ E, B4 X2 h, v& _7 \* d
</IfModule>- Q( @) O2 x1 ^+ h
Add these lines to the end of the file: LoadModule php7_module modules/libphp7.so U- |7 {5 e% F5 \
Include "conf/extra/nagios.conf"
/ X8 N" w/ ~8 c7 U6 u1 U% P9 G5 fInclude "conf/extra/php7_module.conf". W' A6 B6 i! o% K
<FilesMatch ".php$">1 G l1 s8 T% p& v& V" d
SetHandler application/x-httpd-php
$ s# Z v3 P5 f- M</FilesMatch>! P: Z) w6 w. J( |' n) ^8 @9 f: t
<FilesMatch ".phps$">
+ ?& F* h: b* _ SetHandler application/x-httpd-php-source
+ `+ r: a3 I2 l- P1 ^: T4 y</FilesMatch>9 ?& I% R7 F& |1 D2 j
Execute the following commands to make the changes described above: sed -i 's/^LoadModule mpm_event_module modules\/mod_mpm_event\.so/#LoadModule mpm_event_module modules\/mod_mpm_event\.so/g' /etc/httpd/conf/httpd.conf
. \- b7 e% \. {' ]0 Z/ Qsed -i 's/^#LoadModule mpm_prefork_module modules\/mod_mpm_prefork\.so/LoadModule mpm_prefork_module modules\/mod_mpm_prefork\.so/g' /etc/httpd/conf/httpd.conf
! R& F& A" e5 Ksed -i 's/DirectoryIndex index.html/DirectoryIndex index.php index.html index.htm AddType application\/x-httpd-php .phpAddType application\/x-httpd-php-source .phps/g' /etc/httpd/conf/httpd.conf
; E8 `& ]& T% _* V, Y8 Ased -i 's/#LoadModule cgid_module/LoadModule cgid_module/g' /etc/httpd/conf/httpd.conf
% }- C5 Q) }7 @5 M# p9 p* L% R5 esed -i 's/#LoadModule cgi_module/LoadModule cgi_module/g' /etc/httpd/conf/httpd.conf# P) e* I; [* j. _& l" ^
echo 'LoadModule php7_module modules/libphp7.so' >> /etc/httpd/conf/httpd.conf0 |( E. `* g) j$ U
echo 'Include "conf/extra/nagios.conf"' >> /etc/httpd/conf/httpd.conf" Y( B& f& h1 K3 k5 P/ u5 T
echo 'Include "conf/extra/php7_module.conf"' >> /etc/httpd/conf/httpd.conf
7 @+ n) ~ c! f6 X# c& b' Wprintf '\n<FilesMatch ".php$">\n' >> /etc/httpd/conf/httpd.conf
' b/ C5 o4 U$ E1 tprintf '\tSetHandler application/x-httpd-php\n' >> /etc/httpd/conf/httpd.conf: c2 w2 d2 W- i" ~# Y. l
printf '</FilesMatch>\n' >> /etc/httpd/conf/httpd.conf4 b$ C2 n: e+ j4 C2 @+ l7 z
printf '<FilesMatch ".phps$">\n' >> /etc/httpd/conf/httpd.conf5 s8 X( o. ~4 }1 f" U! r8 P
printf '\tSetHandler application/x-httpd-php-source\n' >> /etc/httpd/conf/httpd.conf+ O) v) U% ]& h' z1 I
printf '</FilesMatch>\n' >> /etc/httpd/conf/httpd.conf, g9 F' K+ Z% V. P, ~0 a8 {) z
Configure FirewallArch Linux does not have a firewall enabled in a fresh installation. Please refer to the Arch Linux documentation on allowing TCP port 80 inbound. Create nagiosadmin User AccountYou'll need to create an Apache user account to be able to log into Nagios. The following command will create a user account called nagiosadmin and you will be prompted to provide a password for the account. htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
1 z3 U$ s2 M; bWhen adding additional users in the future, you need to remove -c from the above command otherwise it will replace the existing nagiosadmin user (and any other users you may have added). 8 ~0 Q* F1 I. e6 N H4 K
5 b) @) @ i+ {! c2 m6 X
Start Apache Web Serversystemctl start httpd.service. s/ s( }! n8 G* m: g
Start Service / DaemonThis command starts Nagios Core. systemctl start nagios.service
: k# e* N, ]3 W4 }! C3 o1 Z! oTest NagiosNagios is now running, to confirm this you need to log into the Nagios Web Interface. Point your web browser to the ip address or FQDN of your Nagios Core server, for example: http://10.25.5.143/nagios http://core-013.domain.local/nagios You will be prompted for a username and password. The username is nagiosadmin (you created it in a previous step) and the password is what you provided earlier. Once you have logged in you are presented with the Nagios interface. Congratulations you have installed Nagios Core. BUT WAIT ...Currently you have only installed the Nagios Core engine. You'll notice some errors under the hosts and services along the lines of: (No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_load, ...) failed. errno is 2: No such file or directory These errors will be resolved once you install the Nagios Plugins, which is covered in the next step.
* d/ \2 \$ P% P8 mInstalling The Nagios PluginsNagios Core needs plugins to operate properly. The following steps will walk you through installing Nagios Plugins. These steps install nagios-plugins 2.2.1. Newer versions will become available in the future and you can use those in the following installation steps. Please see the releases page on GitHub for all available versions.
7 Q0 Y' V& W J# m7 gPlease note that the following steps install most of the plugins that come in the Nagios Plugins package. However there are some plugins that require other libraries which are not included in those instructions. Please refer to the following KB article for detailed installation instructions:
5 T0 y% w: l; n8 A5 mPrerequisitesMake sure that you have the following packages installed. pacman --noconfirm -S autoconf gcc glibc make openssl wget perl gettext net-snmp perl-net-snmp automake autoconf
. h% K: ~6 n7 d/ LDownloading The Sourcecd /tmp0 ]& c5 ^; |& _5 p
wget --no-check-certificate -O nagios-plugins.tar.gz https://github.com/nagios-plugin ... elease-2.2.1.tar.gz+ M5 _) _ F( ]% ~. Z* E* _
tar zxf nagios-plugins.tar.gz
- M; E5 ~/ j' |0 [$ a' G- I! s2 VCompile + Installcd /tmp/nagios-plugins-release-2.2.1/
3 y( \/ {+ Z+ V5 q( X3 k" B( W./tools/setup9 M9 l& f7 t) |8 X. P/ f
./configure3 K% L# C! [4 w, Q+ [
make
7 z9 Y: K/ n9 i7 T5 E) smake install; m" ^9 E$ r+ u% r5 m8 n5 B
Test PluginsPoint your web browser to the ip address or FQDN of your Nagios Core server, for example: http://10.25.5.143/nagios http://core-013.domain.local/nagios Go to a host or service object and "Re-schedule the next check" under the Commands menu. The error you previously saw should now disappear and the correct output will be shown on the screen. % h; l: n; }+ i$ u" B N
Service / Daemon CommandsDifferent Linux distributions have different methods of starting / stopping / restarting / status Nagios. systemctl start nagios.service8 o' P: Q; s1 I8 v* W- H
systemctl stop nagios.service
0 c9 b0 O; z2 E; Q5 Esystemctl status nagios.service 3 [4 G9 I3 Q1 G, k7 a
! q- n, G: S2 x' u
/ W' M, G. H- P6 W; I% G7 QGentoo Security-Enhanced LinuxThis guide is based on SELinux being disabled or in permissive mode. SELinux is not installed on a base build of Gentoo. If you would like to see if it is enabled run the following command: ls -la /etc/selinux/configIf the file does not exist, SELinux is not enabled.
( a6 d8 q# N5 L% \PrerequisitesPerform these steps to install the pre-requisite packages. emerge --sync
! r# O# `5 w4 h9 F" xmkdir -p /etc/portage/package.use
& v& u/ `. B7 R7 _echo "www-servers/apache dir cgi cgid event prefork apache2_modules_version" >> /etc/portage/package.use/apache
/ ^0 G7 i5 o7 Pecho "dev-lang/php apache2" >> /etc/portage/package.use/php
6 k0 I+ t y2 j3 l' }3 Qecho "app-eselect/eselect-php apache2" >> /etc/portage/package.use/eselect-php
5 A( Z+ x, z. s: R" yecho "media-libs/gd gd png jpeg" >> /etc/portage/package.use/gd
# e% j- z% I$ o n; zemerge --noreplace sys-devel/gcc sys-libs/glibc net-misc/wget app-arch/unzip www-servers/apache dev-lang/php media-libs/gd Downloading the Sourcecd /tmp- U9 q: {, [/ l4 u. Q( r% @
wget -O nagioscore.tar.gz https://github.com/NagiosEnterpr ... nagios-4.4.0.tar.gz/ J8 B8 M3 w8 G4 |( w) g
tar xzf nagioscore.tar.gz6 [+ a5 Y5 X6 T+ m. R1 s
Compilecd /tmp/nagioscore-nagios-4.4.0/! u% v5 a& t3 e7 G: _; ^
./configure --with-httpd-conf=/etc/apache2/vhosts.d --sysconfdir=/usr/local/nagios/etc
+ t1 a% X% n, i- t( a8 V3 q B; Hmake all
S3 G+ X% b1 p8 fCreate User And GroupThis creates the nagios user and group. The http user is also added to the nagios group. make install-groups-users$ a4 H: v9 q; x/ G1 A5 J6 G
usermod -a -G nagios apache e9 Y# ]6 j+ `5 w; ^
Install BinariesThis step installs the binary files, CGIs, and HTML files. make install# t; b' G% U3 S$ c8 G6 D: `
Install Service / DaemonThis installs the service or daemon files and also configures them to start on boot. The apache2 service also needs to be configured to start at boot. ===== openrc ===== make install-init* d% M0 m/ m: {5 t2 F
rc-update add apache2 default- @( @( c% G$ c2 K
===== systemd ===== make install-init. I+ ~+ q {2 R/ Q& x8 `" q
systemctl enable apache2.service
. P# t0 u1 G$ ]5 q1 Z2 f: \Install Command ModeThis installs and configures the external command file. make install-commandmode
" `6 S1 p7 O7 A- X# OInstall Configuration FilesThis installs the *SAMPLE* configuration files. These are required as Nagios needs some configuration files to allow it to start. make install-config
7 A/ }4 u, U' C' t4 w, [+ DInstall Apache Config FilesThis installs the Apache web server configuration files. make install-webconf
, k1 F+ r; Y6 Y8 M) x. {' cAs well as installing the Apache web server configuration files, there are additional changes required to the Apache config file apache2 to enable modules. Commands that do all of these changes are below, but first is a list of the changes being made. In the file /etc/conf.d/apache2 change this: APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE"To this: APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP"$ ?* k3 N& f# T) _
The /run/apache_ssl_mutex directory also needs to be created.
( S: o1 Z+ u$ l# }3 s9 rExecute the following commands to make the change described above: sed -i '/^APACHE2_OPTS=/s/\([^"]*\)"$/\1 '"-D PHP"'"/' /etc/conf.d/apache2
' O4 O$ {" f, ^" y: j; zmkdir -p /run/apache_ssl_mutex
9 e; ~, P- b; |* d% M( Z2 DConfigure FirewallGentoo does not have a firewall enabled in a fresh installation. Please refer to the Gentoo documentation on allowing TCP port 80 inbound. Create nagiosadmin User AccountYou'll need to create an Apache user account to be able to log into Nagios. The following command will create a user account called nagiosadmin and you will be prompted to provide a password for the account. htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin3 z2 _, x$ H5 c! v+ G
When adding additional users in the future, you need to remove -c from the above command otherwise it will replace the existing nagiosadmin user (and any other users you may have added).
( [) T4 i# I" v& C+ {7 F
* N) ^# ^) k0 Q3 P( W! Z4 V. {Retart Apache Web Server===== openrc ===== rc-service apache2 restart8 y8 F: d* V* R: l7 \
===== systemd ===== systemctl restart apache2.service
# {6 _; G- N! g- p3 @+ |; {* _) mStart Service / DaemonThis command starts Nagios Core. ===== openrc ===== rc-service nagios start
2 I1 y3 a9 G4 z: Q% l% n===== systemd ===== systemctl start nagios.service4 W2 O! z; U2 b) {% m& w3 O# {9 E
Test NagiosNagios is now running, to confirm this you need to log into the Nagios Web Interface. Point your web browser to the ip address or FQDN of your Nagios Core server, for example: http://10.25.5.143/nagios http://core-013.domain.local/nagios You will be prompted for a username and password. The username is nagiosadmin (you created it in a previous step) and the password is what you provided earlier. Once you have logged in you are presented with the Nagios interface. Congratulations you have installed Nagios Core. BUT WAIT ...Currently you have only installed the Nagios Core engine. You'll notice some errors under the hosts and services along the lines of: (No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_load, ...) failed. errno is 2: No such file or directory These errors will be resolved once you install the Nagios Plugins, which is covered in the next step.
. t t8 ]& T0 O* \Installing The Nagios PluginsNagios Core needs plugins to operate properly. The following steps will walk you through installing Nagios Plugins. These steps install nagios-plugins 2.2.1. Newer versions will become available in the future and you can use those in the following installation steps. Please see the releases page on GitHub for all available versions. % b0 W/ I$ D' h* h- [
Please note that the following steps install most of the plugins that come in the Nagios Plugins package. However there are some plugins that require other libraries which are not included in those instructions. Please refer to the following KB article for detailed installation instructions: - Z- G. Z: [: Q1 F# V
PrerequisitesMake sure that you have the following packages installed. emerge --noreplace sys-devel/gcc sys-libs/glibc net-misc/wget sys-devel/make sys-devel/gettext sys-devel/automake sys-devel/autoconf dev-libs/openssl net-analyzer/net-snmp dev-perl/Net-SNMP0 R; ^% r9 f) \: K
Downloading The Sourcecd /tmp
7 i9 g& n' c/ c+ w/ @wget --no-check-certificate -O nagios-plugins.tar.gz https://github.com/nagios-plugin ... elease-2.2.1.tar.gz$ o5 F" ]* H$ e; Q. c; |
tar zxf nagios-plugins.tar.gz
7 n9 ]; |' O5 M1 G2 UCompile + Installcd /tmp/nagios-plugins-release-2.2.1/) D* B5 G. R7 O r _: { p) k
./tools/setup
, E8 l/ K: u$ \. Y./configure0 K. ]8 w% U6 M H4 ^* E
make
b4 ?& g/ j7 Y6 @) wmake install
' l. B( ~8 {5 uchmod u+s /bin/ping
* f0 V( o- K, P- l: R+ rchmod u+s /bin/ping6
- ?* ]$ l. E! p4 pTest PluginsPoint your web browser to the ip address or FQDN of your Nagios Core server, for example: http://10.25.5.143/nagios http://core-013.domain.local/nagios Go to a host or service object and "Re-schedule the next check" under the Commands menu. The error you previously saw should now disappear and the correct output will be shown on the screen. " ~1 h1 z8 b: m7 o. t4 l5 }# R# K
Service / Daemon CommandsThe different init systems have different methods of starting / stopping / restarting / status Nagios. ===== openrc ===== rc-service nagios start
) f% [% \* v* W9 prc-service nagios stop) w$ l5 A. a; t0 j I- ]! y
rc-service nagios status ~! [7 b4 o. @; ^
rc-service nagios restart
" c5 X9 }% H, y===== systemd ===== systemctl start nagios.service
9 M6 {4 b0 h% esystemctl stop nagios.service' U1 y! a$ U' W
systemctl status nagios.service
) d7 m, I% Z+ n5 p0 M7 r! Xsystemctl restart nagios.service' v/ z" ^' ]$ L. y" ~: A
4 f/ s5 R; I7 {# g$ c! }$ q' I
' D: t$ z; a0 T% k! r$ K
FreeBSD Security-Enhanced LinuxThis guide is based on SELinux being disabled or in permissive mode. SELinux is not enabled by default on FreeBSD. If you would like to see if it is enabled run the following command: ls -la /etc/selinux/configIf the file does not exist, SELinux is not enabled. , c7 A' ~: `* }! |: N! s0 J
PrerequisitesPerform these steps to install the pre-requisite packages. pkg install -y wget autoconf automake gmake gettext gcc apache24 php70 php70-extensions mod_php70 libgd Downloading the Sourcecd /tmp
3 c8 _2 ~7 o; [9 ^wget -O nagioscore.tar.gz https://github.com/NagiosEnterpr ... nagios-4.4.0.tar.gz8 g6 Z# V/ y c+ g _& h; s3 ]
tar xzf nagioscore.tar.gz/ I9 L6 S, v* G* J5 Z- p) M# ]: \0 }
Compilecd /tmp/nagioscore-nagios-4.4.0/5 w2 i) e5 ^, ^$ k& K
./configure --with-httpd-conf=/usr/local/etc/apache24/Includes1 q. Q& Y# e/ S& _
gmake all9 T, [/ N! j1 M6 Z) K2 X3 \* d
Create User And GroupThis creates the nagios user and group. The www user is also added to the nagios group. make install-groups-users) E# H2 V8 U- q( S% U
pw group mod nagios -m www) G# P' M) W+ C, W ~8 g& }! ]
Install BinariesThis step installs the binary files, CGIs, and HTML files. gmake install
* i* |+ o9 I5 M$ w$ g1 D( N- ichown nagios:nagios /usr/local/nagios/bin/*
3 S$ E0 k5 C2 v9 a- CInstall Service / DaemonThis installs the service or daemon files and also configures them to start on boot. gmake install-init
2 ?7 a9 _/ t; f4 c6 D Zecho '/usr/local/etc/rc.d/nagios start' >> /etc/rc.local
5 N; f) N1 O0 Q' S* v# g- IInformation on starting and stopping services will be explained further on. - {1 q+ [7 V+ e8 k: u
Install Command ModeThis installs and configures the external command file. gmake install-commandmode' c+ u" L0 \: M2 L7 v7 @2 W- s& c
Install Configuration FilesThis installs the *SAMPLE* configuration files. These are required as Nagios needs some configuration files to allow it to start. gmake install-config8 h, E" W! v) `$ V. M9 o1 }8 J: l
Install Apache Config FilesThis installs the Apache web server configuration files. gmake install-webconf
% Y+ }: t. Y5 y" ~. MAs well as installing the Apache web server configuration files, there are additional changes required to the Apache config file httpd.conf to enable modules. Commands that do all of these changes are below, but first is a list of the changes being made. Change this: <IfModule !mpm_prefork_module>" Q5 R" p; G% M. N, h; \! x
#LoadModule cgid_module libexec/apache24/mod_cgid.so
7 j) F" v0 v* w% B: W+ A5 X! a</IfModule>* I8 N H. ?+ T/ a& M! D( c
<IfModule mpm_prefork_module>3 B2 j* L' S$ T6 Q7 r. ~: I3 f7 Q
#LoadModule cgi_module libexec/apache24/mod_cgi.so) e- P1 A( ]7 A& b) n6 ]# {+ f
</IfModule>To this: <IfModule !mpm_prefork_module>
" n# Y! n6 v. T LoadModule cgid_module libexec/apache24/mod_cgid.so
+ c9 x4 S- i8 i8 K; i6 {</IfModule>
8 J8 U3 `- n4 Q, k6 ^/ N<IfModule mpm_prefork_module>) P) P" V9 y) U$ r
LoadModule cgi_module libexec/apache24/mod_cgi.so
) D: c* S2 v% c% O$ s+ v</IfModule>1 P8 w! Q- X* b' i0 v
Change this: <IfModule dir_module>
( A& Z, d" i( I& {6 z) ` DirectoryIndex index.html1 r; H" {% J9 j. a
</IfModule>To this: <IfModule dir_module>
3 V$ o5 O% ~# {$ u DirectoryIndex index.php index.html index.htm AddType application/x-httpd-php .phpAddType application/x-httpd-php-source .phps' I! R" @1 U$ M8 l( \
</IfModule>
$ Q; L7 ]. }) `; vAdd these lines to the end of the file: <FilesMatch ".php$">' }: m: E1 a: X0 A
SetHandler application/x-httpd-php6 a0 h- `) G; O) h5 T
</FilesMatch>
+ s' _! L) Q* Y+ [. o<FilesMatch ".phps$">& ]0 }8 y& O' V! {
SetHandler application/x-httpd-php-source, }* I! e' q, F7 r- c
</FilesMatch>
! m$ H8 G1 A; o: B# v" y# }Execute the following commands to make the changes described above: cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini
, i/ H% u2 U( ?' B. Becho 'apache24_enable="YES"' >> /etc/rc.conf
4 J C2 X* m# g- R/ Z2 o psed -i '' 's/DirectoryIndex index.html/DirectoryIndex index.php index.html index.htm AddType application\/x-httpd-php .phpAddType application\/x-httpd-php-source .phps/g' /usr/local/etc/apache24/httpd.conf
4 ]8 t6 R( U8 X$ tsed -i '' 's/#LoadModule cgid_module/LoadModule cgid_module/g' /usr/local/etc/apache24/httpd.conf
* |. O- K: R( W: Osed -i '' 's/#LoadModule cgi_module/LoadModule cgi_module/g' /usr/local/etc/apache24/httpd.conf8 `9 P8 n) W% \7 r% D0 j
printf '\n<FilesMatch ".php$">\n' >> /usr/local/etc/apache24/httpd.conf
: `) |/ h% |, j P" dprintf '\tSetHandler application/x-httpd-php\n' >> /usr/local/etc/apache24/httpd.conf# N; s2 @8 @5 C* A
printf '</FilesMatch>\n' >> /usr/local/etc/apache24/httpd.conf9 J0 x! i9 t8 `' K N! p r- O
printf '<FilesMatch ".phps$">\n' >> /usr/local/etc/apache24/httpd.conf p7 L' @3 \; Z; U& O; F6 R
printf '\tSetHandler application/x-httpd-php-source\n' >> /usr/local/etc/apache24/httpd.conf, q: y. {; |# j# ~1 _
printf '</FilesMatch>\n' >> /usr/local/etc/apache24/httpd.conf- ^) Q$ _2 R. H+ {: @7 E
Configure FirewallPlease refer to the FreeBSD documentation for information on how to enable or configure IP Filter to allow TCP port 80 inbound. 7 s/ _: J! U5 v) P( A. q
7 {! ~& n! e9 y0 F& z6 y! i6 VCreate nagiosadmin User AccountYou'll need to create an Apache user account to be able to log into Nagios. The following command will create a user account called nagiosadmin and you will be prompted to provide a password for the account. htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
0 D6 w( M0 W- P. ~/ BWhen adding additional users in the future, you need to remove -c from the above command otherwise it will replace the existing nagiosadmin user (and any other users you may have added).
; g: z4 P+ h/ C# E" @# e2 b+ E/ x
Start Apache Web Serverservice apache24 start" [, k8 D( X) A" L# ?" t! _' j( B
Start Service / DaemonThis command starts Nagios Core. service nagios start
$ ?4 v/ N! B: Q, {7 [ x) m: q9 x& bTest NagiosNagios is now running, to confirm this you need to log into the Nagios Web Interface. Point your web browser to the ip address or FQDN of your Nagios Core server, for example: http://10.25.5.143/nagios http://core-013.domain.local/nagios You will be prompted for a username and password. The username is nagiosadmin (you created it in a previous step) and the password is what you provided earlier. Once you have logged in you are presented with the Nagios interface. Congratulations you have installed Nagios Core. BUT WAIT ...Currently you have only installed the Nagios Core engine. You'll notice some errors under the hosts and services along the lines of: (No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_load, ...) failed. errno is 2: No such file or directory These errors will be resolved once you install the Nagios Plugins, which is covered in the next step.
# V! e8 _1 `6 z9 q, nInstalling The Nagios PluginsNagios Core needs plugins to operate properly. The following steps will walk you through installing Nagios Plugins. These steps install nagios-plugins 2.2.1. Newer versions will become available in the future and you can use those in the following installation steps. Please see the releases page on GitHub for all available versions.
7 M& a6 ^/ L/ o5 l& gPlease note that the following steps install most of the plugins that come in the Nagios Plugins package. However there are some plugins that require other libraries which are not included in those instructions. Please refer to the following KB article for detailed installation instructions:
3 C4 q% ^3 G G" H/ NPrerequisitesMake sure that you have the following packages installed. In the steps below, when installing FreeBSD packages you will be prompted with screens asking what you would like installed. You can just press Enter to accept the default selections. pkg install -y wget autoconf automake gettext gcc openssl-devel net-snmp p5-Net-SNMP-Util
: h: V: i! I h) K4 ODownloading The Sourcecd /tmp0 E& H3 u. @ {( V" |
wget --no-check-certificate -O nagios-plugins.tar.gz https://github.com/nagios-plugin ... elease-2.2.1.tar.gz
q8 E. Q1 f/ }tar zxf nagios-plugins.tar.gz
4 |- ]: x( A' u3 ICompile + Installcd /tmp/nagios-plugins-release-2.2.1/
" T6 p/ }) `5 F0 G( |' q4 d& |; N( C./tools/setup
8 j8 {+ r7 E$ a. s! \./configure! O6 C1 E P: }+ ]8 B9 g
gmake
( [, g1 u1 x1 M! _9 S8 X7 r5 Vgmake install6 G2 s& i% M! `
Test PluginsPoint your web browser to the ip address or FQDN of your Nagios Core server, for example: http://10.25.5.143/nagios http://core-013.domain.local/nagios Go to a host or service object and "Re-schedule the next check" under the Commands menu. The error you previously saw should now disappear and the correct output will be shown on the screen. % j7 C, L$ l! n# R' X
Service / Daemon CommandsDifferent Linux distributions have different methods of starting / stopping / restarting / status Nagios. service nagios start# m1 y! ]: t3 {- }9 |$ t( b
service nagios stop5 {5 C% H, Z7 _9 l5 i
service nagios restart
; M* G: |/ m+ ?4 fservice nagios status
9 x) E# [+ f+ G ?
# S, v4 t6 E# k4 E- Q! \5 y& u- ]: P& `# K
Solaris Tested with Solaris 11.
5 V! E) Y! w1 a; E6 tSecurity-Enhanced LinuxSELinux is not implemented in Solaris and hence is not an issue. PrerequisitesPerform these steps to install the pre-requisite packages. echo 'export PATH=$PATH:/opt/csw/bin:/usr/xpg4/bin:/usr/sfw/bin' >> ~/.profile
7 a \! d0 j. }7 M8 msource ~/.profile
+ v( W. ~' P& J/ ^pkgadd -d http://get.opencsw.org/now
' J' l6 O X+ S* O3 ganswer all
) {5 u" T4 Z+ [7 canswer y
7 \' ]" q7 B6 x* p% `3 C- B: @perl -ni.bak -le 'print; print "mirror=http://mirrors.ibiblio.org/opencsw/stable" if /mirror=/' /etc/opt/csw/pkgutil.conf
$ b' t' ]& B: j' E; Npkgutil -y -i autoconf automake unzip gd
- r3 z. F8 s( ]: @pkg install gcc-45 web/php-53 apache-php53 gd Downloading the Sourcecd /tmp
/ b b" J- F7 g& w* R" F, Kwget -O nagioscore.tar.gz https://github.com/NagiosEnterpr ... nagios-4.4.0.tar.gz( p1 P' m# Z Y; C* p
tar xzf nagioscore.tar.gz C& Y7 @+ i, k& f% V8 B
Compilecd /tmp/nagioscore-nagios-4.4.0/* e9 n! B& a4 v: s0 D' V3 U
./configure --with-httpd-conf=/etc/apache2/2.2/conf.d --with-gd-inc=/usr/include/gd26 w8 ^; H' P/ y' y' h
gmake all
6 @ Y( s8 L. Q( |& NCreate User And GroupThis creates the nagios user and group. The webservd user is also added to the nagios group. gmake install-groups-users
0 a, y0 o* Q' {- A e& O, W9 f7 m7 Tusermod -G nagios webservd/ p3 X4 R- }* ?/ ] H5 B
Install BinariesThis step installs the binary files, CGIs, and HTML files. gmake install
1 r8 n- N1 y. A( d2 p* t/ S7 ?Install Service / DaemonThis installs the service or daemon files and also configures them to start on boot. The Apache httpd service is also configured at this point. gmake install-init& }. q# A% e( x% P
svcbundle -o /lib/svc/manifest/site/nagios.xml -s service-name=application/nagios -s rc-script=/etc/init.d/nagios:2 -s model=contract
$ g! u( O9 B7 R- rInformation on starting and stopping services will be explained further on. 2 V! r9 x; ]; @: i
Install Command ModeThis installs and configures the external command file. gmake install-commandmode2 r2 q, |* n# a/ C4 v1 o
Install Configuration FilesThis installs the *SAMPLE* configuration files. These are required as Nagios needs some configuration files to allow it to start. gmake install-config
5 \" P! R# J( _4 UInstall Apache Config FilesThis installs the Apache web server configuration files. Also configure Apache settings if required. gmake install-webconf
- f6 w8 ~2 J r$ x! W; V0 mConfigure FirewallOn a manually networked system, IP Filter is not enabled by default. Please refer to the Solaris documentation for information on how to enable or configure IP Filter to allow TCP port 80 inbound.
$ P& c7 v# o! ~) f! uCreate nagiosadmin User AccountYou'll need to create an Apache user account to be able to log into Nagios. The following command will create a user account called nagiosadmin and you will be prompted to provide a password for the account. htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin! Z0 L/ Z" k$ w. L/ W4 B; I
When adding additional users in the future, you need to remove -c from the above command otherwise it will replace the existing nagiosadmin user (and any other users you may have added).
' x& t/ p( W5 y) c8 ^, ?, Y% f/ A6 Y8 d$ W( ^) W6 q% b
Start Apache Web Serversvcadm enable apache22
. p2 c- m6 {- F- V8 lStart Service / DaemonThis command starts Nagios Core. svcadm restart manifest-import
; o! C: Z/ K( t! B4 E. U T, usvcadm enable nagios
: w2 C" m9 U/ s% c1 ^Test NagiosNagios is now running, to confirm this you need to log into the Nagios Web Interface. Point your web browser to the ip address or FQDN of your Nagios Core server, for example: http://10.25.5.143/nagios http://core-013.domain.local/nagios You will be prompted for a username and password. The username is nagiosadmin (you created it in a previous step) and the password is what you provided earlier. Once you have logged in you are presented with the Nagios interface. Congratulations you have installed Nagios Core. BUT WAIT ...Currently you have only installed the Nagios Core engine. You'll notice some errors under the hosts and services along the lines of: (No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_load, ...) failed. errno is 2: No such file or directory These errors will be resolved once you install the Nagios Plugins, which is covered in the next step. 9 y% F% R- e, A0 n8 Y. w+ B
Installing The Nagios PluginsNagios Core needs plugins to operate properly. The following steps will walk you through installing Nagios Plugins. These steps install nagios-plugins 2.2.1. Newer versions will become available in the future and you can use those in the following installation steps. Please see the releases page on GitHub for all available versions.
p @" A/ r, O' H0 {Please note that the following steps install most of the plugins that come in the Nagios Plugins package. However there are some plugins that require other libraries which are not included in those instructions. Please refer to the following KB article for detailed installation instructions:
( Z! t5 c1 T" S$ C6 |( s' m" C" CPrerequisitesAlready completed as part of the Nagios installation. Some of the plugins require the NET::SNMP perl module. Please refer to the following documentation: 6 y( ]# l4 w. P) ]* M: ~) f! Q
Downloading The Sourcecd /tmp6 U. w H' [9 k; N# W8 _
wget --no-check-certificate -O nagios-plugins.tar.gz https://github.com/nagios-plugin ... elease-2.2.1.tar.gz' t& L9 ?! W0 |7 g) B# e5 S! n
tar zxf nagios-plugins.tar.gz6 }( X# u% u, t# d& Q% Z8 I" e
Compile + Installcd /tmp/nagios-plugins-release-2.2.1/
: U I2 T( A' F& q6 T./tools/setup
9 D0 [$ W( {& e! ]$ Y8 S./configure9 ]1 m S3 q/ |% o6 a
gmake, U6 g2 d& U! w3 j) B
gmake install+ X) p2 z; P) r5 C" b/ g, ?9 o2 {4 o4 W
Test PluginsPoint your web browser to the ip address or FQDN of your Nagios Core server, for example: http://10.25.5.143/nagios http://core-013.domain.local/nagios Go to a host or service object and "Re-schedule the next check" under the Commands menu. The error you previously saw should now disappear and the correct output will be shown on the screen. 1 ]. V3 v% Z/ `6 r" s' Y
Service / Daemon CommandsThese commands are for starting / stopping / restarting / status Nagios. svcadm enable nagios. H# ^" w/ F; D3 k x
svcadm disable nagios% p: ^2 i! n9 b! i
svcadm restart nagios
; ` n% }% u8 x2 X# J& w( M5 O2 B: p0 Esvcs nagios
' ], I" r: c$ I5 Nsvcs -xv nagios/ H- y4 a/ H7 q2 ?9 Q5 c8 r
svcadm clear nagios
' L; C4 Y- k) X2 z# jThe following KB article has important information on Solaris and services:
. |" J4 g) |5 d# J0 c1 K5 f% n* x8 o* ^' h) v3 P7 {* O* j" I g
8 t9 W7 E6 {( m, J/ s. @; @3 MApple OS X Security-Enhanced LinuxSELinux is not implemented in Apple OS X and hence is not an issue. & P8 J; t8 c# O7 V: ^# n; H
PrerequisitesFirst, make sure Xcode is installed. If it is not installed visit the App Store and install Xcode (3.8GB download). Then you need to download and install MacPorts, instructions for doing this can be found here: Once you've done this, follow these steps in a terminal session: sudo xcodebuild -license) M0 ]2 b/ D- c# A; ? Y
View the agreement and then type agree6 l8 ~, |9 R, M+ j. Z
sudo xcode-select --installYou will be prompted on your Mac display to install the component, click install Click Agree Wait while it is downloaded and installed Continue in your terminal session (you may need to close and open your terminal session): sudo /opt/local/bin/port install zlib libpng jpeg gd2 apache2 php70 php70-apache2handler2 p) j0 m4 X' `! j2 Q
Downloading the Sourcecd /tmp
2 V- Y* z* N6 ^+ Z! kcurl -L -o nagioscore.tar.gz https://github.com/NagiosEnterpr ... nagios-4.4.0.tar.gz
2 X# O& r, B. Q8 q2 I! ptar xzf nagioscore.tar.gz
' [7 p, S0 s' j6 X1 dCompilecd /tmp/nagioscore-nagios-4.4.0/, z6 ^ O& K+ @0 w8 w( q* X
sudo ./configure --with-httpd-conf=/opt/local/apache2/conf/extra --with-gd-lib=/opt/local/lib --with-gd-inc=/opt/local/include
. D* D3 l0 m* H9 D& }, Dsudo make all3 K5 e- i3 r7 x8 ~: D! `
Create User And GroupCurrently Nagios Core does not have a built in script for creating the nagios user and group. However NRPE v3 does have this script, so we're going to download it and run it which makes things easy. sudo make install-groups-users
7 h0 t7 e8 V, a0 p+ E; ~5 U- D0 csudo dseditgroup -o edit -a _www -t user nagios
# J( Q+ |* W, e1 G& N& o0 j/ \& x7 UInstall BinariesThis step installs the binary files, CGIs, and HTML files. sudo make install; R. C1 _: P( ]( S
Install Service / DaemonThis installs the script in /etc/rc.d/init.d/nagios which is not the correct way it should be run in OS X however a native OS X launch script does not exist in this version of Nagios Core. sudo make install-init
$ f/ j; L$ C+ O0 B& V; e, l3 VYou will configure it to start at boot using a Global Daemon property list. Open the vi text editor with the following command: sudo vi /Library/LaunchDaemons/org.nagios.nagios.plistThis creates a new file. Press i on the keyboard to enter insert mode. Paste the following into the vi editor: <?xml version="1.0" encoding="UTF-8"?>
+ B; }, i. r3 Y' W; \<!DOCTYPE plist PUBLIC "-//Apple/DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
: t$ G0 C& H6 W5 ?5 i<plist version="1.0">
: \7 X! q* J7 q% u5 ~# j0 ?<dict>
" T$ O. P$ v1 ^% i+ ^' V! M. [; h <key>Label</key>+ w+ y( j5 w" L Q- a7 b
<string>org.nagios.nagios</string>
' j* S; n* `" y <key>UserName</key>- Q9 r q6 r- [, l$ k
<string>nagios</string>9 Z+ x! E& w: h* ^) ]6 Y
<key>GroupName</key>+ a, @- H' ~1 e) F
<string>nagios</string>$ s, |3 G. S$ f
<key>Program</key>
$ u3 }' E' l2 j( N$ t6 x <string>/etc/rc.d/init.d/nagios</string>( D4 P) J. Q8 y
<key>ProgramArguments</key>
0 r) }$ J% @% E2 q% T" f <array>. b+ _, k* k. z; j- u9 O
<string>nagios</string>1 p# ^2 K# n m; A0 o
<string>start</string>1 X- s, G3 ]5 F6 m% }) W
</array>
T" V+ r6 i! \0 j; C <key>KeepAlive</key>
# o* G* N+ X- ~. A# _ <dict>; T: T3 N+ r8 \) i
<key>SuccessfulExit</key>
- N& \$ l. `- N: C* {: o2 p <false/>
9 @' e. {) m1 K( e1 K, F. d <key>NetworkState</key> V6 Z5 x0 Y( z8 p; E3 i
<true/>
4 D8 A K% G- f) K' P d) @+ l </dict>
" K4 k; r) n7 W$ x* S/ u1 n <key>RunAtLoad</key>
8 O" ]% Q/ H0 P4 F <true/>
4 A8 N, o" k0 h) w <key>ProcessType</key>& y9 E7 s5 c" c( r( O
<string>Background</string>3 p; v- D d' ~! i/ G" g1 T* K
</dict>3 D7 S% I$ V( z, }# v; f/ f L6 k
</plist>5 r0 d9 G5 ?) g w" m
Press escape on the keyboard to exit insert mode. Type :wq on the and press Enter. The file has been saved and Nagios will automatically start on the next boot. ) d& e; i6 ^* s+ \% L
Information on starting and stopping services will be explained further on. % R! p* V0 a, ]* g j# P9 Q
Install Command ModeThis installs and configures the external command file. sudo make install-commandmode8 w) F/ ?! L' y1 \
Install Configuration FilesThis installs the *SAMPLE* configuration files. These are required as Nagios needs some configuration files to allow it to start. sudo make install-config
5 v3 s: z, g8 kInstall Apache Config FilesThis installs the Apache web server configuration files. sudo make install-webconf% [0 w; F6 e Q$ `. Y( L7 p
As well as installing the Apache web server configuration files, there are additional changes required to the Apache config file httpd.conf to enable modules. Commands that do all of these changes are below, but first is a list of the changes being made. Change this: <IfModule dir_module>
8 _; y3 \9 D8 T% l3 k8 D* J, x DirectoryIndex index.html2 s" h m( H+ V- c
</IfModule>To this: <IfModule dir_module>2 ]/ `3 W* R; z8 Y/ T1 T8 B7 |
DirectoryIndex index.php index.html index.htm AddType application/x-httpd-php .phpAddType application/x-httpd-php-source .phps7 c2 s% W' l" t t* T( |* a o
</IfModule>8 n6 C6 @% @7 K* g3 a, C( e
Add these lines to the end of the file: Include conf/extra/nagios.conf
9 ~; ~2 i) B1 s6 H( C% XInclude conf/extra/mod_php70.conf" H, }4 a ?* J: A5 Q E
Execute the following commands to make the changes described above: sudo cp /opt/local/etc/php70/php.ini-production /opt/local/etc/php70/php.ini
B" Y; o+ {. d& [cd /opt/local/apache2/modules/
+ S7 B6 U# s( @' Psudo /opt/local/apache2/bin/apxs -a -e -n php7 mod_php70.so
3 y7 o+ x- j7 X0 t; i* kprintf '\nInclude conf/extra/nagios.conf\n' | sudo tee -a /opt/local/apache2/conf/httpd.conf
; u# O- h v5 A9 k# Q1 zprintf '\nInclude conf/extra/mod_php70.conf\n' | sudo tee -a /opt/local/apache2/conf/httpd.conf8 |1 D. r+ h5 X& _+ o
sudo sed -i '' 's/DirectoryIndex index.html/DirectoryIndex index.php index.html index.htm AddType application\/x-httpd-php .phpAddType application\/x-httpd-php-source .phps/g' /opt/local/apache2/conf/httpd.conf+ X7 S2 a# X0 Q3 N
Configure FirewallThe firewall in OS X is turned off by default. Please refer to the Apple documentation for information on how to enable or configure TCP port 80 inbound.
: y; ^- d. [; G+ nCreate nagiosadmin User AccountYou'll need to create an Apache user account to be able to log into Nagios. The following command will create a user account called nagiosadmin and you will be prompted to provide a password for the account. sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
6 G# K; _9 _, _' q5 p) c0 WWhen adding additional users in the future, you need to remove -c from the above command otherwise it will replace the existing nagiosadmin user (and any other users you may have added). 8 K! @2 ?9 G+ Z: m9 z8 V0 P. x+ j" B$ A
5 |% C& Y# ^; b2 _% J
Start Apache Web Serversudo /opt/local/bin/port load apache2) `9 C0 ? c- r. j2 K7 s
Start Service / DaemonThis command starts Nagios Core. sudo /etc/rc.d/init.d/nagios start# w% T, t7 a4 u
Test NagiosNagios is now running, to confirm this you need to log into the Nagios Web Interface. Point your web browser to the ip address or FQDN of your Nagios Core server, for example: http://10.25.5.143/nagios http://core-013.domain.local/nagios You will be prompted for a username and password. The username is nagiosadmin (you created it in a previous step) and the password is what you provided earlier. Once you have logged in you are presented with the Nagios interface. Congratulations you have installed Nagios Core. BUT WAIT ...Currently you have only installed the Nagios Core engine. You'll notice some errors under the hosts and services along the lines of: (No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_load, ...) failed. errno is 2: No such file or directory These errors will be resolved once you install the Nagios Plugins, which is covered in the next step. ) l6 b& }, K" Z# E+ x7 n% Z$ n9 X; M
Installing The Nagios PluginsNagios Core needs plugins to operate properly. These steps are going to install the Nagios Plugins that are available via MacPorts. Future versions of the Nagios Plugins package will be updated to support OS X, until then the version available via MacPorts will be fine. These get installed to /opt/local/libexec/nagios/ so the /usr/local/nagios/etc/resource.cfg file also needs to be updated and Nagios restarted (covered in the steps below). sudo /opt/local/bin/port install nagios-plugins
& ]7 ]7 D( E) @$ w9 Fsudo sed -i '' 's/\/usr\/local\/nagios\/libexec/\/opt\/local\/libexec\/nagios/g' /usr/local/nagios/etc/resource.cfg
- o5 V T- C2 O. g. ^sudo /etc/rc.d/init.d/nagios stop0 s) x: {' |- Z
sudo /etc/rc.d/init.d/nagios start
4 y, ?, K. c' l! \& X' u7 u/ b* u {Test PluginsPoint your web browser to the ip address or FQDN of your Nagios Core server, for example: http://10.25.5.143/nagios http://core-013.domain.local/nagios Go to a host or service object and "Re-schedule the next check" under the Commands menu. The error you previously saw should now disappear and the correct output will be shown on the screen.
1 ~* M- ~% s3 y" Z) gService / Daemon CommandsThese commands are for starting / stopping / restarting / status Nagios. sudo /etc/rc.d/init.d/nagios start
p0 M) @; \& c' A2 b0 A" o( R7 x; Dsudo /etc/rc.d/init.d/nagios stop
$ R4 v3 Y) d7 n5 N( A3 J! tsudo /etc/rc.d/init.d/nagios restart
6 I$ I& p- P: X6 ]" E- [0 H8 Bsudo /etc/rc.d/init.d/nagios status
. ^! m1 l3 t' I7 G. @
0 m6 T+ _/ N4 |
/ q {. @! t7 E9 G" _' X# E
+ g% y* j$ I: X# P* l- j: CFinal Thoughts[url=]http://support.nagios.com/forum/[/url]
6 Z, m( ^/ d$ W, D# a! l D0 c3 O |