Sie sind auf Seite 1von 9

Nagios Certified Professional Core Exam

Volume: 94 Questions + 7Labs

Question: 1
Escalations are a type of notification.
Choose the correct answer:

A. True

B. False

Answer: A

Explanation
Escalations are a type of notification, but unlike regular notifications, have their own object type
and definitions.

Question: 2
The "Alerts Summary" report can display which of the following:
Choose the 4 correct answers:

A. Top 25 HARD and SOFT alert producers for hosts

B. Top 25 HARD and SOFT alert producers for services

C. Top 25 Recent HARD Alerts

D. 25 most recent HARD and SOFT alerts for hosts and services

Answer: ABCD

Question: 3
What languages may Nagios Core plugins be written in?
Choose the 4 correct answers:

A. C++

B. Perl

C. Python

Leading the way in IT testing and certification tools, www.examkiller.net


Nagios Certified Professional Core Exam

D. shell scripts

Answer: ABCD

Explanation
Plugins may be written in any language which allows them to be executed from the command
line. Many plugins are compiled binaries, and many are scripts of some sort.

Question: 4
Which directive can you use to prevent certain characters from being output by macros?
Choose the correct answer:

A. disable_macro_characters

B. illegal_macro_output_chars

C. output_html

D. escape_macro_characters

Answer: B

