DevOps Classroom Series – 26/June/2021

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_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
    • Refer Here for the changes made in the configuration
  • Monitoring using NRPE:

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

Leave a ReplyCancel reply

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

Please turn AdBlock off
Plugin for Social Media by Acurax Wordpress Design Studio

Discover more from Direct DevOps from Quality Thought

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

Continue reading

Exit mobile version
%%footer%%