Guess you want to screen an internet server which have Ip address “step 1

Guess you want to screen an internet server which have Ip address “step 1

That it definition is right and can certainly work. Exactly what if you after decide to create a special online server? Do you see it convenient to help you define a different (nearly identical) demand, with just the brand new Ip address altered? It’s even more productive to take advantageous asset of macros of the composing one common demand such as for instance:

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.

In addition to the ones you will find just viewed, Nagios brings various other helpful macros. Delight make reference to the brand new documentation having reveal listing of all the available macros as well as their legitimacy context. Lower than are an example number of order definitions.

step three.step three 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_several 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.cuatro Server definition

Now we have in the end visited perhaps one of the most crucial facets of Nagios setup: the definition of the latest computers (machine, workstations, devices, etcetera.) that individuals want to display. This will direct me to introduce perhaps one of the most powerful features of Nagios configuration: . Keep in mind that, though our company is discussing they now basic, target inheritance applies to every Nagios items; yet not, it’s regarding the definition of computers and you can qualities that one may obtain the most out of it.

In fact, configuring a host requires establishing quite a few variables; in addition to property value such details will generally function as exact same for almost all computers. Rather than target genetics, this will imply wasting enough time entering a similar parameters more than once and in the end ending up with messy, obese and you can almost uncontrollable setting records.

However, luckily, Nagios is smart sufficient to help save you plenty of typing by allowing that describe special stuff, whoever characteristics might be “inherited” because of the other stuff without having to write him or her. Lower than is actually a short exemplory instance of just how a template is done:

  • every template must be assigned a label with the name directive;
  • since this is not an actual host, you must tell Nagios not to it by setting the value of the check 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 layout target will likely be remaining , we.age. it eters.

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

Well, today let us go from principle to practice and you will define one or two machine templates for our server. Remember that next one to inherits about basic; this really is you can easily once the Nagios allows multiple quantities of theme 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 three.5 Solution meaning

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:

Leave a Reply

Your email address will not be published. Required fields are marked *