الاثنين، 30 يناير 2017

Nagios For Network Management





Nagios


What is Nagios

  • “Nagios is an enterprise-class monitoring solutions for hosts, services, and networks released under an Open Source license.”
  • It watches hosts and services that you specify, alerting you when things go bad and again when they get better.”
  • Developed by Ethan Galstad
  • Nagios is quite powerful and flexible, but unfortunately its not very friendly to newbies. 
  • Why? Because it takes a lot of work to get it installed and configured properly. 
  • That being said, if you stick with it and manage to get it up and running, you’ll never want to be without it.


Introduction


  • Nagios: a measurement tool that actively monitors availability of devices and services: 
  • Popular: One of the most used open source network monitoring software packages.
  • Fast: Uses CGI functionality written in C for faster response and scalability.
  • Scalable: Can support up to thousands of devices and services.
  • Cool-Looking Web Interface®

Monitoring of…


  • Nagios can supervise:
Hosts (Windows, Linux, …) 
  • Monitoring of host resources (processor load, disk usage, system logs) on a majority of network operating systems, even Microsoft Windows 
  •    Remote monitoring supported through SSH or SSL encrypted tunnels. 
monitoring of network services (SMTP, POP3, HTTP, NNTP, ICMP, SNMP) SNMP Traps
other hardware devices (like temperature sensors,filling level indicator,…)

  • In case of emergency send notifications: email, pager, SMS
any user-defined method through plug-in system




What’s good about Nagios?




  • It’s conceptually simple
  • It handles the load
  • It has a web interface
  • It’s extensible
  • It’s not overly noisy
“Cool-Looking Web Interface®”






Features: 1


  • Modular
  • Type of availability is largely delegated to plug-ins:
  1.           The product's architecture is simple enough that writing new plugins is fairly easy in the language of your choice.
  2. There are many, many, many plug-ins available.


Features: Plug-Ins or Modular



  • The Nagios package in Ubuntu comes with a number of pre-installed plugins:
 ** apt.cfg    breeze.cfg    dhcp.cfg    disk-smb.cfg    disk.cfg dns.cfg    dummy.cfg    flexlm.cfg    fping.cfg    ftp.cfg   games.cfg    hppjd.cfg http.cfg   ifstatus.cfg   ldap.cfg   load.cfg    mail.cfg    mrtg.cfg mysql.cfg netware.cfg   news.cfg    nt.cfg    ntp.cfg    pgsql.cfg    ping.cfg     procs.cfg radius.cfg    real.cfg  rpc-nfs.cfg    snmp.cfg   ssh.cfg    tcp_udp.cfg telnet.cfg    users.cfg    vsz.cfg **


  • There are many more available (e.g.)...
                      http://sourceforge.net/projects/nagiosplugins


Features: 2


  • Fast and Scalable
  • Compiled, binary CGIs and common plug-ins for faster performance.
  • Parallel checking and forking of checks to support large numbers of devices.
  1. This has been considerably improved in version 3 of Nagios.
  2. Improvement of efficiency is a controversial topic in the Nagios community. 


Features: 3

  • Uses “intelligent” checking capabilities.
               * Attempts to distribute the server load of running Nagios (for larger sites) and the load placed on devices being checked. 



  • Configuration is done in simple, plain text files, that can contain much detail and are based on templates.
  • Nagios reads it's configuration from an entire directory. You decide how to define individual files.


Features: 4



  • Topology Aware: To determine dependencies.
 Differentiates between what is down vs. what is not available. This way it avoids running unnecessary checks. This is done using parent-child relationships between devices.

  • Notifications: How they are sent is based on combinations of:
Contacts and lists of contacts.
Devices and groups of devices
Services and groups of services
Defined hours by persons or groups.
The state of a service.

Features: 5



  • Service state:
  • When configuring a service you have the following notification options:
  1. d: DOWN: The service is down (not available)
  2. u: UNREACHABLE: When the host is not visible
  3. r: RECOVERY: (OK) Host is coming back up
  4. f: FLAPPING: When a host first starts or stops or it's state is undetermined.
  5. n: NONE: Don't send any notifications





How Checks Work


  • Parameters: Set in /etc/nagios3/nagios.cfg:

  1. Normal checking interval
  2. Re-check interval
  3. Maximum number of checks.
  4. Period for each check
  • Services check(s) only happen when a node responds (ping check or “is alive = yes”):
  1. Remember a node can be:
              DOWN
              UNREACHABLE

The Concept of “Parents”


  1. For example, the parent of a PC connected to the switch mgmt-sw1 would be mgmt-sw1.
  2. This allows us to specify the network dependencies that exist between machines, switches, routers, etc.
  3. This avoids having Nagios send alarms when a parent does not respond.
  4. Note: A node can have multiple parents.






The Idea of Network Viewpoint


  • Where you locate your Nagios server will determine your point of view of the network.
  • Nagios allows for parallel Nagios boxes that run at other locations on a network.
  • Often it makes sense to place your Nagios server nearer the border of your network vs. in the core, or...
  • Have someone else run checks for you from an external location as well.


Network Viewpoint














By : mogtaba altyib 
Modification by : Mohammed Bakry PhD

ليست هناك تعليقات:

إرسال تعليق