GICT knowledge base
Nagios Monitoring Tool.
Published
Nagios is a network monitoring tool designed with scalability and flexibility. Nagios is a free powerful open source monitoring tool that provides instant alert so can be fixed quickly. Nagios was designed for Linux operating systems, but it will also work under Unix-based systems. Nagios monitors all the resources such as memory usage, disk usage, load on processor, currently running processes and log files. And it also monitors the services on server such as SMTP, HTTP, IMAP, POP, etc. The Nagios monitoring tool provides a user-friendly Web-based graphical user interface. It also provides an authorization system for administrator to restrict the access. Nagios has proven popular among small business, educational institution, government agencies, health care institutions, etc.
Advantages of Nagios
1) Enhanced Auto Discovery Features.
2) Determine unresponsive machine and alert staff immediately.
3) Comprehensive Reports.
4) Increased server, services, and application availability.
5) Fast detection of network outages and protocol failures.
Nagios Dependencies
Initially install all the dependencies of Nagios monitoring tool to avoid errors while the installation steps. You can install all the dependencies using yum package manager.
# yum install gd gd-devel httpd php gcc glibc glibc-common openssl
System Information
Operating System: CentOS 6.4
Arch: x86_64
Nagios Version: 3.5.0
My Server IP address: 192.168.56.101
Pre-installation steps
Before starting the installation of Nagios on your server, we have to done some steps.
1) Login as root user to system. And install Epel repository rpm with the below command.
# wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm
2) Disable SELinux on the system.
# vim /etc/sysconfig/selinux
Change SELINUX=enforcing to SELINUX=disabled.
Also stop firewall iptables service.
# /etc/init.d/iptables stop
Installation steps
1) Install the Nagios monitoring tool by using yum package manager.
# yum install nagios nagios-devel nagios-plugins*
2) By default, yum install Nagios, cgi.cfg file contains authorized username ‘nagiosadmin’ and for htpasswd file /etc/nagios/passwd file is used. Generate a password for the user nagiosadmin by using the below command. (by default, the user is nagiosadmin and the password is also nagiosadmin)
# htpasswd -c /etc/nagios/passwd nagiosadmin
GiveAlphanumericPassword
3) Check the /etc/nagios/cgi.cfg file for the given values.
# vi /etc/nagios/cgi.cfg
# AUTHENTICATION USAGE
use_authentication=1
# SYSTEM/PROCESS INFORMATION ACCESS
authorized_for_system_information=nagiosadmin
# CONFIGURATION INFORMATION ACCESS
authorized_for_configuration_information=nagiosadmin
# SYSTEM/PROCESS COMMAND ACCESS
authorized_for_system_commands=nagiosadmin
# GLOBAL HOST/SERVICE VIEW ACCESS
authorized_for_all_services=nagiosadmin
authorized_for_all_hosts=nagiosadmin
# GLOBAL HOST/SERVICE COMMAND ACCESS
authorized_for_all_service_commands=nagiosadmin
authorized_for_all_host_commands=nagiosadmin
4) For accessing admin user through http, check the contents of nagios.conf file on /etc/httpd/conf.d/ directory. You can check it by using the below given command.
# cat /etc/httpd/conf.d/nagios.conf
5) Start the httpd service and nagios service by using the following commands.
# /etc/init.d/httpd start
# /etc/init.d/nagios start
You can access the Nagios monitoring tool via browser through the url:
http://nagios_server_ip-address/nagios
Provide the exact username=nagiosadmin and password to access the nagios tool.
If you need any further assistance please contact our support department.
Related guides
GDPR Compliance for Websites: A Practical Guide for Developers
This guide breaks down GDPR compliance for websites, helping you create secure, transparent sites where privacy thrives.
MiscellaneousThe Beginner’s Guide to Understanding Object Relational Mapping (ORM)
This article provides a comprehensive overview of Object Relational Mapping (ORM), explaining what it is, how it works, and why it is important in modern software...
Miscellaneous5 Best Online tools to Compress and Optimize your Images
Here is the list of the 5 best Image optimization tools available online. Use these tools to compress your images without losing quality.
MiscellaneousHow to Boot Up Your Server on an OVH Kernel
In this tutorial, we can check how to boot up your server on an OVH Kernel. A kernel is responsible for interfacing the operating system and applications
