Nagios Conference 2013 - Luis Contreras - Nagios in Wind Telcom
M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian...
-
Upload
leo-hunter -
Category
Documents
-
view
215 -
download
0
Transcript of M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian...
![Page 1: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/1.jpg)
M. Bechtel, S. Blümel, A. Quignon 1
Linux Network ServerGroup: Nagios
Marc Bechtel
Sebastian Blümel
Alexandre Quignon
![Page 2: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/2.jpg)
M. Bechtel, S. Blümel, A. 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
![Page 3: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/3.jpg)
M. Bechtel, S. Blümel, A. Quignon 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
![Page 4: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/4.jpg)
M. Bechtel, S. Blümel, A. Quignon 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
![Page 5: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/5.jpg)
M. Bechtel, S. Blümel, A. Quignon 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, you’ll never want to be without it. :-)“
![Page 6: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/6.jpg)
M. Bechtel, S. Blümel, A. Quignon 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
![Page 7: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/7.jpg)
M. Bechtel, S. Blümel, A. Quignon 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!
Check Plugin
Webfrontend
Nagios Deamon
Administrator
Check Status
OK,Warning,Critical
Notification
![Page 8: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/8.jpg)
M. Bechtel, S. Blümel, A. Quignon 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?
![Page 9: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/9.jpg)
M. Bechtel, S. Blümel, A. Quignon 9
Configuration-Files
![Page 10: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/10.jpg)
M. Bechtel, S. Blümel, A. Quignon 10
Apache: httpd.conf
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
<Directory "/usr/local/nagios/sbin">
Options ExecCgi
AllowOverride AuthConfig
Order allow, deny
Allow from all
</Directory>
Alias /nagios /usr/local/nagios/share
<Directory "/usr/local/nagios/share">
Options ExecCgi
AllowOverride AuthConfig
Order allow, deny
Allow from all
</Directory>
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
![Page 11: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/11.jpg)
M. Bechtel, S. Blümel, A. Quignon 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
![Page 12: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/12.jpg)
M. Bechtel, S. Blümel, A. Quignon 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.
![Page 13: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/13.jpg)
M. Bechtel, S. Blümel, A. Quignon 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 [email protected]
}
Description: A contact group definition is used to group one or more contacts together for the purpose of sending out alert/recovery notifications.
Description:A contact definition is used to identify someone who should be contacted in the event of a problem on your network.
![Page 14: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/14.jpg)
M. Bechtel, S. Blümel, A. Quignon 14
Configuration-Files
![Page 15: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/15.jpg)
M. Bechtel, S. Blümel, A. Quignon 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_icmp $HOSTADDRESS$ -c 500,10%
}
Description:A service definition is used to identify a "service" that runs on a host.
Description:How to perform a service check.
![Page 16: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/16.jpg)
M. Bechtel, S. Blümel, A. Quignon 16
Verifying Your Nagios Configuration:
Pre-Flight Check with the –v option/usr/local/nagios/bin/nagios -v <main_config_file>
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.
…
![Page 17: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/17.jpg)
M. Bechtel, S. Blümel, A. Quignon 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
![Page 18: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/18.jpg)
M. Bechtel, S. Blümel, A. Quignon 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
![Page 19: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/19.jpg)
M. Bechtel, S. Blümel, A. Quignon 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
![Page 20: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/20.jpg)
M. Bechtel, S. Blümel, A. Quignon 20
Fruity Configuration Problems
SELinux blocking write access for Fruity
File missing:
/usr/local/nagios/objectconf/oconf.cfg
Two processes at shutdown
![Page 21: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/21.jpg)
M. Bechtel, S. Blümel, A. Quignon 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
![Page 22: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/22.jpg)
M. Bechtel, S. Blümel, A. Quignon 22
Monitoring
What is offered by Nagios ?
Host Monitoring
Service Monitoring
Status Map
3D Map
![Page 23: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/23.jpg)
M. Bechtel, S. Blümel, A. Quignon 23
Reporting
Nagios Standard
Trends
Availability
Alert Diagrams
Notification / Event Log
PNP
Performance Diagrams
![Page 24: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/24.jpg)
M. Bechtel, S. Blümel, A. Quignon 24
Notification
Mail command
Miranda
Mailbox Root
![Page 25: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/25.jpg)
M. Bechtel, S. Blümel, A. Quignon 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
![Page 26: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/26.jpg)
M. Bechtel, S. Blümel, A. Quignon 26
What’s 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
![Page 27: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/27.jpg)
M. Bechtel, S. Blümel, A. Quignon 27
Cisco Catalyst 2950 SNMP Check
MIB-II: RFC 1213
OID: 1.3.6.1.2.1.2.2.1.8. <Interface Nr>
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 1:1
![Page 28: M. Bechtel, S. Blümel, A. Quignon1 Linux Network Server Group: Nagios Marc Bechtel Sebastian Blümel Alexandre Quignon.](https://reader034.fdocuments.in/reader034/viewer/2022042717/56649d035503460f949d690d/html5/thumbnails/28.jpg)
M. Bechtel, S. Blümel, A. Quignon 28
QUESTIONS