Zabbix 4 Templates for NetPing Devices

  • Published In: Tutorial
  • Created Date: 2019-09-03
  • Hits: 2492

«... 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:

Configuring Zabbix 4 Templates

In details, the process of creating templates in the monitoring system Zabbix 4.2 is described in the official documentation:

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:

  • temperature sensors;
  • humidity sensors;
  • IO-lines;
  • relays;
  • smoke sensor (current sensor);
  • GSM-modem.

Automatic creating of graphs:

  • temperature sensors;
  • humidity sensors;
  • IO-lines;
  • relays;
  • smoke sensor (current sensor).

Automatic creating of triggers for changing statuses:

  • temperature sensors;
  • humidity sensors;
  • smoke sensor (current sensor);
  • GSM-modem.
Zabbix template Zabbix_4.x_Template_UniPing_ServerSolution_v4SMS.xml
UniPing server solution v3

Automatic discovery of necessary parameters:

  • temperature sensor;
  • humidity sensor;
  • IO-lines;
  • relays;
  • smoke sensor (current sensor).

Automatic graph creating for:

  • temperature sensors;
  • humidity sensors;
  • IO-lines;
  • relays;
  • smoke sensor (current sensor).

Automatic creating of triggers for changing the statuses of:

  • temperature sensors;
  • humidity sensors;
  • smoke sensor (current sensor)
Zabbix templates

Zabbix_4.x_Template_UniPing_ServerSolution_v3.xml

UniPing v3

Automatic discovery of necessary parameters:

  • temperature sensors;
  • humidity sensor;
  • IO-lines;
  • relays;
  • smoke sensor (current sensor).

Automatic graph creating for:

  • temperature sensors;
  • humidity sensor;
  • IO-lines;
  • relays;
  • smoke sensor (current sensor).

Automatic creating of triggers for changing statuses:

  • temperature sensors;
  • humidity sensor;
  • smoke sensor (current sensor)
Zabbix template

Zabbix_4.x_Template_UniPing_v3.xml

NetPing SMS

Automatic discovery of necessary parameters:

  • GSM-modem

Automatic creating of triggers on changing of statuses:

  • GSM-modem
Zabbix templates

Zabbix_4.x_Template_NetPing_SMS.xml

NetPing IO v2

Automatic discovery of necessary parameters:

  • IO-lines (logic level, incoming pulse counter)

Automatic graph creating:

  • IO-line (logic level, incoming pulse counter)
Zabbix templates

Zabbix_4.x_Template_NetPing_IO_v2.xml

NetPing 8/PWR-220 v4/SMS

NetPing 8/PWR-220 v3/SMS

Automatic discovery of necessary parameters:

  • temperature sensors;
  • humidity sensors;
  • IO-lines;
  • relays;
  • GSM-modem.

Automatic graph creating for:

  • temperature sensors;
  • humidity sensor;
  • IO-lines;
  • relays

Automatic creating of triggers for changing statuses:

  • temperature sensor;
  • humidity sensor;
  • relay;
  • GSM-modem
Zabbix template

Zabbix_4.x_Template_NetPing8_PWR-220_v4SMS.xml

NetPing 4/PWR-220 v4/SMS

NetPing 4/PWR-220 v3/SMS

Automatic discovery of necessary parameters:

  • temperature sensor;
  • humidity sensor;
  • relay;
  • GSM-modem;
  • power source.

Automatic graph creating:

  • temperature sensor;
  • humidity sensor;
  • relay;
  • power source.

Automatic creating of triggers for changing of statuses:

  • temperature sensor;
  • humidity sensor;
  • relay;
  • GSM-modem;
  • power source
Zabbix template

Zabbix_4.x_Template_NetPing4_PWR-220_v3SMS.xml

NetPing 2/PWR-220 v4/SMS

NetPing 2/PWR-220 v2/SMS

Automatic discovery of necessary parameters:

  • temperature sensor;
  • humidity sensor;
  • IO-lines;
  • relays;
  • GSM-modem;
  • power source.

Automatic graph creating:

  • temperature sensor;
  • humidity sensor;
  • IO-lines;
  • relays;
  • power source.

Automatic creating of triggers for changing statuses:

  • temperature sensor;
  • humidity sensor;
  • relays;
  • GSM-modem;
  • power source
Zabbix template

Zabbix_4.x_Template_NetPing2_PWR-220_v4SMS.xml

NetPing 2/PWR-220 v3/ETH

Automatic discovery of necessary parameters:

  • temperature sensor;
  • humidity sensor;
  • IO-lines;
  • relays.

Automatic graph creating:

  • temperature sensor;
  • humidity sensor;
  • IO-lines;
  • relays.

Automatic creating of triggers for changing statuses:

  • temperature sensor;
  • humidity sensor;
  • relays
Zabbix template

Zabbix_4.x_Template_NetPing2_PWR-220_v3ETH.xml

Importing and Applying a Ready Template for NetPing in Zabbix 4

Before importing templates!

To show statuses from relays, GSM modem, and other objects of NetPing in Zabbix in the text format that is clear for a human, there is a need to configure encoding numeric values. To do this, open the tab «Administration» → «General» and select the item «Value mapping» from the dropdown menu in the right upper part of the page: 

Zabbix configuring encoding of numeric values for NetPing

On the page that opens, click the button «Import» (1) to import a ready file with the encoding of numeric values (it can be downloaded here) or click the button «Create value map» (2) and create parameters manually according to the picture below:

Zabbix selecting importing or creating a new encoding of numeric values for NetPing

A template for creating values map for NetPing

If necessary, indicate each created encoding of numeric values in the settings of the corresponding data element in the template configuration.

Indicate created encoding of numeric values in settings of corresponding data element.

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».

Importing ready templates in NetPing devices

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».

Parameters of imports of ready templates for NetPing devices

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».

Zabbix Templates Window

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.

Connecting a NetPing device to the monitoring system - indicating data for connecting

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.

NetPing devices in the monitoring system Zabbix

Triggers fired by NetPing devices

Operating of triggers from NetPing devices

Graphs from NetPing devices

A temperature graph from a NetPing device in Zabbix 

A relative humidity graph from a NetPing device Zabbix

A graph of a logic level of anIO lines from a NetPing device in Zabbix

A graph of an incoming pulse counter of an IO line from а NetPing device in Zabbix

A graph of a relay status from a NetPing device in Zabbix


Tags: All devices
comments powered by Disqus