Explanation
This directive allow you to specify what characters are removed from macros before they are
expanded in services, commands, and escalations. This DOES NOT affect macros used in service
or host check commands. The following macros are stripped of the characters you specify:
$HOSTOUTPUT$, $HOSTPERFDATA$, $HOSTACKAUTHOR$, $HOSTACKCOMMENT$,
$SERVICEOUTPUT$, $SERVICEPERFDATA$,
$SERVICEACKAUTHOR$, and $SERVICEACKCOMMENT$
By default, the follow characters are stripped: `~$^&"|'<> DO NOT disable this option as it will
expose your Nagios installation to security exploits.

Question: 5
What is the most appropriate action to prevent repeated notification of a problem that is being
handled?
Choose the correct answer:

A. Remove the host definition

B. Disable notifications for the service or host

Leading the way in IT testing and certification tools, www.examkiller.net


Nagios Certified Professional Core Exam

C. Remove the service definition

D. Acknowledge the problem

Answer: D

Explanation
Acknowledging a problem will suppress notifications until the problem is resolved.

Question: 6
When a service changes from a non-OK state to an "OK" state, notifications are immediately
send.
Choose the correct answer:

A. True

B. False

Answer: B

Explanation
FALSE: If the recovery is SOFT (meaning event handlers are executed, and Nagios resets the
number of checks), a notification will not be sent until the service is verified in a "HARD" state. If
the recovery is "HARD," notifications will be sent.

Question: 7
When a service is alerting because the attribute it monitors has been permanently removed,
what is the best course of action? (For example: you're monitoring Apache, but Apache has been
removed from the host.)
Choose the correct answer:

A. Acknowledge the problem

B. Disable notifications

C. Disable checks

D. Remove the service definition

Answer: D

Leading the way in IT testing and certification tools, www.examkiller.net


Nagios Certified Professional Core Exam

Explanation
Disable notifications and checks will suppress checks and notifications, but it's best to remove
the service definition if the attribute being monitored is no longer present.

Question: 8
A network outage indicates a condition in which a parent host is down, and children are
therefore unreachable.
Choose the correct answer:

A. True

B. False

Answer: A

Question: 9
You know host "WWW" will be rebooted later in the day. What is the appropriate mechanism for
preventing alerts being generated for that reboot?
Choose the correct answer:

A. Disable Notifications

B. Disable Checks

C. Alert Suppression

D. Schedule downtime

Answer: D

Explanation
When you know a host or service will be down in advance of the fact, scheduling downtime is an
effective way of preventing Nagios from generating alerts and notifications for the host and
services that will be down.

Question: 10
Why compile Nagios from source?
Choose the 4 correct answers:

A. It's good practice to learn how to compile from source, as many plugins require you do so.

Leading the way in IT testing and certification tools, www.examkiller.net


Nagios Certified Professional Core Exam

B. Packages (of the latest version) are only available under the commercial license provided for
the Nagios XI product

C. It's not. The course author is a jerk.

D. To use the latest version.

Answer: ABCD

Explanation
Packages of the latest version of Nagios are available only with a support license. To use the
latest version of Nagios Core, we have to compile from source, as the packages provided in most
repositories are out-of-date. As well, it is good practice for those times when you do have to
compile a plugin.

Question: 11
What action will temporarily suppress notifications until a host or service returns to an OK
state?
Choose the correct answer:

A. Removing the service

B. Disabling checks

C. Acknowledging the problem

D. Disabling notifications

Answer: C

Explanation
Acknowledgment of a problem suppresses notifications until a host or service returns to an OK
state.

Question: 12
The notifications report records all notifications which have been logged by Nagios Core.
Choose the correct answer:

A. True

B. False

Leading the way in IT testing and certification tools, www.examkiller.net


Nagios Certified Professional Core Exam

Explanation
Arguments are passed to command objects after the command object name. Each argument
must be prefixed with an exclamation mark ("!"); the value passed will be passed as a string, and
can therefore contain multiple values. Arguments are separated by exclamation marks.

Question: 94
If the "check_command" specified in a host configuration is left undefined, the host will not be
actively checked.
Choose the correct answer:

A. True

B. False

Answer: A

Explanation
From the Nagios Core documentation: "This directive is used to specify the short name of the
command that should be used to check if the host is up or down. Typically, this command would
try and ping the host to see if it is "alive". The command must return a status of OK (0) or Nagios
will assume the host is down. If you leave this argument blank, the host will not be actively
checked. Thus, Nagios will likely always assume the host is up (it may show up as being in a
"PENDING" state in the web interface). This is useful if you are monitoring printers or other
devices that are frequently turned off. The maximum amount of time that the notification
command can run is controlled by the host_check_timeout option."

Lab1. Adding a Remote Host

Task:

1. Log in to the Nagios Core Host.


2. Change to the /opt/nagios/etc/objects/hosts directory.
3. Edit the new file: host-mylabserver-com.cfg, where host is the unqualified hostname of your
Lab Server.
4. Use the defaults defined in the "linux-server" template.
5. Use the "24x7" time period for the check period.
6. Set the maximum number of check attempts to 10.
7. Use the "check_ping" command, with 2000.00 milliseconds and 80% for the warning
threshold.

Leading the way in IT testing and certification tools, www.examkiller.net


Nagios Certified Professional Core Exam

8. Use 5000.00 milliseconds and 100% for the critical threshold.


9. Make sure the "admins" contact groups is associated with the host.

Solution:

The /opt/nagios/etc/objects/hosts, there should be a file named host-mylabserver-com.cfg,


where host is the unqualified hostname of your Lab Server. For example, in the solution below,
the host name is "glscott4" and the FQDN is "glscott4.mylabserver.com."
The contents of that file should contain the following:
define host{
name glscott4.mylabserver.com
host_name glscott4.mylabserver.com
use linux-server
alias glscott4.mylabserver.com
check_period 24x7
display_name glscott4.mylabserver.com
max_check_attempts 10
check_command check_ping!2000.00,80%!5000.00,100%
contact_groups admins
}

Lab2. Installing the Nagios Remote Plugin Executor

In this lab, we will install the Nagios Remote Plugin Executor on the Nagios Core Host as well as
any remote hosts on which we haven't already installed it. We must install this software there to
install the "check_nrpe" plugin that we use to perform active checks using the NRPE. Use the
latest 3.x series (3.0.1 was current at the time of writing).

1. Re-install the dependencies:


. yum group mark remove "Development Tools"
. yum groupinstall "Development Tools"
. yum install krb5-devel openssl-devel
2. Obtain the source code, which can be found at the Nagios Plugin Exchange.
. cd ~user
. wget https://github.com/NagiosEnterprises/nrpe/archive/nrpe-3.0.1.tar.gz
. gunzip nrpe-3.0.1.tar.gz
. tar -xvf nrpe-3.0.1.tar.gz
. cd nrpe-3.0.1

Leading the way in IT testing and certification tools, www.examkiller.net


Nagios Certified Professional Core Exam

3. Configure the source code, compile it, and install it:


./configure --prefix=/opt/nagios --exec-prefix=/opt/nagios --enable-ssl
--enable-command-args --enable-bash-command-substitution --with-opsys=linux
--with-dist-type=rh --with-init-type=systemd --with-nrpe-user=nagios
--with-nrpe-group=nagios --with-nagios-user=nagios --with-nagios-group=nagios
. make all && make install && make install-config && make install-init
. Check to make sure the "check_nrpe" plugin has been placed in "/opt/nagios/libexec." Make
sure the file is properly owned and has the appropriate permissoins.
4. Edit the NRPE configuration file, which should be at /opt/nagios/etc/nrpe.cfg, so that it has
the following amendments:
. allow_weak_random_seed=1
. ssl_version=SSLv2+
. ssl_client_certs=0
. log_facility=daemon
. debug=1
. pid_file=/opt/nagios/var/nrpe.pid
. server_port=5666
. listen_queue_size=5
. nrpe_user=nagios
. nrpe_group=nagios
. allowed_hosts=127.0.0.1
. dont_blame_nrpe=1
. allow_bash_command_substitution=1
. command_timeout=60
. connection_timeout=300
5. DO NOT enable the NRPE service. It's not necessary on the Nagios Core Host. On all other
hosts, issue the following commands to enable NRPE:
. systemctl enable nrpe.service
. systemctl start nrpe.service

Solution:

The "check_nrpe" binary exists in "/opt/nagios/libexec," and the nrpe.cfg file located in
"/opt/nagios/etc" has the following values:
. allow_weak_random_seed=1
. ssl_version=SSLv2+
. ssl_client_certs=0
. log_facility=daemon
. debug=1
. pid_file=/opt/nagios/var/nrpe.pid
. server_port=5666
. listen_queue_size=5
. nrpe_user=nagios

Leading the way in IT testing and certification tools, www.examkiller.net


Nagios Certified Professional Core Exam

. nrpe_group=nagios
. allowed_hosts=127.0.0.1,
. dont_blame_nrpe=1
. allow_bash_command_substitution=1
. command_timeout=60
. connection_timeout=300

Make SURE to include the commands from the study guide at the bottom of the file:
. command[check_users]=/opt/nagios/libexec/check_users -w $ARG1$ -c $ARG2$
. command[check_load]=/opt/nagios/libexec/check_load -w $ARG1$ -c $ARG2$
. command[check_disk]=/opt/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
. command[check_procs]=/opt/nagios/libexec/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$

Lab3. Adding Services to Service Groups

In this lab, we'll place all of the remote services we're monitoring so far into a "remote-services"
service group.
1. Log in to the Nagios Core Host.
2. Change to the /opt/nagios/etc/objects/servicegroups directory.
3. Edit the new file: remote-services.cfg
4. Use the defaults defined in the "linux-server" template
5. Use "remote-services" for the service group name.
6. Use "Remote Service Group" for the alias.
7. Find all of the services running on our remote servers and add them with the "members"
directive, taking care to pay attention to the pairing of values required.
8. Check your configuration, restart Nagios, and view the Servicegroup in the WebUI.

Solution:

Note that "fqdn-2" and "fqdn-3" should be replaced with the actual unqualified hostnames of
servers you've spun up in Server Labs. Host and service definitions must have already been
created for all members specified below.

define servicegroup{

servicegroup_name remote-services

alias Remote Service Group

members fqdn-2.mylabserver.com,Root Partition,fqdn-2.mylabserver.com,Current Users,fqdn-2.mylabserve


r.com,Total Processes,fqdn-2.mylabserver.com,Current Load,fqdn-2.mylabserver.com,SSH,fqdn-3.mylabserv

Leading the way in IT testing and certification tools, www.examkiller.net