DevOps Classroom Series – 26/June/2021

dire Nagios configuration

  • Nagios.cfg Preview
  • 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 Preview
  • 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

Preview

  • Verify the email sending echo "This is a test" | mail -s "Test" 'qtdevop@gmail.com' Preview Preview
  • 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_ssh plugin that takes the hostname and actual command to run on the remote server
    • switch to nagios user
    • Configure SSH Connection by using ssh_keys Preview
    • Refer Here for the changes made in the configuration Preview
  • Monitoring using NRPE:

    • overview Preview
    • Nagios Remote plugin executor:
    • for installing nrpe Refer Here

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube