Basestation Monitoring with Zabbix

From YateBTS
Jump to: navigation, search

This guide will explain how to use Zabbix for monitoring Labkits/Satsite

Zabbix server Installation

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.

There are various methods for installing Zabbix server, we are going to use Zabbix appliance on Virtual Box.

Steps:

  1. Install VirtualBox on your server
  2. Download Zabbix Appliance in the ovf extension
  3. From the VirtualBox -> File -> Import appliance -> browse for Zabbix appliance -> import
  4. Make sure you are running the desired network setting: Settings -> Network (For our server we are using Bridged Adapter)
  5. start the Appliance and login with appliance/ zabbix
  6. apply the command (ifconfig) to know Zabbix IP address
  7. From any device with reachability to the Zabbix server, open the browser and enter http://<zabbix-server-ip>/zabbix
  8. You should be able to login with Admin / zabbix

Basestation configurations

For monitoring system resources (availability, CPU usage, used/free RAM memory and disk, network interface usage, MySQL performance) and setting alarms for specific thresholds we need to install Zabbix agent and configure it in the Labkits/Satsite. Agents can support both passive (polling) and active checks (trapping).

  1. Login to the Labkits/Satsite via ssh (ssh yatebts@<Basestation-IP> -p 54321) and user the credentials yatebts/<unit serial number>
  2. Apply the following commands to install Zabbix Agent
    1. urpmi.addmedia --update Zabbix https://repo.yate.ro/zabbix/mga5/x86_64
    2. urpmi zabbix-agent
  3. After installing Zabbix Agent, open the file /etc/zabbix/zabbix_agentd.conf
  4. Replace server=127.0.0.1 with Zabbix server IP address
  5. Apply the commands
    1. systemctl enable zabbix-agent
    2. systemctl restart zabbix-agent

For monitoring the Basestation functionality, we need to configure Zabbix (TM) PHP active agent for Yate based products. It 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.

  1. Login to the Labkits/Satsite via ssh (ssh yatebts@<Basestation-IP> -p 54321) and user the credentials yatebts/<unit serial number>
  2. Open (or create, if it doesn't exist) the configurations file ( /etc/yate/sdr/extmodule.conf) and add the following
    1. [scripts]
    2. zabbix.php=server OR zabbix.php=server:port
    3. for multiple servers: zabbix.php=server:port,server:port,...
  3. systemctl restart yate-sdr.service

Zabbix server configurations

First step: Add the template to monitor the basestation

  • Save the text in All Yate Templates to <file>.xml
  • Open Zabbix frontend http://<zabbix-server-ip>/zabbix and login with (Admin / zabbix )
  • Navigate to configurations -> Template -> Import -> select the file <file>.xml and keep the rules to the default -> Import

zabbix-import-template.png

  • You should get a message with import successfuly and you can find the template when you search for (sdr)

zabbix-imported-template.png zabbix-search-for-template.png


Second step: Add the Labkit/Satsite as host

We need to create separate hosts to monitor system resources and SDR functionality

+ To monitor the system resources

  • From Zabbix frontend, navigate to configuration -> hosts -> create host

zabbix-create-host.png

  • In the create host page:

zabbix-create-host.png

  • From Host tab
    • set Hostname to ybts-<serial number of the labkit/Satsite>
    • Optionally set visible name for how you will see the host
    • Create new group for basestations or use any predefined group
    • Set the Labkit/Satsite IP address
    • Make sure the host is enable


+ To monitor the SDR functionality

  • From Zabbix frontend, navigate to configuration -> hosts -> create host
  • In the create host page:


  • From Host tab
    • set Hostname to yate-sdr-ybts-<serial number of the labkit/Satsite>
    • Optionally set visible name for how you will see the host
    • Create new group for basestations or use any predefined group
    • Set the Labkit/Satsite IP address
    • Make sure the host is enable


Third step: Link the host(s) to the template

  • Option 1: Link each host by itself

+ To monitor the SDR functionality Configuration -> Hosts -> Select the host -> Template tab -> search for Template YateSDR and link it -> press update zabbix-host-link-template.png

+ To monitor the system resources Configuration -> Hosts -> Select the host -> Template tab -> search for Template OS Linux and link it -> press update


  • Option 2: Link for the group of hosts

+ To monitor the SDR functionality Configuration -> Templates -> select (Template YateSDR) -> add the group of your hosts in the filed groups -> update zabbix-link-template-group.png

+ To monitor the system resources Configuration -> Templates -> select (Template OS Linux) -> add the group of your hosts in the filed groups -> update

Verifying


To make sure your Labkit/Satsite is ready to be monitored using Zabbix From Configuration -> Hosts -> you should be able to find the basestation with Availability (ZBX) in green zabbix-verify.png

Now, you can use Zabbix to monitor the Labkit/Satsite

zabbix-triggers.png