0% found this document useful (0 votes)
161 views23 pages

Zabbix Integration Guide Application Note 20211015 - 2

This document provides guidance on integrating Advantech cellular routers with the Zabbix monitoring software. It describes how to install and configure the Zabbix server, use SNMP and Zabbix agent interfaces to monitor devices, apply Zabbix templates for monitoring specific metrics, and view monitored data in the Zabbix interface. Templates for monitoring Advantech routers can be downloaded from the Advantech Engineering Portal.

Uploaded by

Alex Mora
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
161 views23 pages

Zabbix Integration Guide Application Note 20211015 - 2

This document provides guidance on integrating Advantech cellular routers with the Zabbix monitoring software. It describes how to install and configure the Zabbix server, use SNMP and Zabbix agent interfaces to monitor devices, apply Zabbix templates for monitoring specific metrics, and view monitored data in the Zabbix interface. Templates for monitoring Advantech routers can be downloaded from the Advantech Engineering Portal.

Uploaded by

Alex Mora
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Zabbix Integration

Guide
APPLICATION NOTE
Zabbix Integration Guide

Used symbols
Danger – Information regarding user safety or potential damage to the router.

Attention – Problems that can arise in specific situations.

Information, notice – Useful tips or information of special interest.

Example – Example of function, command or script.

Open Source Software License


The software in this device uses various pieces of open source software governed by
following licenses: GPL versions 2 and 3, LGPL version 2, BSD-style licenses, MIT-style
licenses. The list of components together with complete license texts can be found on the
device itself: See Licenses link at the bottom of the router’s main Web page (General Status)
or point your browser to address DEVICE_IP/licenses.cgi. If you are interested in obtaining
the source, please contact us at:

[email protected]

Modifications and debugging of LGPL-linked executables:

The manufacturer of the device hereby grants the right to use debugging techniques (e.g.
decompilation) and making customer modifications of any executable linked with a LGPL li-
brary for own purposes. Note these rights are limited to the customer’s own usage. No further
distribution of such modified executables and no transmission of the information obtained dur-
ing these actions may be done.

Advantech Czech s.r.o., Sokolska 71, 562 04 Usti nad Orlici, Czech Republic.
Document No. APP-0089-EN, revision from October 15, 2021. Released in the Czech Republic.

i
Zabbix Integration Guide

Contents
1 Zabbix Server 1
1.1 Monitoring Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Server Installation and Configuration . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Zabbix SNMP Templates 4

3 Zabbix Agent User Module 7


3.1 Connectivity Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2 Zabbix Agent Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3 Custom Items Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.4 Items Supported by Zabbix Agent . . . . . . . . . . . . . . . . . . . . . . . . . . 13

4 Licenses 17

5 Related Documents 18

ii
Zabbix Integration Guide

List of Figures
1 Logical Schema of a Zabbix Configuration . . . . . . . . . . . . . . . . . . . . . 2
2 Zabbix Agent Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3 Zabbix Server Host Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4 Zabbix Server Encryption Configuration . . . . . . . . . . . . . . . . . . . . . . 10
5 Zabbix Agent Configuration, Custom Keys . . . . . . . . . . . . . . . . . . . . . 12
6 Licenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

iii
Zabbix Integration Guide

List of Tables
1 Template Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2 Defined Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3 Zabbix Agent Configuration, Connectivity Fields . . . . . . . . . . . . . . . . . . 9
4 Agent Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5 Zabbix Agent Configuration, Custom Keys . . . . . . . . . . . . . . . . . . . . . 12
6 Agent Items Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
7 Specific Items Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

iv
Zabbix Integration Guide

1. Zabbix Server
Remote monitoring is the process of supervising IT systems from a central management
server. In general, monitoring improves reliability and security of your network because it
facilitates early detection of erroneous conditions.

For an introduction of remote monitoring and a list of other monitoring tools, please see the
Remote Monitoring Application Note [1]. This document describes monitoring of Advantech
cellular routers using Zabbix 5.0 LTS.

Zabbix is an open-source monitoring software tool for diverse IT components, including


networks, servers, virtual machines (VMs) and cloud services. It can monitor numerous pa-
rameters of a network and the health and integrity of servers1 .

1.1 Monitoring Operations


Zabbix monitors Hosts (e.g. routers) through one or more Interfaces. There are two inter-
face types (protocols) that can be used with Advantech routers:

• SNMP, which supports also SNMP Traps (see Section 2).


• Agent, which supports both active and passive checks (see Section 3).

Individual status checks are defined as Items. Each Item represents a specific Type of
information (numeric or character), obtained via a specific check type (SNMP, SSH, passive
or active agent) with a specific update period and storage interval. Each item has a unique
Key, e.g. “system.cpu.load”.

A set of Items (and other entities such as Triggers, Graphs, or Discovery Rules) can be
grouped together into a Template to speed up the deployment of monitoring tasks on a host.
Templates are linked to Hosts or to other Templates.

Templates for Advantech router monitoring zbx_conel_templates.xml can be down-


loaded from the Advantech Engineering Portal2 .

Items are logically grouped into Applications (e.g. Info, Status, Interfaces). Some Items
also auto-populate host Inventory fields (e.g. Name, OS, Serial Number).

1
https://www.zabbix.com
2
https://icr.advantech.cz/products/software/user-modules#zabbix-agent

1
Zabbix Integration Guide

Figure 1: Logical Schema of a Zabbix Configuration

To start monitoring a router you need to create a Host, and:

1. Give it an arbitrary but unique Host name,

2. Assign the Host to a Host group, e.g. “Routers”,

3. Set Interfaces that should be used (SNMP or Agent), possibly including Encryption keys,

4. Link templates that define the Items to be monitored (see the following sections for a list
of compatible templates).

If everything works fine, you should after some minutes see:

• Green Availability and Agent encryption indicators under Configuration – Hosts,


• Router inventory details under Inventory – Hosts,
• Retrieved status information under Monitoring – Latest data

Every item has a defied refresh rate, so some items may populated later than others. If you
want to request an immediate update of specific (or all) items, open the Host Configuration,
click Items on the top bar, then check the items you want to update and click the Execute now
button.

2
Zabbix Integration Guide

1.2 Server Installation and Configuration


The easiest way to install a Zabbix server is to download3 the ISO image and install4 a
Zabbix Appliance on a virtual machine, e.g. VirtualBox5 . The „root“ password will be „zab-
bix“; you will need this only for advanced configuration changes, such as deployment of TLS
certificates.

Once installed, connect from your Web browser to the admin Web page at http://<ip_
address> and login as „Admin“ with a password „zabbix“.

If you want to use Advantech Templates, download zbx_conel_templates.xml from the Ad-
vantech Engineering Portal, then enter the Zabbix Configuration section and click Templates,
or enter http://<ip_address>/templates.php and then import the zbx_conel_templates.xml
file.

3
https://www.zabbix.com/download_appliance
4
https://www.zabbix.com/documentation/current/manual/appliance
5
https://www.virtualbox.org

3
2. Zabbix SNMP Templates
To monitor an Advantech cellular router via the standard SNMP:

• In the router configuration [2], enable the SNMP service,


• In the Zabbix Host Configuration, add a SNMP Interface and link the Host to one or more
SNMP Templates (see below).

The Zabbix User Module is not required for the SNMP monitoring. The following SNMP Tem-
plates can be used with Advantech cellular routers (indentation shows nested templates):

Template Item name Populated inventory


Module Conel Basic SNMP [3] Product name Type
Firmware OS
Serial number Serial Number A
RTC battery
Temperature
Voltage

Module Generic SNMP SNMP agent availability


System name Name
System object ID
System description
System location Location
System contact details Contact
Uptime
Module ICMP Ping ICMP ping
ICMP loss
ICMP response time

Module Interfaces Simple SNMP Interface type


Operational status
Speed
Bits received
Bits sent
Inbound packets discarded
Inbound packets with errors
Outbound packets discarded
Outbound packets with errors

Continued on next page


4
Zabbix Integration Guide

Continued from previous page

Template Description Populated inventory


Module Conel Mobile 1 SNMP [3] Modem IMEI Serial Number B
Modem ESN
Modem MEID
Mobile registration
Mobile technology
Mobile operator
Mobile card
Mobile uptime
Mobile signal quality
Mobile signal level (CSQ)
Mobile signal strength
Strength threshold Fair (A)
Strength threshold Weak (B)
Module Conel Mobile 1 Data SNMP Mobile inbound data 1/2
[3] Mobile outbound data 1/2
Mobile connections 1/2
Mobile online time 1/2
Mobile offline time
Mobile signal average
Mobile signal min
Mobile signal max
Module Conel GPS SNMP [3] Location altitude
Location latitude Latitude
Location longitude Longitude
GPS satellites
Table 1: Template Items

5
Zabbix Integration Guide

We recommend you create a template specific to your router (e.g. “ICR-3211”) and then
include (or not) the individual template modules depending on the router functions and your
monitoring needs. For example, you should include the “Conel GPS SNMP” only if the GPS
position is available.

