Network monitoring

  1. yum install nagios.
  2. Start the httpd and nagios services.
  3. Set the Nagios administrator password using htpasswd -c /etc/nagios/passwd nagiosadmin.
  4. Define the network to be monitored by editing Nagios' configuration files. You can place your configuration in /etc/nagios/conf.g/*foo.cfg*. For example, the following will define a host named smtp.example.com and also check that smtp.example.com is providing an SMTP service:
define host {
      use                     linux-server
      host_name               smtp.example.com
      address                 10.1.10.1
}

define service {
      use                     generic-service
      host_name               smtp.example.com
      service_description     SMTP
      check_command           check_smtp
      notifications_enabled   0
}
  1. Load http://localhost/nagios in a browser. (Note securing Nagios so that it can be accessed away from localhost is beyond the scope of these notes.)

Fedora packages plugins such as check_smtp separately from the core Nagios package installed above. The following packages provide common plugins:

Plugin package Use
nagios-plugins-ping Check the availability of a host using ICMP
nagios-plugins-tcp Check the availability of common Internet services including FTP and IMAP
nagios-plugins-http Check the availability of a HTTP/HTTPS service
nagios-plugins-smtp Check the availability of a SMTP service
nagios-plugins-dns Check the availability of a DNS service