Guess you want to monitor a web site machine which have Internet protocol address “1

Guess you want to monitor a web site machine which have Internet protocol address “1

This definition is correct and certainly will indeed work. Exactly what for people who after propose to put an alternate online servers? Could you notice it simpler so you’re able to explain another (nearly the same) order, with only the fresh Ip changed? It is a whole lot more productive when deciding to take advantage of macros by the writing just one simple order 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.

And the of these i’ve just seen, Nagios provides other beneficial macros. Delight consider the documentation to possess reveal selection of all available macros in addition to their validity perspective. Less than is an example group of command significance.

step 3.3 Contact definition

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_period directives must be timeperiod objects; and the values of the host_notification_demand and service_notification_demand directives must be command objects.

step 3.4 Host definition

Now we have finally started to one of the most important components of Nagios setting: the expression the new servers (server, workstations, equipment, etc.) we need certainly to display screen. This will head me to introduce probably one of the most strong attributes of Nagios setup: . Observe that, though we’re revealing they now earliest, target inheritance pertains to every Nagios things; yet not, it’s in the definition of machines and functions to get the most from it.

Indeed, configuring an atmosphere need starting a lot of details; and value of this type of variables will generally function as exact same for most computers. Versus target inheritance, this will suggest wasting a lot of time typing an identical details more than once and eventually winding up having cluttered, over weight and you will nearly uncontrollable arrangement documents.

But the good news is, Nagios makes sense adequate to help you save many entering by allowing you to definitely describe unique objects, whose characteristics would be “inherited” because of the almost every other things without having to write her or him. Below is actually a brief instance of how a theme 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 theme object will be left , we.e. 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 us go from principle to apply and establish several server templates for the server. Observe that another you to tylko singli nudysta randki definitely inherits on the basic; this really is you’ll be able to since Nagios lets multiple levels of layout items.

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:

Leave a Reply

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

Loading...