Advantech custom templates, denoted by [3], are not included in the default installation;
they need to be downloaded and installed manually. The name “Conel” is used for con-
sistency with the SNMP OID [3].

The strength thresholds A and B are auto-calculated items that depend on the used mobile
technology. They are used by the signal strength triggers.

From the Mobile-2 OIDs [3] only the MobileYesterday table is represented in the Template
Module Conel Mobile Data SNMP. The MobileToday table contains incomplete interim values
only and the other table such as MobileThisWeek are not needed because Zabbix maintains
its own statistics of past data.

The templates listed above define the following triggers:

Template Trigger name Condition


Module Generic SNMP System name has changed
Host has been restarted Uptime < 10m
No SNMP data collection
Module ICMP Ping Unavailable by ICMP ping
High ICMP ping loss 20 < ICMP loss < 100
High ICMP ping response time ICMP response time > 0.15
Module Conel Mobile SNMP [3] Fair Mobile Signal B < signal strength ≤ A
Weak Mobile Signal signal strength ≤ B
Table 2: Defined Triggers

6
Zabbix Integration Guide

3. Zabbix Agent User Module


3.1 Connectivity Configuration
To monitor an Advantech cellular router via the Zabbix agent:
• Install the Zabbix Agent User Module to the router. For more information on how to
upload a user module see the Configuration Manual [2], chapter Customization –> User
Modules.
• In the Agent Configuration, configure connectivity to the Zabbix sever.
• In the Zabbix Host Configuration, add an Agent Interface, define Encryption settings to
be aligned with the Agent configuration, and link the Host to one or more Agent Tem-
plates.
Configuration of the Agent connectivity is in the upper part of the Configuration screen.
The bottom part is used for custom key configuration (see Section 3.3).

Figure 2: Zabbix Agent Configuration

7
Zabbix Integration Guide

Item Description
Enable Agent Whether the agent will be started.
Allow Remote Commands Whether remote commands from Zabbix server are al-
lowed. When disabled, the „system.run“ checks will be re-
jected.
Listen Port Agent (passive mode) will listen on this port for connections
from the server. Default is 10050.
Accept Server Incoming (passive mode) connections will be accepted only
from the hosts listed here. Enter an IP address of your Zab-
bix server. When empty, passive mode is disabled.
Accept unencrypted Accept (passive) connections without encryption. Not rec-
ommended! The following „Accept xxx“ checks shall match
the „Connections to host“ field in the Zabbix Encryption con-
fig, see Figure X.
Accept Pre-Shared Key Accept (passive) connections with TLS and a pre-shared
(PSK) key (PSK). When enabled, the PSK and its identity must be
configured.
Accept certificate Accept (passive) connections with TLS and a certificate.
When enabled, the CA and Local Certificate and Local Pri-
vate Key must be configured.
Connect Servers IP:port (or hostname:port) of Zabbix server for active
checks. Multiple comma-delimited addresses can be pro-
vided to use several independent Zabbix servers in parallel.
When empty, active checks will be disabled.
Encrypt Connection How the agent should connect to Zabbix server. Shall
match the „Connections from host“ field in the Zabbix En-
cryption config, Figure X.
Hostname Unique hostname. Shall match the „Host name“ field in the
Zabbix Host config, Figure Y.
Refresh Checks Each How often does the Agent retrieve the list of active checks
from the Server, in seconds. Default is 10 s.
Send Buffer Each How many check results (items) shall the Agent buffer be-
fore establishing a connection and syncing values from this
buffer to Zabbix server. Default is 5 s.
Max Buffer Size Defines maximum size of the buffer. When this buffer size
is reached, the Agent will sync buffered values immediately.
Default is 100 B.
Continued on next page

8
Zabbix Integration Guide

Continued from previous page

Item Description
PSK Identity Pre-shared key identity string. Shall match the „PSK iden-
tity“ field in the Zabbix Encryption config, Figure X. The
same PSK is used for both passive and active checks.
Pre-Shared Key (PSK) Pre-shared key to be used. Shall match the „PSK“ field in
the Zabbix Encryption config, Figure X.
CA Certificate CA certificate chain for the authority that issued the Zabbix
server certificates.
Local Certificate Certificate of the router, corresponding to the private key.
The purpose must include „client autentication“. When gen-
erated by OpenSSL, the „extendedKeyUsage = clientAuth“
must be set. The CA certificate of the authority that issued
this certificate must be included in the TLSCAFile in the
server configuration.
Local Private Key Private key of the router. The same private key and certifi-
cates are used for both passive and active checks.
Accept Cert Issuer Allowed server certificate issuer. When specified, shall
match the server certificate.
Accept Cert Subject Allowed server certificate subject. When specified, shall
match the server certificate.
Table 3: Zabbix Agent Configuration, Connectivity Fields

