Nagios is an open source monitoring tool that helps us monitor services and applications running on Windows, Linux, routers, and other network devices.
Â
With the help of Nagios, you can monitor basic services and features. We can access Nagios using the web interface that comes with bundles and configurations and this should be done at the file level.
Services List
This Tutorial describes how you can monitor private services and attributes of Linux/UNIX servers, such as:
Attributes
- CPU load
- Memory usage
- Disk usage
- Logged in users
- Running processes
- etc.
Private Services
- HTTP
- FTP
- SSH
- SMTP
- etc Â
Prerequisites
Before installing Nagios, the system needs to meet the requirements for installing Nagios. To install the Web Server (httpd), PHP, compilers, and development libraries.
Install all packages in a single command.
Create a Nagios user and nagcmd group for allowing the external commands to be executed through the web interface, add the Nagios and apache user to be a part of the nagcmd group.
Install Nagios Server
Download the latest version of Nagios Core using the terminal.
Compile and Install Nagios.
Install Nagios Web Interface
Install the Nagios web configuration using the following command.
Run the following command to install a Nagios exfoliation theme
Create a user account (nagiosadmin) for logging into the Nagios web interface. Remember the password that you assign to this user – you’ll need it later.
Restart Apache web server to make the new settings take effect.
Configure Nagios Server
Sample configuration files have now been installed in the /usr/local/nagios/etc directory. These sample files should work fine for getting started with Nagios. You’ll need to make just one change before you proceed.
Â
Edit
the /usr/local/nagios/etc/objects/contacts.cfg config file with your favorite editor and change the email address associated with the nagiosadmin contact definition to the address you’d like to use for receiving alerts.
Change the Email address field to receive the notification.
Install Nagios Plugins
Download Nagios Plugins to /tmp directory.
Compile and install the Nagios plugins.
Start Nagios Server
Verify the sample Nagios configuration files.
Output:
If there are no errors, then start the Nagios service.
SELinux
IPut SELinux in Permissive mode or disable it.
To make this change permanent, you will have to modify /etc/selinux/config and reboot the system.
Firewall
Make sure to allow web server access through the firewall.
Access Nagios Web Interface
Now access the Nagios web interface using the following URL. You’ll be prompted for the username (nagiosadmin) and password you specified earlier.
http://ip-add-re-ss/nagios/
Nagios console will look like below.
No responses yet