• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

SMASHING LAB

GUIDES | LINUX | GEEKY STUFF

  • Nginx
  • Linux
  • Guide
  • Ubuntu
  • WordPress
  • Drones, My Hobby

How to install Zabbix on openSUSE Leap 15.1

By Imran Yousaf

In this article, we will see how to install Zabbix in openSUSE Leap 15.1 step by step, including Zabbix Server, Zabbix Frontend and Zabbix Agent modules, in order to monitor remote machines and systems from the convenient Zabbix web interface.

Before installing Zabbix on openSUSE Leap 15.1

If you intend to complete the steps in this Zabbix installation guide in openSUSE Leap 15.1 it is important to meet the following minimum requirements:

  • An updated openSUSE Leap 15.1 system.
  • A LAMP stack or environment (web service with PHP and database service).
  • Command-line access with root or a user with sudo permissions.

If you do not yet have the necessary environment, it is advisable to consult our LAMP installation guide in openSUSE Leap 15.1 beforehand.

How to install Zabbix repository for openSUSE Leap 15.1

We are going to install the Zabbix repository for openSUSE Leap 15.1 , so that we have updated packages. For this we will install an official package that will configure the repository in the system:

1
sudo rpm -Uvh --nosignature https://repo.zabbix.com/zabbix/4.4/sles/15/x86_64/zabbix-release-4.4-1.el15.noarch.rpm

Once the repository is installed, we will update the package lists, indicating that the necessary public keys are imported (in this case to check the Zabbix repository signatures for openSUSE Leap 15.1):

1
sudo zypper --gpg-auto-import-keys refresh

This step will be done on all openSUSE Leap 15.1 machines that we want to monitor and also on the machine where we will install Zabbix Server and Zabbix Frontend.

How to install Zabbix on openSUSE Leap 15.1

To install Zabbix in openSUSE Leap 15.1 we will use the necessary packages for each of the different components. We can choose different Zabbix packages according to the characteristics of our system:

  • Zabbix Server, of which we have versions for MariaDB / MySQL, package zabbix-server-mysql , or for PostgreSQL, package zabbix-server-pgsql .
  • Zabbix Frontend, which we also have versions of MariaDB / MySQL and PostgreSQL, packages zabbix-web-mysql and zabbix-web-pgsql, respectively.
  • Configuration of the web service, packages zabbix-apache-conf and zabbix-nginx-conf.
  • Zabbix Agent, the agent that collects the machine information to send it to the Zabbix server, zabbix-agent package .

We install the packages we need, in this tutorial we will use MariaDB / MySQL as a database service and Apache as a web service:

1
sudo zypper install -y zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-agent

Database

Once Zabbix is ​​installed, it will be necessary to create the necessary support on the database service, MariaDB / MySQL in this tutorial. We connect to the service through the mysql client :

1
mysql -u root -p

We create the database for Zabbix:

1
create database zabbix character set utf8 collate utf8_bin;

In MariaDB or MySQL 5 we create the user for Zabbix in the usual way:

1
create user zabbix @ localhost identified by 'XXXXXXXX';

But in MySQL 8 it is important to indicate the authentication plugin compatible with PHP:

1
create user zabbix @ localhost identified with mysql_native_password by 'XXXXXXXX';

We grant the user the necessary permissions on the basis:

1
grant all privileges on zabbix. * to zabbix @ localhost;

And we close the connection:

1
exit

Now we will initialize the database for Zabbix with the structure that is offered to us in a file provided for this purpose:

1
zcat /usr/share/doc/packages/zabbix-server-mysql/create.sql.gz | mysql -u zabbix -p zabbix

We will be asked for the password that we created for the user of the Zabbix database that we just created moments ago.

Configure Zabbix

We will edit the Zabbix configuration file to indicate the connection data to the database service:

1
sudo nano /etc/zabbix/zabbix_server.conf

We have created the user and the database with the default values:

1
2
3
4
5
...
DBName = zabbix
...
DBUser = zabbix
...

But the password must be specified, since the DBPassword directive is disabled:

1
2
3
...
# DBPassword =
...

We will remove the # character at the beginning of the line and add the password that we specify for the user:

1
2
3
...
DBPassword = XXXXXXXX
...

We save the changes, close the file and now we can start Zabbix Server and enable it to start automatically at every start of openSUSE Leap 15.1:

1
sudo systemctl enable --now zabbix-server

If you have also installed the Zabbix agent to monitor the Zabbix Server machine itself, you will have to start and enable the agent service:

1
sudo systemctl enable --now zabbix-agent

The Zabbix Agent default configuration works perfectly to work with the local Zabbix server, no special adjustments are necessary.

Web service

We reload the service so that the settings for the webserver come into operation:

1
sudo systemctl reload apache2

Web installer

We access the Zabbix web installer in openSUSE Leap 15.1 by adding the / zabbix path to the IP address or domain of the server. For example, in this tutorial, we work on an accessible server in the opensuse151.local domain, so we will use http: //opensuse151.local/zabbix as the access URL:

After the Zabbix installer welcome page in openSUSE Leap 15.1 we continue with the system requirements page:

If you have followed the previous steps, everything should be in order, so we can continue with the process.

We will go to the configuration of the Zabbix Frontend connection with the database service:

We will indicate the database, the user and the password as we created them previously.

We continue with the Zabbix Server configuration:

We can set a name for the server, but the default works fine, so we can leave it blank.

Below is a summary of the installation configuration:

You can make changes if you consider it necessary by going back or jumping to the previous pages. If everything is correct we can continue.

The installation is finished, we can exit the installer by pressing the ” Finish ” button.

The login page will be displayed:

The default administrator user is Admin and his password is zabbix.

When logging in, we are presented with the global view of Zabbix indicators:

We can verify that there is information about the server itself, sent by the local agent. In fact, if we follow the link ” All dashboards ” a list will be displayed in which we can click on ” Zabbix server health ” to see a summary of detailed information:

How to configure a remote openSUSE Leap 15.1 machine with Zabbix Agent

To monitor a remote openSUSE Leap 15.1 machine it will be necessary to install on the Zabbix Agent itself. Taking into account that we should have already installed the official Zabbix repository and updated the package lists as we did at the beginning of the tutorial, all that remains is to install the zabbix-agent package :

1
sudo zypper install -y zabbix-agent

After the download and installation of the Zabbix agent, a new service is created in openSUSE Leap 15.1, the zabbix-agent.service or zabbix-agent service, which is not enabled to start automatically nor is it running, since we must previously configure it to connect with Zabbix Server, which will be running on the server machine.

We will edit the Zabbix Agent configuration:

1
sudo nano /etc/zabbix/zabbix_agentd.conf

We will look for the Server directive :

1
2
3
...
Server = 127.0.0.1
...

The default value looks for the Zabbix server on the local machine itself, so we did not have to configure Zabbix Agent on the server. However, on remote machines we will have to remove the default value and replace it with the Zabbix server IP address or DNS name:

1
2
3
...
Server = opensuse151.local
...

The same happens with the ServerActive directive :

1
2
3
...
ServerActive = 127.0.0.1
...

That we will also change:

1
2
3
...
ServerActive = opensuseleap151.local
...

Only in the case that when we install Zabbix Server we change the server name, we will look for the Hostname directive :

1
2
3
...
Hostname = Zabbix server
...

And we will change its default value by the name of the Zabbix server.

Saving the changes and closing the file, we enable and start the zabbix-agent service :

1
sudo systemctl enable --now zabbix-agent

And we will open the port in which Zabbix Agent waits for connections, which is 10050 TCP:

1
sudo firewall-cmd --permanent --add-port = 10050 / tcp

And we apply the new exception:

1
sudo firewall-cmd --reload

We have finished installing and configuring Zabbix Agent on the openSUSE Leap 15.1 remote machine.

How to Add Virtual Host in Zabbix Server

We have prepared the Zabbix server and we already have a remote machine with the Zabbix agent working. Now we will go back to Zabbix Server to add the new remote machine to the monitoring system.

With the session started, we will go to the « Configuration / Hosts « section, where we will use the « Create host « button:

A form will open where we will register the remote machine that we have just configured:

We will give a name for the machine in « Host name «, we will include it in the group that interests us in « Groups » and we will establish the connection method, by IP address or by DNS name in « Agent interfaces «. In this example we have chosen the connection method by DNS name, so we indicate the DNS name of the remote machine that we have just configured.

The form consists of several tabs, so we will go from the « Host » tab where we are to the « Templates « tab :

We will select the template or templates that seem relevant to us, and that contain graphics and other default settings that will save us work. After the selection, we can add the new machine using the « Add « button.

We will return to the « Configuration / Hosts » page where we can see at the bottom of the page the list of monitored machines, where the remote machine that we have just added appears.

We can now check the status of the remote machine, for example by consulting graphics. We will visit the ” Monitoring / Graphs ” section, in the ” Group ” dropdown we will select the group to which we add the remote machine (” Linux servers ” in this example), and in the ” Host ” dropdown we will select the remote machine and in ” Graph ” We will choose the graphic that we want to consult:

We will be able to repeat the process with other remote machines, installing Zabbix Agent and registering them in Zabbix Frontend just as we have just done.

Conclusion

Now that you know how to install Zabbix in openSUSE Leap 15.1, both Zabbix Server and Zabbix Frontend and Zabbix Agent, you can now monitor the machines and systems on your local network or even VPS servers and systems on the Internet in a simple and visual way.

In case of doubts, questions, any suggestions for improvements, report any errors, etc. It is usually best to leave a comment.

Some more articles you might also be interested in …

  • How to Install LAMP on openSUSE Leap 15.1
  • How to install LAMP on CentOS 8
  • Install Docker in CentOS 7
  • How to install Nextcloud on CentOS 8
  • How to Install Brackets on Debian / Ubuntu
  • Guide How to Install Apache in Ubuntu 18.04
  • Install and Configure Apache on Ubuntu Server
  • How to Install and Secure phpMyAdmin with Apache on…
  • How to Install and Use Multiple Versions of PHP on…
  • Complete Guide: How To Install Ubuntu Server 18.04
Tweet
Pin
Share
0 Shares

Filed Under: Guide

Primary Sidebar

  • Twitter
  • Facebook
  • Google+

Recent Posts

  • How to install Nextcloud on CentOS 8
  • How to install Zabbix on openSUSE Leap 15.1
  • How to Easily Configure Your Domain’s Email Account with Gmail?
  • Tails 4.4 OS Released with Tor Browser 9.0.6
  • How to Convert JPG to PDF in Linux

Subscribe to our Newsletter

Useful articles, tips and videos about creating and promoting websites to your mail



* required field


  • Contact Us
  • Privacy Policy
  • About Us

Copyright © 2021. Smashing Lab