Each Router needs a corresponding entry in the Zabbix Host configuration.

• The „Host name“ in the server config shall match the „Hostname“ in the Agent configu-
ration.
• The monitoring interfaces (protocols) need to be explicitly listed and the router IP address
or DNS name shall be specified.

The Encryption tab shall match the Agent configuration described above.

• The „Connections to host“ in the server config shall match the Accept unencrypted,
Accept Pre-Shared Key (PSK) and Accept certificate fields.
• The „Connection from host“ in the server config shall match the Encrypt Connection in
the Agent config.
• The PSK and its identity (if used) shall also match.

9
Zabbix Integration Guide

To use the TLS certificates, the Zabbix server needs its own certificates (TLSCAFile, TLSCert-
File and TLSKeyFile) as described in the Zabbix Manual. See https://www.zabbix.com/
documentation/current/manual/encryption/using_certificates

The purpose of the certificate must include „server autentication“. When generated by
OpenSSL, the „extendedKeyUsage = serverAuth“ must be set.

Figure 3: Zabbix Server Host Configuration

Figure 4: Zabbix Server Encryption Configuration

10
Zabbix Integration Guide

3.2 Zabbix Agent Templates


Depending on the Zabbix server configuration, the agent can perform a large amount of
checks (measurements). Data are gathered in „items“. In the Section 3.4 you can see a
complete list of items supported.

Please don’t create unnecessary load on the router and avoid using too many metrics.

The following (passive) Agent templates can be used with Advantech cellular routers (in-
dentation shows nested templates):

Template Item name Populated inventory


Module Linux CPU by Zabbix Load average
agent Interrupts per second
Context switches per second
CPU guest time (and similar)
Module Conel Resources by Storage / free
Agent [3] Storage / used
Storage /opt free
Storage /opt used
Storage /var/data free
Storage /var/data used
System memory available
System memory used

Module Conel Integrity by Checksum /etc/passwd


Agent [3] Checksum /etc/settings.*

Table 4: Agent Templates

There is another, a similar list of Agent templates for active checks.

11
Zabbix Integration Guide

3.3 Custom Items Configuration


In addition to the standard items you can define custom items to be monitored by your
agent, active or passive. Configuration of the custom items is in the bottom part of the Config-
uration screen.

Figure 5: Zabbix Agent Configuration, Custom Keys

Item Description
Custom Key Key of a Zabbix item.
Command Command to execute, with optional arguments. This must
be a single command on a single line. The command will
be executed and a first line of the textual output (stdout) will
be used as a value.
Timeout Limits computation time of one check. Default 3 s.
Table 5: Zabbix Agent Configuration, Custom Keys

The Command field supports only a limited set of characters: double-quotes (“) are not
allowed and dollar signs “$” have to be prefixed with a backslash “\$”. If you need to
build a more complex check, please create a shell script and use the Command field to
trigger it.

12
Zabbix Integration Guide

3.4 Items Supported by Zabbix Agent


Standard Zabbix items (checks) are described in details https://www.zabbix.com/documentation/
current/manual/config/items/itemtypes/zabbix_agent

Zabbix documentation also indicates which of the items are supported on various plat-
forms: https://www.zabbix.com/documentation/current/manual/appendix/items/supported_
by_platform

The following table complements that information and explains which of the standard agent
items are supported on Advantech cellular routers.

Item Key Supported


agent.hostname Yes
agent.ping Yes
agent.version Yes
kernel.maxfiles Yes
kernel.maxproc Yes
log[file,<regexp>,<encoding>,<maxlines>,<mode>,<output>,<maxdelay>] Active only
e.g.: log[/var/log/messages,"authentication failure"„,skip„]
log.count[file,<regexp>,<encoding>,<maxproclines>,<mode>,<maxdelay>] Active only
logrt[file_regexp,<regexp>,<encoding>,<maxlines>,<mode>,<output>, Active only
<maxdelay>,<options>]
logrt.count[file_regexp,<regexp>,<encoding>,<maxproclines>,<mode>, Active only
<maxdelay>,<options>]
net.dns[<ip>,zone,<type>,<timeout>,<count>] Yes
net.dns.record[<ip>,zone,<type>,<timeout>,<count>] Yes
net.if.collisions[if] Yes
net.if.discovery Yes
net.if.in[if,<mode>] Yes
net.if.out[if,<mode>] Yes
net.if.total[if,<mode>] Yes
net.tcp.listen[port] Yes
net.tcp.port[<ip>,port] Yes
net.tcp.service[service,<ip>,<port>] Yes
net.tcp.service.perf[service,<ip>,<port>] Yes
net.udp.listen[port] Yes
Continued on next page

