Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
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:
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
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:
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:
B. Disable notifications
C. Disable checks
Answer: D
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.
B. Packages (of the latest version) are only available under the commercial license provided for
the Nagios XI product
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:
B. Disabling checks
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
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."
Task:
Solution:
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).
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
. 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$
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