dire Nagios configuration
- Nagios.cfg

- For the nagios configurations Refer Here
- For testing email configurations we will be using fake smtp server
- Refer Here
- Create an inbox and look at credentials

- Configure email client in the Nagios Server
sudo apt-get update
sudo apt-get install mailutils ssmtp -y
- Now edit the file /etc/ssmtp/ssmtp.conf
AuthUser=<user>@gmail.com
AuthPass=Your-Gmail-Password
mailhub=smtp.mailtrap.io:2525
UseSTARTTLS=YES

- Verify the email sending
echo "This is a test" | mail -s "Test" 'qtdevop@gmail.com'

- In the commands.cfg change from /bin/mail to /usr/bin/mail
- For preflight checks execute
sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Monitoring Remote Hosts
-
Remote Checks are usually used in the combination of Nagios plugins package that use either SSH or Nagios Remote Plugin Executor (NRPE)
-
Monitoring over SSH
- Install nagios plugins on the remote servers
- Nagios offers a
check_by_sshplugin that takes the hostname and actual command to run on the remote server - switch to nagios user
- Configure SSH Connection by using ssh_keys

- Refer Here for the changes made in the configuration

-
Monitoring using NRPE:
- overview

- Nagios Remote plugin executor:
- for installing nrpe Refer Here
- overview