13
Zabbix Integration Guide

Continued from previous page

Item Key Supported


net.udp.service[service,<ip>,<port>] Yes
net.udp.service.perf[service,<ip>,<port>] Yes
proc.cpu.util[<name>,<user>,<type>,<cmdline>,<mode>,<zone>] Yes
proc.mem[<name>,<user>,<mode>,<cmdline><memtype>] Yes
proc.num[<name>,<user>,<state>,<cmdline><zone>] Yes
sensor[device,sensor,<mode>] No
system.boottime Yes
system.cpu.discovery Yes
system.cpu.intr Yes
system.cpu.load[<cpu>,<mode>] Yes
system.cpu.num[<type>] Yes
system.cpu.switches Yes
system.cpu.util[<cpu>,<type>,<mode>] Yes
system.hostname Yes
system.hw.chassis[<info>] No
system.hw.cpu[<cpu>,<info>] Yes
system.hw.devices[<type>] No
system.hw.macaddr[<interface>,<format>] Yes
system.localtime[<type>] Passive only
system.run[command,<mode>] If enabled
e.g. system.run[ls /]
system.stat[resource,<type>] No
system.sw.arch Yes
system.sw.os[<info>] Yes
system.sw.packages[<package>,<manager>,<format>] No
system.swap.in[<device>,<type>] No
system.swap.out[<device>,<type>] No
system.swap.size[<device>,<type>] No
system.uname Yes
system.uptime Yes
system.users.num No
vfs.dev.discovery No
Continued on next page

14
Zabbix Integration Guide

Continued from previous page

Item Key Supported


vfs.dev.read[<device>,<type>,<mode>] No
vfs.dev.write[<device>,<type>,<mode>] No
vfs.dir.count[dir,<regex_incl>,<regex_excl>,<types_incl>,<types_excl>, Yes
<max_depth>,<min_size>,<max_size>,<min_age>,<max_age>]
e.g. vfs.dir.count[/dev]
vfs.dir.size[dir,<regex_incl>,<regex_excl>,<mode>,<max_depth>] Yes
vfs.file.cksum[file] Yes
vfs.file.contents[file,<encoding>] Yes
vfs.file.exists[file,<types_incl>,<types_excl>] Yes
vfs.file.md5sum[file] Yes
vfs.file.regexp[file,regexp,<encoding>,<output>] Yes
vfs.file.regmatch[file,regexp,<encoding>] Yes
vfs.file.size[file] Yes
vfs.file.time[file,<mode>] Yes
vfs.fs.discovery Yes
vfs.fs.get No
vfs.fs.inode[fs,<mode>] No
vfs.fs.size[fs,<mode>] Yes
vm.memory.size[<mode>] Yes
web.page.get[host,<path>,<port>] Yes
web.page.perf[host,<path>,<port>] Yes
web.page.regexp[host,<path>,<port>,regexp,<length>,<output>] Yes
Table 6: Agent Items Support

15
Zabbix Integration Guide

In addition to the above, the following Advantech specific items are supported:

Item Key Description


vfs.settings.discovery List of /etc/settings.* and
/opt/*/etc/settings files for autodis-
covery
vfs.settings.value[name,parameter] Retrieves a single value from the
e.g. router config /etc/settings.[name]
vfs.settings.value[wifi_ap, WIFI_AP_SSID]
vfs.settings.umod[name,parameter] Retrieves a single value from
e.g. a user module config
vfs.settings.umod[gps, MOD_GPS_ENABLED] /opt/[name]/etc/settings
Table 7: Specific Items Support

16
Zabbix Integration Guide

4. Licenses
Summarizes Open-Source Software (OSS) licenses used by this module.

Figure 6: Licenses

17
Zabbix Integration Guide

5. Related Documents
[1] Advantech Czech: Remote Monitoring Application Note
[2] Advantech Czech: Configuration Manuals
[3] Advantech Czech: SNMP OID Application Note

Product-related documents can be obtained on Engineering Portal at icr.advantech.cz ad-


dress.

18

You might also like