Would you like to learn how to monitor an Apache server using Zabbix? In this tutorial, we are going to show you how to monitor an Apache web server using the Zabbix agent on a computer running Ubuntu Linux.

• Ubuntu 18
• Ubuntu 19
• Zabbix server 4.4.1
• Apache 2.4.38

Zabbix Playlist:

On this page, we offer quick access to a list of videos related to Zabbix installation.

Don’t forget to subscribe to our youtube channel named FKIT.

Tutorial Zabbix – Apache mod_status Configuration

• IP – 192.168.15.11
• Operational System – Ubuntu 19.10
• Hostname – APACHE

On the Apache server, enable the module named mod_status.

Copy to Clipboard

Edit the Apache status.conf configuration file.

Copy to Clipboard

Here is the original file, before our configuration.

Copy to Clipboard

Here is the file with our configuration.

Copy to Clipboard

.In our example, we configure the Apache mod_status to allow only computers from the network 192.168.15.0/24 to access the webserver status page.

Edit the Apache 000-default.conf configuration file.

Copy to Clipboard

Here is the 000-default.conf file before our configuration.

Copy to Clipboard

Here is the 000-default.conf file after our configuration.

Copy to Clipboard

In our example, we restricted the mod_status access only to computers from the network 192.168.15.0/24.

Restart the Apache service.

Copy to Clipboard

On a computer from the allowed IP address network, open your browser and enter the IP address of your web server plus /server-status.

In our example, the following URL was entered in the Browser:

• http://192.168.15.11/server-status

You will be sent to the Apache server status page.

apache performance monitor

Congratulations! You sucessfully configured the Apache Mod_status feature.

Tutorial – Zabbix Agent Installation on Linux

• IP – 192.168.15.11
• Operational System – Ubuntu 19.10
• Hostname – APACHE

You need to install the Zabbix agent on the Linux computer running Apache.

Use the following commands to install the required packages on a computer running Ubuntu Linux.

Copy to Clipboard

Download the Zabbix installation package.

Copy to Clipboard

Extract the Zabbix installation package, compile and install the Zabbix agent.

Copy to Clipboard

Find the location of the zabbix_agentd.conf file on your system.

Edit the zabbix_agentd.conf file.

Copy to Clipboard

Here is the original file, before our configuration.

Copy to Clipboard

Here is the new file with our configuration.

Copy to Clipboard

In our example, the Zabbix agent is configured to allow connections from the Zabbix server 192.168.15.10.

The server with the IP address 192.168.15.10 is allowed to request and receive information from the agent.

The Localhost, 127.0.0.1, is allowed to request and receive information from the agent.

The Zabbix installation package comes with a service startup script.

Copy the startup script using the commands below.

Copy to Clipboard

You can now use the following commands to start the Zabbix agent service.

Copy to Clipboard

Restart the Zabbix agent.

Copy to Clipboard

You have finished the Zabbix agent installation.

You can now use the Zabbix server dashboard to add this computer to the network monitoring service.

Tutorial Zabbix – Monitoring Apache

• IP – 192.168.15.10
• Operational System – Ubuntu 19.10
• Hostname – ZABBIX

Now, we need to access the Zabbix server dashboard and add the Linux computer as a Host.

Open your browser and enter the IP address of your web server plus /zabbix.

In our example, the following URL was entered in the Browser:

• http://192.168.15.10/zabbix

On the login screen, use the default username and default password.

• Default Username: Admin
• Default Password: zabbix

zabbix login

After a successful login, you will be sent to the Zabbix Dashboard.

Zabbix 4.4 dashboard

On the dashboard screen, access the Configuration menu and select the Host option.

zabbix add host

On the top right of the screen, click on the Create host button.

Zabbix Create Host

On the Host configuration screen, you will have to enter the following information:

• Host Name – Enter a Hostname to identify the Apache server.
• Visible Hostname – Repeat the hostname.
• New group – Enter a name to identify a group of similar devices.
• Agent Interface – Enter the IP address of the Apache server.

Here is the original image, before our configuration.

zabbix linux - Antes

Here is the new image with our configuration.

zabbix monitor apache

Next, we need to associate the host with a specific network monitor template.

By default, Zabbix comes with a large variety of monitoring templates.

Access the Templates tab on the top of the screen.

Click on the Select button and locate the template named: Template App Apache by Zabbix agent

Zabbix monitoring apache by agent

Click on the Add button to finish the configuration.

After a few minutes, you will be able to see the initial result on the Zabbix Dashboard.

In order to test your configuration, access the Monitoring menu and click on the Graphs option.

Zabbix graphic

Select your Apache server hostname.

Select the graph named APACHE: WORKERS TOTAL.

Zabbix apache monitoring

You should be able to see the Apache performance graphic

Zabbix monitoring apache

To access more information, search for your Apache server on the latest data menu.

zabbix apache monitor

Congratulations! You have configured the Zabbix server to monitor an Apache server.