Once you have determined the root reasoning of their „object-oriented“ configuration, might enjoy Nagios‘ freedom and you will clean structure

Once you have determined the root reasoning of their „object-oriented“ configuration, might enjoy Nagios‘ freedom and you will clean structure

dos.dos Arrangement assessment

Nagios configuration may look overly complicated at first glance; even the documentation warns that Nagios is quite powerful and flexible, but it can take a lot of work to get it configured just the way you’d like . Anyway, don’t despair! For the first tests, you can start by tweaking the sample configuration files contained in the /usr/local/share/examples/nagios/ directory, customizing them to your needs.

  • comments start with a „#“ character and span to the end of the line;
  • changeable brands need to begin in the very beginning of the range (we.age. zero indentation desired);
  • adjustable names are instance sensitive;
  • no spaces are allowed around the „=“ sign.

Arrangement concerns means multiple parameters in regards to the overseeing daemon, the latest CGIs and you can, of course, the fresh machines and functions we wish to display. All this information is give among numerous files: we’ll now consider her or him one-by-one.

2.2.step 1 A portion of the setup file

The overall behaviour of the Nagios daemon is determined by the directives included in the main configuration file, /var/www/etc/nagios/nagios.cfg. Though this file contains several dozens of parameters, for most of them the default value is the most reasonable option and you will probably want to care about only very few of them (usually cfg_file, cfg_dir and admin_email). In any case, you can find a detailed description of each and every parameter in the official documentation.

dos.dos.dos This new financing document

The allows you to assign values to the user-definable macros „$Affiliate n $“ (where n is a number between 1 and 32 inclusive). Basically, in Nagios, macros are variables (starting and ending with a dollar sign, „$„) that you can insert into order definitions and that will get expanded to the appropriate value immediately prior to the execution of the command. User-defined macros (and the several other macros Nagios makes available) allow you to keep command definitions generic and simple (see the next chapter for some examples).

User-defined macros are normally used to store recurring items in command definitions (like directory paths) and sensitive information (like usernames and passwords). It is recommended that you set restrictive permissions (600) on the resource file(s) in order to keep sensitive information protected.

The next thing is configuring target analysis, which is possibly the trickiest the main arrangement. We shall ergo put in next chapter completely to this material.

step three.0 Target studies arrangement

So now it is time to share with Nagios what things to continue tabs towards. Therefore, we must likewise have they with advice on the:

  • whenever and ways to would inspections and you may send out announcements;
  • who so you can alert;
  • and this servers and you can features to monitor.

All this information is represented by means of , which are defined by a set of „define“ , enclosed in curly braces and containing a variable number of newline-separated , in keyword/value form. Keywords are separated from values by whitespace and multiple values can be separated by commas; indentation within statements is allowed.

Object definitions can be split into any number of files: just remember to list them all in the main configuration file by using the cfg_document and/or cfg_dir directives.

step 3.1 Timeperiod definition

The timeperiod statement allows you to specify, for each day of the week, one or more time slots in which to run certain checks and/or notify certain people. Time intervals can’t span across midnight and excluded days are simply omitted.

In https://datingmentor.org/local-hookup/billings/ the following example, all the timeperiod definitions are grouped together in a file named timeperiods.cfg stored in the /var/www/etc/nagios/ directory.

3.dos Command definition

The next step is to tell Nagios how to perform the various checks and send out notifications; this is accomplished by defining multiple command objects specifying the actual commands for Nagios to run.


SVAP Group s.r.o.

Zoubkova 3

150 00 Praha 5

+420 724 802 802

+420 608 370 777


Fakturační údaje:

SVAP Group s.r.o.

Voskovcova 932/35

152 00 Praha 5

IČO: 02316145

DIČ: CZ02316145

Bankovní údaje:

FIO Banka

2800503852/2010 (CZK)

2801229197/2010 (EUR)

- CZ8320100000002801229197


SVAPGROUP s.r.o. © 2015 - 2022 | KVMEDIA | Všechna práva vyhrazena