Professional Documents
Culture Documents
..
..
1115200600170
1115200600223
Monitoring using Nagios System
2010
Web Interface
Hosts
Services
Map
Reports
Nagios Configurations System
Monitoring DNS server
Configurations
o Map
o Host
o Services
Monitoring HTTP-DISK USAGE
NRPE addon
Configure Host-Services-Commands
o Host / Hostgroup
o Services
Http Service Preparation and Configuration on Both Sides
Disk Usage Service Preparation and Configuration on Both Sides
Rest Services Configuration
o Service Groups
o Map
o Host
o Services
Remotehost side settings
Results
DNS-Server ...
Disk Usage Results
Check Http Results
3
3
6
9
12
14
15
16
16
22
22
22
22
23
23
24
25
25
26
27
27
29
30
30
31
31
34
38
38
43
52
monitoring 2 network objects.
network objects monitor
1. DNS server ....
2. Remote Host http disk usage monitor
nagios plugins path /usr/local/nagios
by default monitor services localhost.
Web Interface
Nagios web interface
hosts monitor. interface
Nagios.
menu nagios :
General
home nagios documentation
nagios nagios .
Current Status
.
Tactical Overview
monitoring hosts services .
Map
hosts monitor
Hosts
hosts monitor.
Services
services host monitor
Host Groups
hosts.To nagios
hosts network objects
(.. DNS servers ,routers ,printers .. ) .
monitor
objects
.
Services Groups
. group
hosts.
Problems
monitor
hosts network outages ( ).
Reports
nagios logs history reports
.
reports
Availability
Trends
Alerts summary
logs :
Notifications
Events
History
histogram.
System
menu web
nagios( high level
configuration files)..
Comments
- hosts services.
Down Time
-
monitoring - host-s - service-s
Process Info
nagios
Performance Info
nagios
Scheduling Queue
nagios.
Configuration
objects configuration files.
Hosts
web interface services local host
enabled monitoring by default Nagios. menu nagios
sub-menu Current Status Hosts.
5 :
1. Host
host monitor.
2. Status
host.
host 3
UP
DOWN
UNREACHABLE
host plugins
nagios , 4
OK
WARNING
UNKNOWN
CRITICAL
nagios preliminary
UP, DOWN
Plug in Result Preliminary Host State
OK
UP
WARNING
UP or DOWN
UNKNOWN
DOWN
CRITICAL
DOWN
DOWN
DOWN
DOWN
schema host :
4. Duration
monitor o host.
5. Status Information
host:
Ping
Packet loss :
RTA: Round Trip Average ms
table
hosts monitor. .
(-Warning-Unknown-Critical-Pending)
services monitor.
, host (localhost)
, services hosts .
host link
monitor host.
pointer(mouse) IP host. host
link
.
Services
monitoring
services hosts monitor. services nagios plugin
nagios plugins.
checks nagios active passive.
schema active checks :
passive checks:
checks
( ) .
documentation nagios Active checks
Passive checks
monitor hosts .
web interface nagios services
:
Service
To .
link
.
Status
.
hosts.
Last Check
.
Duration
.
Attempt
host. output
attempts_till_answer/max_attempts. nagios
max_attempts . max_attempts
HARD STATE reschedule
execution .
Status Information
output plug-in stdout
TEXT OUTPUT | OPTIONAL PERFDATA
LONG TEXT LINE 1
LONG TEXT LINE 2
...
LONG TEXT LINE N | PERFDATA LINE 2
PERFDATA LINE 3
...
PERFDATA LINE N
status information TEXT OUTPUT
Map
hosts monitor Nagios.
7 :
User-Supplied coords
Depth Layers
Collapsed Tree
Balanced Tree
Circular
Circular(Marked Up)
Circular(Balloon)
monitor host
.
host.
hosts , depth layers
.
monitor hosts
[:goggle images].
Reports
nagios logs history
reports
host-hostgroup-service-servicegroup.
reports
Availability
host(s)
hostgroup(s) UP,DOWN,UNREACHABLE
service(s) servicegroup(s) OK, WARNING, CRITICAL,
UNKNOWN state.
Trends
Availability host service
.
object
monitor .
Alerts summary
alerts session Nagios
services hosts
Nagios. HARD ALERTS hosts
services monitoring . O
reports alerts alerts
. host UP,DOWN,UNREACHABLE Problem
events services
OK,WARNING,CRITICAL Problem events. logs :
Notifications
host service enable notifications
nagios notifications services, hosts
top-down list. by default notifications email contacts
nagios host service.
Hostgroups
Group of hosts
Service
Servicegroup
Group of services
Templates
Timeperiods
Commands
timeperiods.cfg
Timeperiods
contacts.cfg
Contacts
localhost
Host/Hostgroup/Service
templates.cfg
Templates
define objects
monitor network objects. conf files
referenced nagios.cgi agios
configuration.
contacts
notifications nagios .
entries
define contact{
contact_name
use
alias
email
}
Fotis
generic-contact
EkpaDNS Admin1
std06170@di.uoa.gr
define contact{
contact_name
use
alias
email
}
Faidon
generic-contact
EkpaDNS Admin2
std06223@di.uoa.gr
group contacts.
define contactgroup{
contactgroup_name
alias
members
}
EkpaDNS_admins
EkpaDNS Administrators
Fotis,Faidon
entries generic-contact
entries attributes generic-contact.
generic-contact . configuration
templates.cfg. templates
contacts,hosts,services etc.
generic-contact entry.
define contact{
name
service_notification_period
host_notification_period
service_notification_options
host_notification_options
service_notification_commands
host_notification_commands
register
}
generic-contact
24x7
24x7
w,u,c,r,f,s
d,u,r,f,s
notify-service-by-email
notify-host-by-email
0
linux-server
olympus.noc.uoa.gr
ekpadns
195.134.100.100
:
To host name DNS server olympus.noc.uoa.gr
IP address DNS server IP 195.134.100.100
alias ekpadns
host.
template linux-server
define host{
name
use
check_period
check_interval
retry_interval
max_check_attempts
check_command
notification_period
notification_interval
notification_options
contact_groups
register
}
linux-server
generic-host
24x7
5
1
10
check-host-alive
workhours
120
d,u,r
admins ,EkpaDNS_admins
0
generic-host
1
1
1
1
1
1
1
24x7
0
hostgroup host
group.
define hostgroup{
hostgroup_name
alias
members
}
hostgroup DNS-servers
To alias name DNS Servers
hostgroup host (olympus.noc.uoa.gr)
services monitor DNS.
monitor :
1. check_dns
2. check_ping
host hostgroups
/usr/local/nagios/etc/objects/Monitoring/ekpaDNS.cfg
services monitor commands
nagios.To nagios by default built in
/usr/local/nagios/etc/objects/commands.cfg
commands copy-paste
.
:
sudo cp /usr/local/nagios/etc/objects/commands.cfg /usr/local/nagios/etc/objects/Monitoring/EkpaDNS/commands.cfg
services ekpadns.cfg
check_dns
dns commands.cfg
# 'check_dns' command definition
define command{
command_name
check_dns
command_line
$USER1$/check_dns -H $HOSTADDRESS$
}
ekpaDNS.cfg
define service{
use
host_name
service_description
check_command
}
generic-service
olympus.noc.uoa.gr
CHECK_DNS
check_dns
check_ping
# 'check_ping' command definition
define command{
command_name check_ping
command_line
$USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
}
check_dns ekpadns.cfg :
# Define a service to "ping" the local machine
define service{
use
generic-service
host_name
olympus.noc.uoa.gr
service_description
PING
check_command
check_ping!100.0,20%!500.0,60%
}
generic-service
templates.cfg :
define service{
name
active_checks_enabled
passive_checks_enabled
parallelize_check
obsess_over_service
check_freshness
notifications_enabled
event_handler_enabled
flap_detection_enabled
failure_prediction_enabled
process_perf_data
retain_status_information
retain_nonstatus_information
is_volatile
check_period
max_check_attempts
normal_check_interval
retry_check_interval
contact_groups
notification_options
notification_interval
notification_period
register
}
generic-service
1
1
1
1
0
1
1
1
1
1
1
1
0
24x7
3
10
2
admins,EkpaDNS_admins
w,u,c,r
60
24x7
0
Map
hosts monitor.
host ( DNS server olympus.noc.uoa.gr)
nagios. nagios DNS Server :
Host
host DNS server
UP
monitor.:
Services
services 2 services
PENDING,
services :
nagios
DNS Server 6 .
nrpe.
nrpe add-on Nagios host monitor
nagios
authorization monitored
monitoring pc monitor plug-in nagios
check_nrpe, add-on Nrpe host
. 5
1. Nagios nrpe configuration
,
2. nrpe Nrpe add-on
3. Nrpe host
4. Nagios.cfg
5. Nagios web interface .
schema
check_disk,check_load,check_http,check_ftp services monitor
host
nagios monitored host ssl
installs
configurations 2 .
documentation nrpe http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf
Configure Host-Services-Commands
configurations files
monitoring DNS ekpadns.cfg
partner.cfg cfgs.
copy
EkpaDNS ekpadns.cfg Partner.
sudo mkdir /usr/local/nagios/objects/Monitoring/Partner
cp /usr/local/nagios/objects/Monitoring/EkpaDNS/*/usr/local/nagios/objects/Monitoring/Partner
rm-rf /usr/local/nagios/objects/Monitoring/Partner/ekpadns.cfg
installation check_nrpe
commands.cfg
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
IP host monitor
plug-in-command monitor.
host monitor
template . templates.cfg host-entry
Define host{
name
use
check_period
check_interval
retry_interval
max_check_attempts
check_command
notification_period
notification_interval
notification_options
contact_groups
register
}
linux-nrpe-host
generic-host
24x7
5
1
10
check-host-alive
24x7
30
d,r
admins
0
define host{
configuration file(partner.cfg)
host services.
Host/Hostgroup
# Define a host for the local machine
define host{
use
linux-nrpe-host
host_name remotehost
alias
Ubuntu 10.04
address
linux-nrpe-host
}
define hostgroup{
hostgroup_name
alias
members
}
PartnerHOST
Partner HOST
remotehost
Services
nrpe 2
1. Direct checks
Local/private serivices resourses host (direct checks) .
To schema
2. Indirect checks
Public services resources host (indirect check)
To schema :
disk usage host download ,
HTTP host
browsing.
generic-service
multimedia-desktop
HTTP
check_nrpe!check_http
check_nrpe o plug-in
monitor host nrpe.cfg.
generic-service
multimedia-desktop
Disk_Usage
check_nrpe!check_disk
generic-service
remotehost
CPU Load
check_nrpe!check_load
check_hda1
monitor free space dev/hda1 check_hda1
plug-in service
define service{
use
host_name
service_description
check_command
}
generic-service
remotehost
/dev/hda1 Free Space
check_nrpe!check_hda1
check_total_procs
processes remotehost
check_total_procs plugins
service
define service{
use
host_name
service_description
check_command
}
generic-service
remotehost
Total Processes
check_nrpe!check_total_procs
check_zombie_procs
zombie proccesses remotehost
plugin chech_zombie_procs
define service{
use
host_name
service_description
check_command
}
generic-service
remotehost
Zombie Processes
check_nrpe!check_zombie_procs
Services Groups
servicegroups .
check_disk check_http Primary Services group
Secondary Services group.
define servicegroup{
servicegroup_name
alias
members
desktop,Disk_Usage
}
Primary Services
primary services
multimedia-desktop,HTTP,multimedia-
define servicegroup{
servicegroup_name Secondary Services
alias
secondary services
members
multimedia-desktop,CPU,multimedia-desktop,/dev/hda1,
multimedia-desktop,Total Processes,multimedia-desktop,Zombie Processes
}
nagios.cgi configuration files directory
/usr/local/nagios/etc/Monitoring/Partner
verfiy nagios.cgi
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
restart to nagios. restart nagios system
/etc/init.d/nagios restart
web interface nagios.
Web Interface Nagios
monitor host services .
menu map, hosts services monitor.
Map
option monitor nagios
options .
:
Host
option Hosts menu
host monitor,
.
monitor pc partner(multimedia-desktop)
:
UP,
o 15-5-2010 16:17:11 ,
monitor 1 3 ,
PING host Nagios
output PING Round
Trip Average 6.66ms.
.
Services
monitor option Services
menu . services monitor
host monitor.
6 monitor. secondary
services primitives
exit code.
host
nagios.
remotehost nagios .
monitor .
check DiskUsage
State
310GB-31GB
OK
31GB-15.5GB
Warning
15.5GB-0GB
Critical
monitoring critical
, remotehost
OK state 3 .
Warning state (10%-5%)
state.
monitor
state .
To script .
hac.sh
chmod 700 ./hac.sh
./hac.sh > get_di.sh
di.uoa.gr domain
repository linux kernel ubuntu(10.04) x86
. videos youtube.
:
linux kernel
wget -r http://www.kernel.org/pub/linux
youtube-dl http://www.youtube.com/watch?v=zgp4Vh8-IQs
youtube-dl http://www.youtube.com/watch?v=ShT3ZCZzbrk
youtube-dl http://www.youtube.com/watch?v=RUDajcg_3dc
youtube-dl http://www.youtube.com/watch?v=oFnJ2U_cZ8o
youtube-dl http://www.youtube.com/watch?v=-gwX9uWA2eQ
youtube-dl http://www.youtube.com/watch?v=b-etyl6eixM
youtube-dl http://www.youtube.com/watch?v=gKdx4Kr0IVE
youtube-dl http://www.youtube.com/watch?v=pNoHY9XFGeQ
youtube-dl http://www.youtube.com/watch?v=gW4LQN1Bx1Q
youtube-dl http://www.youtube.com/watch?v=QwX8yF8k0ls
youtube-dl http://www.youtube.com/watch?v=ozUIKvoUd9A
youtube-dl http://www.youtube.com/watch?v=u1xrC0Co1zU
youtube-dl http://www.youtube.com/watch?v=31xaDOaYTKw
youtube-dl http://www.youtube.com/watch?v=3VVuMIB2hC0
youtube-dl http://www.youtube.com/watch?v=a5Pcj__GPCU
youtube-dl http://www.youtube.com/watch?v=NEIK4l39t-E
youtube-dl http://www.youtube.com/watch?v=_5Z7eal4uXI
youtube-dl http://www.youtube.com/watch?v=lK_HThS8DZo
youtube-dl http://www.youtube.com/watch?v=Scf6dV4FSf8
youtube-dl http://www.youtube.com/watch?v=cCvLTlQWT6A
youtube-dl http://www.youtube.com/watch?v=wuhHIqJyjY0
youtube-dl http://www.youtube.com/watch?v=PXKv9jc-otc
youtube-dl http://www.youtube.com/watch?v=D_rxpAgBFQo
youtube-dl http://www.youtube.com/watch?v=X2aLYBC5onk
youtube-dl http://www.youtube.com/watch?v=hM8K1yexO6s
youtube-dl http://www.youtube.com/watch?v=QGH-1L-0zo4
youtube-dl http://www.youtube.com/watch?v=oQwhbazr5ug
youtube-dl http://www.youtube.com/watch?v=xC5uEe5OzNQ
youtube-dl http://www.youtube.com/watch?v=YhHCl8j_RbU
youtube-dl http://www.youtube.com/watch?v=pspDM7MwMI4
youtube-dl http://www.youtube.com/watch?v=x4fTh0x3xLE
youtube-dl http://www.youtube.com/watch?v=LKhnq3qi9As
youtube-dl http://www.youtube.com/watch?v=2iJjPuU-808
youtube-dl http://www.youtube.com/watch?v=2iJjPuU-808
youtube-dl http://www.youtube.com/watch?v=kYgV2GlsufI
youtube-dl http://www.youtube.com/watch?v=nPecBxM2f6c
youtube-dl http://www.youtube.com/watch?v=pCf1gyN-UfA
youtube-dl http://www.youtube.com/watch?v=g_8sm5YZKiE
youtube-dl http://www.youtube.com/watch?v=jFge2zTSN-A
youtube-dl http://www.youtube.com/watch?v=mfBvaY_SV6g
youtube-dl http://www.youtube.com/watch?v=UXjwZIqJwos
youtube-dl http://www.youtube.com/watch?v=IfYGc_9yQUc
youtube-dl http://www.youtube.com/watch?v=Tc7W8Q-g9Lg
youtube-dl http://www.youtube.com/watch?v=o8iWC9lg7js
youtube-dl http://www.youtube.com/watch?v=dlNWSiI7eZg
youtube-dl http://www.youtube.com/watch?v=2E8xuBUc38k
youtube-dl http://www.youtube.com/watch?v=KOphGZZrE44
youtube-dl http://www.youtube.com/watch?v=UOgBFL6bJTY
youtube-dl http://www.youtube.com/watch?v=1rh3_r0nbKs
youtube-dl http://www.youtube.com/watch?v=iUYZevhPE2A
youtube-dl http://www.youtube.com/watch?v=8blwyC9ReMA
youtube-dl http://www.youtube.com/watch?v=hIO2y8YfmW0
youtube-dl http://www.youtube.com/watch?v=YLn116z1q9I
youtube-dl http://www.youtube.com/watch?v=qvc4f3greHU
youtube-dl http://www.youtube.com/watch?v=4hHsYOLETqE
youtube-dl http://www.youtube.com/watch?v=u4nnZ44DJOg
youtube-dl http://www.youtube.com/watch?v=jzeyzbjoZ9Q
youtube-dl http://www.youtube.com/watch?v=xPEbvBxc4xo
youtube-dl http://www.youtube.com/watch?v=TxvpctgU_s8
youtube-dl http://www.youtube.com/watch?v=jEfYEWpbqQw
youtube-dl http://www.youtube.com/watch?v=CwX_d2Hl5-M
youtube-dl http://www.youtube.com/watch?v=kkHeJasG6-o
youtube-dl http://www.youtube.com/watch?v=PCcRcbKq2Jk
youtube-dl http://www.youtube.com/watch?v=KKzjNhuDpSg
youtube-dl http://www.youtube.com/watch?v=_Lw3nww7oZg
youtube-dl http://www.youtube.com/watch?v=gRS8cM4lyKY
youtube-dl http://www.youtube.com/watch?v=dUlt4f2PdY0
youtube-dl http://www.youtube.com/watch?v=ffhPm2f61Vg
youtube-dl http://www.youtube.com/watch?v=jY48iTyLrmk
youtube-dl http://www.youtube.com/watch?v=-P6700m-tZ0
youtube-dl http://www.youtube.com/watch?v=cOrc37wNUqU
youtube-dl http://www.youtube.com/watch?v=4kfTuNdku3A
youtube-dl http://www.youtube.com/watch?v=Ub50Wk3uCl4
youtube-dl http://www.youtube.com/watch?v=wvVOoCKjonY
youtube-dl http://www.youtube.com/watch?v=Tj_Nlm0871E
youtube-dl http://www.youtube.com/watch?v=Lo3DR0jDsLU
youtube-dl http://www.youtube.com/watch?v=A93IEF6Q9VU
chmod 700 ./youtube_dl.sh
./youtube_dl.sh
script
.
.
Results
DNS-Server ...
results
nagios DNS Server ....
reports nagios (trends , reports , histogram)
host
OK state 100% monitoring
DOWN state 0% monitoring
UNREACHABLE state 0% monitoring
host
nagios 1 .
Trends
trends , ,
availability ( state) host .To nagios
states.
availability report .
nagios.
monitoring disk remotehost.
Histogram
events .
DNS ..
event .
Services
check_dns
server.
states service
OK
WARNING
UNKNOWN
CRITICAL
Availiability
Trends
Histogram
Check Ping
PING
.
DOWN
event .
host service
check_dns, stop service .
Availability
Trends
Histogram
Hosts
Services
reports(Availiabilty,Trends,Histogram) nagios
statistics ouput
reports remotehost
.
Reports
Availiabilty
report
host UP,DOWN,UNREACHABLE state
DISK USAGE service OK,WARNING,CRITICAL
state.
host multimedia-desktop
99.963% UP
0.307% DOWN
DISK USAGE:
39.861% OK state
18.056% WARNING state
42.083% CRITICAL state.
downloads
remotehost service
OK state CRITICAL state.
bars o table
state monitored objects(host-service)
.
trends reports.
Trends
trends availability host service
. nagios
nagios host-services.
states host
UP,DOWN,UNREACHABLE.
nagios 5
.
time space,
state info(
)
state :
, time range
state info. state info
output output host
nagios , service host.
Histogram
reports histograms alerts-notifications-events
. host
monitoring
( check disk usage add monitoring remote host)
Statistics
monitoring disk usage
remotehost
, 35-14 = 21 GB
/ partition , partitions /media/HDD
monitor
DISK USAGE .
14.665% 94.336%
report OK state
0.880% 5.664% UNKNOWN state.
2 .
. report
nagios 2 1/2
states services.
Unknown state.
unknown state. check_http
Services log
Trends
trends availability
host service nagios
nagios host-services.
states check_http
availability :
1st phase - Unknown
2nd phase OK
Histogram
reports histograms alerts-notifications-events
critical event web server
remotehost. :
monitoring
ok events : max 2 , min 0 , sum 2 , average 0.66
critical events : max 1 , min 0 ,sum 1 , average 0.03
unknown events : max 3 , min 0 , sum 3 , average 0.10