Monitoring Yate services with Zabbix
Zabbix is an enterprise open source monitoring software, is used to monitor and track the status of various network services, servers, and other network hardware.
To see gathered data on a demo account, just click here and tell us how we can reach you.
- 1 Zabbix server
- 2 Zabbix agent
- 3 Integration with Yate
The easiest and safest way to install a Zabbix server is to use a Zabbix Appliance. (We recommend Zabbix Appliance 3.2)
With Zabbix Appliance, Zabbix software (Zabbix server with MySQL support, Zabbix agent and Zabbix web interface) is already installed and configured for trouble free deployment.
If you don't want to use a Zabbix Appliance, you can install Zabbix software on Mageia 5 like this:
urpmi.addmedia --update Zabbix https://repo.yate.ro/zabbix/mga5/x86_64 urpmi zabbix-server-mysql zabbix-web-mysql zabbix-agent
Zabbix Web interface
After instalation, in order to access Zabbix Web interface, go to http://ip-of-the-zabbix-server/zabbix
Default username is Admin and default password is zabbix (which we advice you to change it).
Servers you wish to monitor are called hosts, in order to add new Hosts to monitor, go to Configuration -> Hosts -> Create host.
On each Host or Host group can be attached monitoring templates.
Zabbix already has monitoring templates for the Operating System and we provide templates for monitoring Yate services.
Zabbix Agent is written in C language and can run on various supported platforms (Linux, Windows, UNIX). On UNIX-like systems it runs on the host being monitored.
This allows monitoring system resources (availability, CPU usage, used/free RAM memory and disk, network interface usage, MySQL performance) and setting alarms for specific thresholds.
Agents can support both passive (polling) and active checks (trapping).
Set-up Zabbix agent
- Install and configure zabbix-agent to servers you wish to monitor (VMs or bare metal)
- Edit /etc/zabbix/zabbix_agent.conf, set up :set Server, ServerActive, Hostname variables
- Restart zabbix-agent (systemctl restart zabbix-agent.service)
Zabbix agent passive checks
Zabbix server may perform checks based on a time interval. Zabbix server requests certain parameters/data on a default/user-defined time intervals.
In a passive check, a Zabbix server requests values from Zabbix Agent (ex: CPU load), the agent processes the request and returns the value to Zabbix server.
Zabbix agent active checks
Zabbix active agent, must first retrieve from the Zabbix server a list of items for processing, then sends the new values periodically to the server.
Integration with Yate
Zabbix (TM) PHP active agent for Yate based products uses the Zabbix version 1 JSON to push requested data to a Zabbix server.
zabbix.php is an active agent and is included in yate-common rpm package.
- To use, please add in /etc/yate/product/ext-custom.conf:
[scripts] zabbix.php=server or zabbix.php=server:port or zabbix.php=server:port,server:port,...
For IPv6 servers you need to specify the IP address, not hostname, like this:
- In Zabbix Server web interface, logged in as admin, with 'Zabbix' as default password, from Configuration -> Hosts -> Create Host
- The Host name must be named: SERVICE - HOSTNAME
- Ex: yate-ucn - ucn.yourdomain.com
COMPONENT_NAME can be (yate-sdr, yate-ucn, yate-hss, yate-smsc etc.) and NODENAME is the configured node or machine name (localhost, myserver.domain.com, etc.)
COMPONENT_NAME - SERVICE
NODENAME - HOSTNAME
Example: yate-ucn - ucn01.example.com
Load/Enable zabbix module
Enable what equipment will be monitored by Zabbix, check it:
[root@core-net yate]# cd /etc/yate/ [root@core-net yate]# grep -r zabbix smsc/ext-custom.conf:zabbix.php=zabbix.yatebts.com stp/ext-custom.conf:zabbix.php=zabbix.yatebts.com eir/ext-custom.conf:zabbix.php=zabbix.yatebts.com ucn/ext-custom.conf:zabbix.php=zabbix.yatebts.com hss/ext-custom.conf:zabbix.php=zabbix.yatebts.com dra/ext-custom.conf:zabbix.php=zabbix.yatebts.com usgw/ext-custom.conf:zabbix.php=zabbix.yatebts.com [root@core-net yate]# [root@core-net yate]# cat ucn/ext-custom.conf [scripts] zabbix.php=zabbix.yatebts.com [root@core-net yate]#
After you add zabbix in scripts section of ext-custom.conf file, restart the service and module will be automatically loaded.
Or you can also connect on each equipment/product to rmanager console and load zabbix.php external module.
To connect to each equipment rmanager console, find rmanager port
[root@core-net yate]# grep port /etc/yate/*/rmanager.conf hss/rmanager.conf:port=5038 ucn/rmanager.conf:port=5039 stp/rmanager.conf:port=5040 eir/rmanager.conf:port=5041 dra/rmanager.conf:port=5042 smsc/rmanager.conf:port=5043 usgw/rmanager.conf:port=5044 [root@core-net yate]#
And then to load zabbix.php module: type in the rmanager console: external start zabbix.php ZABBIX-SERVER-IP-ADDRESS
[root@core-net yate]# telnet 0 5039 Trying 0.0.0.0... Connected to 0. Escape character is '^]'. YateUCN (backend YATE 6.0.1-priv1) ready on node core-net. yate-ucn@core-net> external start zabbix.php zabbix.yatebts.com
A template is a set of entities (items, triggers, graphs, applications, screens, low-level discovery rules, web scenarios) that can be conveniently applied to multiple hosts.
All item names are of the form yate.SECTION.KEY with the same structure as query_stats response in the Yate's JSON API.
All Yate Templates can be downloaded from Zabbix Yate Templates page.
Main Yate templates are listed below, each template includes additional templates (as linked templates)
- Template YateDRA
- Template YateHSS
- Template YateSDR
- Template YateSMSC
- Template YateSTP
- Template YateUCN
- Template YateUSGW
- Template Yate - Diameter
- Template Yate - Engine
- Template Yate - GTP
- Template Yate - S1AP
- Template Yate - SS7
- Template Yate - Voice
Note: These linked templates, (containing a dash in their name) it is not normal to be used directly, because they are already included in each Yate Template.
More informations regarding templates can be found on Zabbix Documentation Templates section
You can add custom parametrized items in Zabbix like : Yate UCN MySQL Database Queries ( key: yate.sqlitedb[ucn] ), Yate UCN WLAN MAP details ( yate.camel_map[wlan] ), Yate UCN MSC MAP details ( yate.camel_map[map_msc] )
- Parametrized items can be found from:
- Local Management Interface (LMI): Status -> (check Additional details) and click Refresh
- Mobile Management Interface (MMI): Equipment -> Click [+] Control node of a selected equipment -> Status -> (check Additional details) and click Refresh
Parametrized items are easy to spot because they have square braces around them. ( key: yate.sqlitedb[ucn] )
Some parametrized items return a pipe separated set of values as a longer single string. The description of each part is not available in the graphical user interface but can be retrieved from CLI:
yate-hss@core-net> status mysqldb name=mysqldb,type=database,format=Total|Failed|Errors|AvgExecTime;conns=1,failed=0;hss=3618199|0|0|1
For example yate.mysqldb[hss] may return something like 3618199|0|0|1 which means 3.6 million queries, none failed, none returned errors, one millisecond average execution time.
To retrieve just one subparameter value add a pipe character and the parameter position inside the square braces of the item name.
In the case above yate.mysqldb[hss|1] (that is, subparameter #1) would return 3618199 which can be handled as number in Zabbix.
While items are used to gather data, triggers on the other hand define a threshold of what state of data is "acceptable".
If the incoming data is not in the acceptable state, a trigger is "fired".
It is possible to set alarm triggers in Zabbix and configure an alarm delivery method (e-mail, SMS, custom script).
Assign templates to a host
In order to assign a template to a host, first you must add a host from Configuration -> -> (top-right corner)
- Host Name: yate-ucn - core-devel (product-name - hostname)
- Visible name:
- Groups: You can group hosts as "Core servers" or "Network servers"
- Agent interface: 192.168.1.41 port 10050 (IP address of the server, where service is running)
- Link new templates: search the template name (in the earlier example 'yate-ucn' search for Template YateUCN) then click Add under "type here to search".
- Click button