ADMIN
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Features<br />
Icinga<br />
Figure 2: Everything is working, but the NRPE plugin is causing problems.<br />
monitoring environments, notification<br />
escalation, and check schedules.<br />
Icinga differentiates between active<br />
and passive checks. Active checks are<br />
initiated by the Icinga service and run<br />
at times specified by the administrator.<br />
For a passive check, an external<br />
application does the work and forwards<br />
the results to the Icinga server,<br />
which is useful if you can’t actively<br />
check the computer (e.g., it resides<br />
behind a firewall). A large number of<br />
plugins [4] already exist for various<br />
styles in Nagios and Icinga. But before<br />
the first check, the administrator<br />
needs to configure the computers and<br />
the services to monitor in Icinga.<br />
The individual elements involved in<br />
a check are referred to as objects in<br />
Icinga. Objects include hosts, services,<br />
contacts, commands, and time<br />
slots. To facilitate daily work, you can<br />
group hosts, services, and contacts.<br />
The individual objects are defined in<br />
CFG files, which reside below Icinga’s<br />
etc/objects directory. The network<br />
monitor includes a number of sample<br />
definitions of various objects that adexternally<br />
about CPU load, RAM, or<br />
disk space usage, you need to install<br />
a verbose add-on, such as NRPE<br />
[3], on each machine. The remote<br />
Icinga server will tell it to execute<br />
the plugins on the local machine and<br />
transmit the required information.<br />
Icinga sends the system administrator<br />
all the information needed and alerts<br />
the admin of emergencies. Advanced<br />
features that are a genuine help in<br />
daily work include groups, redundant<br />
Listing 3: commands.cfg (Excerpt)<br />
01 # 'notify‐service‐by‐email' command definition<br />
02 define command{<br />
03 command_name notify‐service‐by‐email<br />
04 command_line /usr/bin/printf "%b" "***** Icinga *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:<br />
$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time:<br />
$LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" |<br />
/usr/bin/mail ‐s "**$NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTA<br />
05 TE$ **" $CONTACTEMAIL$<br />
06 }<br />
07 <br />
08 # 'check‐host‐alive' command definition<br />
09 define command{<br />
10 command_name check‐host‐alive<br />
11 command_line $USER1$/check_ping ‐H $HOSTADDRESS$ ‐w 3000.0,80% ‐c 5000.0,100% ‐p<br />
12 5<br />
13 }<br />
Listing 4: timeperiods.cfg (Excerpt)<br />
01 define timeperiod{<br />
02 timeperiod_name 24x7<br />
03 alias 24 Hours A Day, 7 Days A Week<br />
04 sunday 00:00‐24:00<br />
05 monday 00:00‐24:00<br />
06 tuesday 00:00‐24:00<br />
07 wednesday 00:00‐24:00<br />
08 thursday 00:00‐24:00<br />
09 friday 00:00‐24:00<br />
10 saturday 00:00‐24:00<br />
11 }<br />
12 <br />
13 define timeperiod{<br />
14 timeperiod_name wochentags<br />
15 alias Robot Robot<br />
16 monday 07:00‐17:00<br />
17 tuesday 07:00‐17:00<br />
18 wednesday 07:00‐17:00<br />
19 thursday 07:00‐17:00<br />
20 friday 07:00‐17:00<br />
21 }<br />
16 Admin 01 www.admin-magazine.com