Introduction
In the first part of this article, we showed you how to install Zabbix from your Ubuntu 18.04 server command line. In our second part, we’ll help you configure the settings for Zabbix from its interface. The Zabbix interface allows you to add hosts and view reports of the host you are managing. But before you can use this interface, you must perform some initial configuration. This guide will pick up from where we left in PART ONE: How to Install Zabbix on an Ubuntu 18.04 VPS or Dedicated Server, and show you how to set up the Zabbix interface settings. If you have VPS or a dedicated server web hosting setup with Ubuntu 18.04, then let’s get started!
Setting Up The Web Interface
Launch your favorite web browser and search http//your IP address or Zabbix server hostname/Zabbix/ to access the welcome page. ![How to Install Zabbix on Ubuntu 18.04 [part 2] How to Install Zabbix on Ubuntu 18.04 [part 2]](https://cdn.hostadvice.com/2018/10/how-to-install-zabbix-on-ubuntu-18-04-part-2--1.png)
![How to Install Zabbix on Ubuntu 18.04 [part 2] How to Install Zabbix on Ubuntu 18.04 [part 2]](https://cdn.hostadvice.com/2018/10/how-to-install-zabbix-on-ubuntu-18-04-part-2--2.png)
![How to Install Zabbix on Ubuntu 18.04 [part 2] How to Install Zabbix on Ubuntu 18.04 [part 2]](https://cdn.hostadvice.com/2018/10/how-to-install-zabbix-on-ubuntu-18-04-part-2--3.jpeg)
![How to Install Zabbix on Ubuntu 18.04 [part 2] How to Install Zabbix on Ubuntu 18.04 [part 2]](https://cdn.hostadvice.com/2018/10/how-to-install-zabbix-on-ubuntu-18-04-part-2--4.png)
![How to Install Zabbix on Ubuntu 18.04 [part 2] How to Install Zabbix on Ubuntu 18.04 [part 2]](https://cdn.hostadvice.com/2018/10/how-to-install-zabbix-on-ubuntu-18-04-part-2--5.png)
![How to Install Zabbix on Ubuntu 18.04 [part 2] How to Install Zabbix on Ubuntu 18.04 [part 2]](https://cdn.hostadvice.com/2018/10/how-to-install-zabbix-on-ubuntu-18-04-part-2--6.png)
Installing A Zabbix Agent
The next step is installing and setting up a Zabbix Agent. The agent is the software installed on the server to be monitored to send data to a Zabbix server. Log in to the server you want to monitor, and follow the steps below to complete the configuration: First, execute the command below to install a repository for the configuration package,
$ wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb $ sudo dpkg -i zabbix-release_3.2-1+xenial_all.deb
Next, run the command below to update your package index:
$ sudo apt-getupdate
Then, issue the command below to install the Agent:
$ sudo apt-get install zabbix-agent
Now, let us secure the ServerAgent connection using the preshared keys (PSK). To generate the PSK, execute the command below;
$ sudo sh -c "openssl rand -hex 32 > /etc/zabbix/zabbix_agentd.psk"
Run the command below to display the key:
$ cat /etc/zabbix/zabbix_agentd.psk
This key will be something like:
cd12686e166a80aa09a227ae5f97834eaa3d5ae686d2ae39590f17ef85dd6de5
Note: Copy this key somewhere, you will need it when configuring the host.
To edit the Agent’s settings, execute the command below to open its configuration file:
$ sudo nano /etc/zabbix/zabbix_agentd.conf
Once the file opens, find the section below:
### Option: Server # List of comma delimited IP addresses (or hostnames) of Zabbix servers. # Incoming connections will be accepted only from the hosts listed here. # If IPv6 support is enabled then'127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally. # # Mandatory: no # Default: # Server= Server=127.0.0.1
change your IP address to match the one for the Zabbix server.
Server=your_zabbix_server_ip_address
Next, find the following section:
### Option: TLSConnect # How the agent should connect to server or proxy. Used for active checks. # Only one value can be specified: # unencrypted - connect without encryption # psk - connect using TLS and a pre-shared key # cert - connect using TLS and a certificate # # Mandatory: yes, if TLS certificate or PSK parameters are defined (even for'unencrypted' connection) # Default: # TLSConnect=unencrypted
Replace the placeholder unencrypted with psk:
TLSConnect=psk
Next, find the section TLSAccept:
### Option: TLSAccept # What incoming connections to accept. # Multiple values can be specified, separated by comma: # unencrypted - accept connections without encryption # psk - accept connections secured with TLS and a pre-shared key # cert - accept connections secured with TLS and a certificate # # Mandatory: yes, if TLS certificate or PSK parameters are defined (even for'unencrypted' connection) # Default: # TLSAccept=unencrypted
Change unencrypted to psk, that is:
TLSAccept=psk
Find the section TLSPSKIdentity:
### Option: TLSPSKIdentity # Unique, case sensitive string used to identify the pre-shared key. # # Mandatory: no # Default: # TLSPSKIdentity=
And add a unique identifier for the preshared key. For example:
TLSPSKIdentity=PSK 001
Note: Note the unique identifier somewhere, you will use it as your PSK ID when configuring the Zabbix Host.
Now find the TLSPSKFile section:
### Option: TLSPSKFile # Full pathname of a file containing the pre-shared key. # # Mandatory: no # Default: # TLSPSKFile=
Add the file (/etc/zabbix/zabbix_agentd.psk) created in the previous step here to have the following results:
TLSPSKFile=/etc/zabbix/zabbix_agentd.psk
Save the changes and exit the nano editor. Next, execute the command below to start the Agent, and enable it to run at boot time:
$ sudo systemctl start zabbix-agent $ sudo systemctl enable zabbix-agent
Then, run the command below to check the status of the Zabbix agent:
$ sudo systemctl status zabbix-agent
If everything is okay, you will get the following output:
● zabbix-agent.service - Zabbix Agent Loaded: loaded (/lib/systemd/system/zabbix-agent.service; disabled; vendor preset: enabled) Active: active (running) since Thu 2017-06-08 08:33:52 UTC; 4s ago Process: 18185 ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE (code=exited, status=0/SUCCESS) ...
That is it! Your Zabbix agent is fully configured to transmit data to your Zabbix server.
Registering A Host On Your Zabbix Server
Now you have successfully configured the Zabbix web interface and installed Zabbix Agent on the server to be monitored. Now let us register the host to be monitored on the Zabbix server. Go to your favorite browser and search http://your_zabbix_server_ip_address/zabbix/. This will take you to a Zabbix Server login page: ![How to Install Zabbix on Ubuntu 18.04 [part 2] How to Install Zabbix on Ubuntu 18.04 [part 2]](https://cdn.hostadvice.com/2018/10/how-to-install-zabbix-on-ubuntu-18-04-part-2--7.png)
![How to Install Zabbix on Ubuntu 18.04 [part 2] How to Install Zabbix on Ubuntu 18.04 [part 2]](https://cdn.hostadvice.com/2018/10/how-to-install-zabbix-on-ubuntu-18-04-part-2--8.png)
![How to Install Zabbix on Ubuntu 18.04 [part 2] How to Install Zabbix on Ubuntu 18.04 [part 2]](https://cdn.hostadvice.com/2018/10/how-to-install-zabbix-on-ubuntu-18-04-part-2--9.png)
![How to Install Zabbix on Ubuntu 18.04 [part 2] How to Install Zabbix on Ubuntu 18.04 [part 2]](https://cdn.hostadvice.com/2018/10/how-to-install-zabbix-on-ubuntu-18-04-part-2--10.png)
![How to Install Zabbix on Ubuntu 18.04 [part 2] How to Install Zabbix on Ubuntu 18.04 [part 2]](https://cdn.hostadvice.com/2018/10/how-to-install-zabbix-on-ubuntu-18-04-part-2--11.png)
![How to Install Zabbix on Ubuntu 18.04 [part 2] How to Install Zabbix on Ubuntu 18.04 [part 2]](https://cdn.hostadvice.com/2018/10/how-to-install-zabbix-on-ubuntu-18-04-part-2--12.png)
Conclusion
That is it! You have put everything in place and should be easy to use Zabbix to monitor various critical components of your server.
Check out these top 3 Linux hosting services
- To end your queries about Top web hosting, simply click on this link.


