Nagios Core Part 1: Server (CentOS) and Client (Linux & Windows) Setup Tutorial
A tutorial on how to configure Nagios Core server and clients (Linux and Windows). Nagios Core is a monitoring and alerting software package that notify system administrators of any system or server issues.
Download Nagios Core: http://nag.is/coresys
Download Nagios XI: http://nag.is/xisys
Download Nagios Plugins: http://nag.is/plugsys
Website: https://www.nagios.com
WATCH PART 2: https://youtu.be/wKXVz_9GDbM
Thank you for watching!! Please let me know how you are using Nagios XI or Core in your environment.
Please subscribe to get updates on new videos :)
Twitter: sysadmgirl
Facebook: sysadmgirl
Prerequisites
yum install httpd php gcc glibc glibc-common gd gd-devel
Accounts:
/usr/sbin/useradd -m nagios
passwd nagios
/usr/sbin/groupadd nagcmd # Used for Web Interface
/usr/sbin/usermod -a -G nagcmd nagios
/usr/sbin/usermod -a -G nagcmd apache
Download source code
wget https://sourceforge.net/projects/nagios/files/nagios-4.x/nagios-4.1.1/nagios-4.1.1.tar.gz
wget http://www.nagios-plugins.org/download/nagios-plugins-2.1.1.tar.gz
Extract the Nagios source code tarball.
tar -xvzf nagios-4.1.1.tar.gz
cd nagios-4.1.1
Run the Nagios configure and compile source code
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
vi /usr/local/nagios/etc/objects/contacts.cfg
Change email address assoicated with install
Nagios web config file
make install-webconf
nagiosadmin account for Nagios web interface
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
service httpd restart
Install the Nagios Plugins
tar xzf nagios-plugins-2.1.1.tar.gz
cd nagios-plugins-2.1.1
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
Add Nagios services
chkconfig --add nagios
chkconfig nagios on
Verify the sample Nagios configuration files.
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
service nagios start
Check SELinux
getenforce
Change to permissive mode.
setenforce 0
Modifiy /etc/selinux/config for system to remain in permission mode
OR modifiy selinux permissions to allow nagios
chcon -R -t httpd_sys_content_t /usr/local/nagios/sbin/
chcon -R -t httpd_sys_content_t /usr/local/nagios/share/
Log into Nagios web interface
username: nagiosadmin
password: set with htpasswd util
http://localhost/nagios/
iptables
modify /etc/sysconfig/iptables to allow 80 & 443