Suppose we want to display screen an internet host having Internet protocol address “1

Suppose we want to display screen an internet host having Internet protocol address “1

So it meaning is right and certainly will certainly do the job. But what for folks who afterwards decide to include a separate online machine? Do you really see it much easier so you’re able to describe an alternate (almost similar) order, with only the fresh Ip address altered? It’s alot more efficient for taking advantage of macros from the writing a single universal demand bdsm.com przeglД…d particularly:

and leave Nagios the responsibility to expand the built-in $HOSTADDRESS$ macro to the appropriate IP address, obtained from the host definition (see below). As you’ll remember from the previous chapter, the $USER1$ macro holds the path to the plugins directory.

Plus the of those you will find just seen, Nagios will bring various other of use macros. Please make reference to the fresh new records getting an in depth a number of every available macros as well as their legitimacy context. Less than was an example selection of command definitions.

step three.step 3 Contact meaning

get in touch with objects allow you to specify people who should be notified automatically when the alert conditions are met. Contacts are first defined individually and then grouped together in contactgroup objects, for easier management.

For the first time, in the following definitions, we will refer to previously defined objects. In fact, the values of the host_notification_months and service_notification_several months directives must be timeperiod objects; and the values of the host_notification_command and service_notification_demand directives must be command objects.

step 3.4 Machine meaning

We have now finally visited one of the most very important components of Nagios setup: the expression the latest machines (machine, workstations, gadgets, etc.) that people should screen. This may lead us to introduce probably one of the most strong popular features of Nagios setting: . Note that, though we’re revealing they now basic, object heredity relates to all of the Nagios stuff; however, it is regarding the concept of computers and features that one may obtain the most out of it.

Actually, configuring an atmosphere needs creating plenty details; in addition to worth of such variables will normally be the same for many computers. In place of object genetics, this will imply throwing away long typing the same variables more than once and ultimately ending up which have cluttered, over weight and you may almost uncontrollable setup data files.

But luckily, Nagios is sensible enough to save you enough entering by permitting you to explain special stuff, whose features are “inherited” from the other objects without the need to write her or him. Below is actually a quick exemplory instance of exactly how a template is established:

  • every template must be assigned a name with the name directive;
  • since this is not an actual host, you must tell Nagios not to it by setting the value of the sign in directive to 0; this property doesn’t get inherited and defaults to 1, so you won’t need to explicitely override it in all “children” objects;
  • a template object will likely be kept , we.age. it eters.

To create an actual host object from a template, you simply have to specify the template name as the value of the use directive and make sure that all mandatory fields are either inherited or explicitely set:

Better, now let’s move from concept to rehearse and define several machine templates for the servers. Note that the second one to inherits regarding the very first; this will be you can easily since Nagios lets several amounts of layout things.

Hosts can optionally be grouped together with the hostgroup statement, which has no effect on monitoring, but simply allows you to display the hosts in groups in the CGIs.

step 3.5 Services definition

Configuring the services to monitor is much like configuring hosts: object inheritance can save you a lot of typing and you can group services together with the optional servicegroup statement. Below is the definition of our service template:

Comments are closed.