[comment]: # translation:outdated

[comment]: # aside:7

[comment]: # ({new-heading})
# Monitor network traffic with Zabbix

[comment]: # ({/new-heading})

[comment]: # ({new-intro})
### Introduction

This page walks you through the steps required to start basic monitoring of your network traffic with Zabbix. 

[comment]: # ({/new-intro})

[comment]: # ({new-purpose})
**Who this guide is for**

This guide is designed for new Zabbix users and contains the minimum set of steps required to enable basic monitoring of 
your network traffic. If you are looking for deep customization options or require more advanced configuration, 
see the [Configuration](/manual/config) section of Zabbix manual.  

[comment]: # ({/new-purpose})

[comment]: # ({new-require})
**Prerequisites**

Before proceeding with this guide, you need to [download and install](https://www.zabbix.com/download) Zabbix 
server, Zabbix frontend and Zabbix agent according to the instructions for your OS. 
Note that you should install Zabbix agent on the machine that requires traffic monitoring.
This can be either the same host where Zabbix server is installed or a different host.

This guide will provide the instructions on configuring the network traffic monitoring of *eth0* interface
on a separate machine named *Remote host*.

[comment]: # ({/new-require})

[comment]: # ({new-configure})
### Configure Zabbix for monitoring

Zabbix agent can collect metrics in active or passive mode (simultaneously).
See [Passive and active agent checks](/manual/appendix/items/activepassive) for more info.
In this guide, monitoring by means of passive checks will be described.

[comment]: # ({/new-configure})

[comment]: # ({new-agent})
##### Configuring Zabbix agent

1\. Open the agent configuration file on the machine where the agent is installed (by default, the path is */usr/local/etc/zabbix_agentd.conf*):
 
    sudo vi /usr/local/etc/zabbix_agentd.conf

2\. Add the IP address or DNS name of your Zabbix server to the *Server* parameter. For example:

    Server=192.0.2.22

3\. Restart Zabbix agent:

    systemctl restart zabbix-agent

[comment]: # ({/new-agent})

[comment]: # ({new-frontend})
##### Zabbix frontend

1\. Log into Zabbix frontend.

2\. [Create a host](/manual/config/hosts/host) in Zabbix web interface, specifying the IP address or DNS name
of the machine on which the agent is installed.

![](../../../assets/en/manual/guides/traffic_host.png){width="600"}

[comment]: # ({/new-frontend})

[comment]: # ({new-item})
### Create items

Follow the instructions on [creating an item](/manual/config/items/item) to add the items for traffic monitoring, namely:

-   [Incoming traffic](/manual/config/items/itemtypes/zabbix_agent#net.if.in)
-   [Outgoing traffic](/manual/config/items/itemtypes/zabbix_agent#net.if.out)
-   [Total traffic](/manual/config/items/itemtypes/zabbix_agent#net.if.total)

A simple setup for the incoming traffic monitoring item would look as follows:

![](../../../assets/en/manual/guides/traffic_item.png){width="600"}

To make the collected data suitable for practical use, you can set some [preprocessing](/manual/config/items/preprocessing)
steps when creating the items. In the given case, those can be multiplication by 8 (to convert bytes to bits)
and presentation as change per second.

![](../../../assets/en/manual/guides/traffic_item_prepr.png){width="600"}

[comment]: # ({/new-item})

[comment]: # ({new-data})
### View collected data

Congratulations! At this point, Zabbix is already monitoring your network traffic. 

To view collected metrics, open the [*Monitoring → Hosts*](/manual/web_interface/frontend_sections/monitoring/hosts)
menu section and click on the *Latest data* in the row of the host.

![](../../../assets/en/manual/guides/traffic_latest.png){width="600"}

You will see the traffic data.

![](../../../assets/en/manual/guides/traffic_graph.png){width="600"}

[comment]: # ({/new-data})

[comment]: # ({new-graph})
### View graphs

The data collected can be displayed as [graphs](/manual/web_interface/frontend_sections/monitoring/hosts/graphs).
To view those, in the *Latest data* section click on *Graph* in the row of the item
or select required items and click on *Display graph* below.

![](../../../assets/en/manual/guides/traffic_graph2.png){width="600"}

[comment]: # ({/new-graph})

[comment]: # ({new-trigger})
### Configure triggers

You can set [triggers](/manual/config/triggers) to detect abnormal network traffic. See the instructions on
[configuring a trigger](/manual/config/triggers/trigger) and add the trigger signalling that
the total traffic is too high, for example:

![](../../../assets/en/manual/guides/traffic_trigger.png){width="600"}

Now make the traffic exceed the threshold you have set in the trigger expression
and navigate to the *Monitoring → Problems* to check that the problem is listed there.

![](../../../assets/en/manual/guides/traffic_problem.png){width="600"}

[comment]: # ({/new-trigger})

[comment]: # ({new-problem})
### Set up problem alerts

There are several ways of getting notifications about the problem.
Email being the most popular one, follow the instructions on setting up a
[problem notification](/manual/quickstart/basic_config/notification) via email.
You can also choose other [media types](/manual/config/notifications/media) to be used
for the notification delivery.

[comment]: # ({/new-problem})

[comment]: # ({new-further})
**See also:**

- [Problem escalations](/manual/config/notifications/action/escalations) - how to create multi-step alert scenarios 
(e.g., first send message to the system administrator, then, if a problem is not resolved in 45 minutes, 
send message to the data center manager).
- [Problem acknowledgment](/manual/acknowledgment) - how to indicate that the problem is known,
make comments on resolving it, suppress or close the problem.
- [Monitor Linux with Zabbix agent](/manual/quickstart/monitor_linux) - how to start basic monitoring
of the most important items by linking a pre-configured template.

[comment]: # ({/new-further})
