«... A template is a set of objects that can be applied to several network nodes.
Objects may be as follows:
- data elements;
- triggers;
- graphs;
- groups of data elements;
- complex screens (starting from Zabbix 2.0);
- rules of a low-level detection (starting with Zabbix 2.0);
- web scenarios (starting from Zabbix 2.2)
As soon as many network nodes are similar or alike in a real-life, the sets of objects (data elements, triggers, and graphs...), created by you for a certain network node, can be useful for many nodes. Certainly, you can copy them for each new network node, but this would require a lot of manual work. Instead, you can use templates and copy these objects into one template and then apply it to any number of required network nodes.
When a template is applied to a network node, all objects (data elements, triggers, and graphs…) are added to this network node from the template. Templates are applied to each node directly (not to a group of nodes). Templates are usually used to group objects of certain services or applications (Apache, MySQL, PostgreSQL, Postfix…) and then are applied to network nodes, where these services run. One more advantage of using templates is when there is a need to change something at all network nodes, changing something on the level of a template is spread to all network nodes where this template is applied. Therefore, using templates is a great way to decrease the load and rationalize the configuration of Zabbix (the section «7.7 Templates» of the official documentation for Zabbix 4.2) …» This article is going to address setting up monitoring of NetPing devices in the Zabbix 4.2 system using ready templates.
Requirements
To implement the solution, there is a need to have:
- any device for monitoring microclimate of server rooms and controlling the power supply from the line of NetPing (UniPing server solution v4/SMS, UniPing server solution v3/SMS, UniPing server solution v3, UniPing v3, NetPing SMS, NetPing IO v2, NetPing 8/PWR-220 v4/SMS, NetPing 8/PWR-220 v3/SMS, NetPing 4/PWR-220 v4/SMS, NetPing 4/PWR-220 v3/SMS, NetPing 2/PWR-220 v4/SMS, NetPing 2/PWR-220 v2/SMS, NetPing 2/PWR-220 v3/ETH);
- Zabbix monitoring system (in the article, the version Zabbix 4.2.5, official documentation is used);
- ready templates for NetPing devices.
Configuring Zabbix 4 Templates
In details, the process of creating templates in the monitoring system Zabbix 4.2 is described in the official documentation:
- The section «7.7.1 Configuring a template»;
- The section «7.7.2 Linking/unlinking»;
- The section «7.7.3 Nesting»
Ready Templates Zabbix 4 for NetPing Devices
Device
|
Description
|
Purpose
|
Download
a Template
|
---|---|---|---|
UniPing server solution v4/SMS UniPing server solution v3/SMS |
Automatic discovery of necessary parameters:
Automatic creating of graphs:
Automatic creating of triggers for changing statuses:
|
Zabbix template | Zabbix_4.x_Template_UniPing_ServerSolution_v4SMS.xml |
UniPing server solution v3 |
Automatic discovery of necessary parameters:
Automatic graph creating for:
Automatic creating of triggers for changing the statuses of:
|
Zabbix templates | |
UniPing v3 |
Automatic discovery of necessary parameters:
Automatic graph creating for:
Automatic creating of triggers for changing statuses:
|
Zabbix template | |
NetPing SMS |
Automatic discovery of necessary parameters:
Automatic creating of triggers on changing of statuses:
|
Zabbix templates | |
NetPing IO v2 |
Automatic discovery of necessary parameters:
Automatic graph creating:
|
Zabbix templates | |
NetPing 8/PWR-220 v3/SMS |
Automatic discovery of necessary parameters:
Automatic graph creating for:
Automatic creating of triggers for changing statuses:
|
Zabbix template | |
NetPing 4/PWR-220 v3/SMS |
Automatic discovery of necessary parameters:
Automatic graph creating:
Automatic creating of triggers for changing of statuses:
|
Zabbix template | |
NetPing 2/PWR-220 v2/SMS |
Automatic discovery of necessary parameters:
Automatic graph creating:
Automatic creating of triggers for changing statuses:
|
Zabbix template | |
NetPing 2/PWR-220 v3/ETH |
Automatic discovery of necessary parameters:
Automatic graph creating:
Automatic creating of triggers for changing statuses:
|
Zabbix template |
Importing and Applying a Ready Template for NetPing in Zabbix 4
After downloading ready templates, there is a need to import them to the Zabbix monitoring system. To do this, there is a need to go to the menu «Configuration» → «Templates» and click the button «Import».
In the window for imports, click the button «Choose File» and choose a template in the .XML format for downloading to PC. After this, check checkboxes the template elements that are required when importing in Zabbix (see the screenshot below), and click the button «Import».
Therefore, it is possible to import all ready NetPing templates that are present. Imported templates, the same as other templates in Zabbix, can be seen in the window of templates «Configuration» → «Templates».
Now, there is a need to apply a necessary template to the required NetPing device. To do this, there is a need to create a network node in the configuration window «Configuration» → «Hosts» → «Create host».
In a node configuration window, at the tab «Host», specify a preferred name for a device, a host group, and an IP address with a port in the settings of an SNMP-interface.
In a node configuration window, at the tab «Templates», add a new template from the list: «Select» → «Add».
In a node configuration window, at the tab «Macros», add the next macros: {$SNMP_COMMUNIY_UNIPING} = %COMMUNITY% or {$SNMP_COMMUNIY_NETPING} = %COMMUNITY%.
A name of macros depends on the settings of a ready NetPing template. In templates for devices with the name «UniPing», a macros name «{$SNMP_COMMUNIY_UNIPING}» is used. In templates for devices with the name «NetPing», a macros name «{$SNMP_COMMUNIY_NETPING}» is used.
where:
%COMMUNITY% — is a password specified at the page «SETUP» of a web interface of a NetPing device.
After the implementation of the settings described above, there is a need to save the configuration of a network node using the button «Add».
Result
As a result of the settings described above, it is possible to add any NetPing device to the monitoring system Zabbix on the basis of templates that automatically create data elements, triggers, graphs, and have discovery rules for all sensors, IO-lines, and relays.
Triggers fired by NetPing devices
Graphs from NetPing devices