Linux Network Server Group: Nagios - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

Linux Network Server Group: Nagios

Description:

Linux Network Server Group: Nagios Marc Bechtel Sebastian Bl mel Alexandre Quignon Table of Contents Overview Requirements (MYSQL, APACHE, CONFIGS ) – PowerPoint PPT presentation

Number of Views:226
Avg rating:3.0/5.0
Slides: 29
Provided by: Andre463
Category:

less

Transcript and Presenter's Notes

Title: Linux Network Server Group: Nagios


1
Linux Network ServerGroup Nagios
Marc Bechtel Sebastian Blümel Alexandre Quignon
2
Table of Contents
  1. Overview
  2. Requirements (MYSQL, APACHE, CONFIGS)
  3. A short introduction to Nagios
  4. Nagios-Configuration with Fruity
  5. Installation and Configuration Problems
  6. Nagios in Action
  7. Nagios with SNMP and Cisco

3
Requirements
  • YUM-Installation Manager
  • MySQL 5.0.4-5
  • Apache 2.0.52-28
  • PHP 5.0.4-5
  • Postfix 2.2.2.10-1
  • Self installed
  • Nagios 2.5
  • Fruity 1 RC 1

./chkconfig --add httpd ./chkconfig --level 235
httpd on ./chkconfig add mysql ./chkconfig
--level 235 mysql on ./chkconfig add
nagios ./chkconfig --level 235 nagios on
6 different runlevels 0 - Halt the system 1 -
Single-user mode 2 - Multi-user mode (without
NFS) 3 - Multi-user mode 5 - Multi-user mode,
graphical login 6 - Reboot the system
4
Table of Contents
  1. Overview
  2. Requirements (MYSQL, APACHE, CONFIGS)
  3. A short introduction to Nagios
  4. Nagios-Configuration with Fruity
  5. Installation and Configuration Problems
  6. Nagios in Action
  7. Nagios with SNMP and Cisco

5
What is Nagios?
  • Nagios is System and network monitoring
    application
  • Developed by Ethan Galstad
  • Formerly know as Netsaint (2002)
  • Nagios is open source Software (General Public
    License)
  • current verion is 2.5
  • 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, youll never want to be without
    it. -)

6
Monitoring of
  • Nagios can supervise
  • Hosts (Windows, Linux, ) and host resources
    (Disk Usage, Load)
  • Services (FTP, Mail, HTTP, )
  • 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

7
Plug-in concept
  • How is this achieved?
  • build in check services (DNS, SNMP, SMTP, ICMP,)
  • by simple plug-in design that allows users to
    easily develop their own service checks
  • Upside You can monitor just about anything you
    can think of!
  • Downside Nagios cannot produce graphs of
    collected data because it has no further
    information about what you are monitoring!

8
Configuring Nagios
  • As all Linux Software Nagios heavily relies on
    config files!
  • We will have a (short) look at
  • httpd.conf
  • nagios.cfg
  • hosts.cfg hostgroup.cfg
  • contacts.cfg contactsgroup.cfg
  • services.cfg and commands.cfg
  • Do I have to configure all by hand?

9
Configuration-Files
10
Apache httpd.conf
  • ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
  • ltDirectory "/usr/local/nagios/sbin"gt
  • Options ExecCgi
  • AllowOverride AuthConfig
  • Order allow, deny
  • Allow from all
  • lt/Directorygt
  • Alias /nagios /usr/local/nagios/share
  • ltDirectory "/usr/local/nagios/share"gt
  • Options ExecCgi
  • AllowOverride AuthConfig
  • Order allow, deny
  • Allow from all
  • lt/Directorygt
  • Configure Script Alias For The CGIs default
    installation expects to find them accessible at
    http//yourmachine/nagios/cgi-bin/
  • Configure Alias For The HTML Files to make the
    HTML files accessible via the web server
  • http//192.168.10.4/nagios

11
Main Configuration File nagios.cfg
  • Location /usr/local/nagios/etc/nagios.cfg
  • Refers to all other config files
  • First file read by the Nagios process
  • Extract
  • log_file/var/log/nagios/nagios.log
  • cfg_file/usr/local/nagios/etc/hosts.cfg
  • cfg_file/usr/local/nagios/etc/commands.cfg

12
host.cfg and hostgroup.cfg
  • define host
  • host_name FTP
  • alias FTP Server
  • address 192.168.10.21
  • check_command Ping
  • check_period 24x7
  • contact_groups LNS
  • define hostgroup
  • hostgroup_name AllServers
  • alias all Server
  • members FTP
  • Description A host definition is used to define
    a physical server, workstation, device, etc. that
    resides on your network.
  • Description A host group definition is used to
    group one or more hosts together for display
    purposes in the CGIs.

13
contactgroups.cfg and contacts.cfg
  • define contactgroup
  • contactgroup_name LNS
  • alias ThisIsATestGroup
  • members Marc
  • define contact
  • contact_name Marc
  • alias Marc Bechtel
  • host_notification_period 24x7
  • host_notification_commands
  • send_notification_mail_host
  • email marcbechtel_at_gmail.com
  • Description A contact group definition is used
    to group one or more contacts together for the
    purpose of sending out alert/recovery
    notifications.
  • DescriptionA contact definition is used to
    identify someone who should be contacted in the
    event of a problem on your network.

14
Configuration-Files
15
services.cfg and commands.cfg
  • define service
  • service_description Ping
  • check_command Ping
  • max_check_attempts 2
  • contact_groups LNS
  • define command
  • command_name Ping
  • command_line /usr/local/nagios/libexec/check_i
    cmp HOSTADDRESS -c 500,10
  • DescriptionA service definition is used to
    identify a "service" that runs on a host.
  • DescriptionHow to perform a service check.

16
Verifying Your Nagios Configuration
  • Pre-Flight Check with the v option/usr/local/na
    gios/bin/nagios -v ltmain_config_filegt
  • Nagios verifies that you have defined the
    necessary data relationships for monitoring.
  • 1. Verify that all contacts are a member of at
    least one contact group.
  • 2. Verify that all contacts specified in each
    contact group are valid.
  • 3. Verify that all hosts are a member of at least
    one host group.
  • 4. Verify that all hosts specified in each host
    group are valid.
  • 5. Verify that all hosts have at least one
    service associated with them.

17
Table of Contents
  • Overview
  • Requirements (MYSQL, APACHE, CONFIGS)
  • A short introduction to Nagios
  • Nagios-Configuration with Fruity
  • Installation and Configuration Problems
  • Nagios in Action
  • Nagios with SNMP and Cisco

18
Fruity
  • What is Fruity?
  • PHP based web-frontend
  • Open Source project
  • Why are we using Fruity?
  • Simplicity
  • Easy to make changes
  • No manual .cfg file handling
  • Demonstation of Fruity

19
Table of Contents
  • Overview
  • Requirements (MYSQL, APACHE, CONFIGS)
  • A short introduction to Nagios
  • Nagios-Configuration with Fruity
  • Installation and Configuration Problems
  • Nagios in Action
  • Nagios with SNMP and Cisco

20
Fruity Configuration Problems
  • SELinux blocking write access for Fruity
  • File missing
  • /usr/local/nagios/objectconf/oconf.cfg
  • Two processes at shutdown

21
Table of Contents
  • Overview
  • Requirements (MYSQL, APACHE, CONFIGS)
  • A short introduction to Nagios
  • Nagios-Configuration with Fruity
  • Installation and Configuration Problems
  • Nagios in Action
  • Nagios with SNMP and Cisco

22
Monitoring
  • What is offered by Nagios ?
  • Host Monitoring
  • Service Monitoring
  • Status Map
  • 3D Map

23
Reporting
  • Nagios Standard
  • Trends
  • Availability
  • Alert Diagrams
  • Notification / Event Log
  • PNP
  • Performance Diagrams

24
Notification
Miranda
Mailbox Root
Mail command
25
Table of Contents
  • Overview
  • Requirements (MYSQL, APACHE, CONFIGS)
  • A short introduction to Nagios
  • Nagios-Configuration with Fruity
  • Installation and Configuration Problems
  • Nagios in Action
  • Nagios with SNMP and Cisco

26
Whats a MIB
  • Used to manage devices in a Network
  • Hierarchical database
  • All objects are addressed through a OID (Object
    Identifier)
  • Is used by SNMP (Simple Network Management
    Protocol)
  • There are Standard and Enterprise MIBs
  • IF-MIB RFC 2863
  • IP-MIB RFC 4293
  • CISCO-PRODUCTS-MIB www.cisco.com

27
Cisco Catalyst 2950 SNMP Check
  • MIB-II RFC 1213
  • OID 1.3.6.1.2.1.2.2.1.8. ltInterface Nrgt
  • Values 1, 2, 3 (up, down, testing)
  • Command
  • check_snmp -H 192.168.10.150 -o
    1.3.6.1.2.1.2.2.1.8.17 -C public -c 11

28
  • QUESTIONS
Write a Comment
User Comments (0)
About PowerShow.com