This guide walks you through the steps required to start basic monitoring of your network switch or router using Zabbix. A Cisco router is used as an example, but the procedure applies to any SNMP-enabled network device.
Who this guide is for
This guide is designed for new Zabbix users and network administrators who want to quickly enable basic monitoring for network devices. If you require deep customization or advanced configuration options, please refer to the SNMP agent page or the Configuration section of Zabbix manual.
Prerequisites
Before proceeding with this guide, ensure that you have:
This guide is based on the following setup:
It is assumed that your network device is already physically installed and connected.
For monitoring via SNMP, you must configure your network device to allow SNMP queries. For a Cisco router, this typically involves the following steps:
1. Enable SNMP and set community string.
Log in to your Cisco router’s console and enter configuration mode:
Then, enable SNMP by specifying a read-only community string. For example:
Replace <your_community_string>
with your secure community string. Note: the RO (Read-Only) option allows SNMP to retrieve data from the device but prevents any configuration changes.
It is recommended to restrict SNMP access to only the necessary devices for security reasons. For further guidance on configuring access control lists (ACLs), refer to Cisco's official documentation.
3. Save the configuration.
Save your changes to ensure SNMP settings persist after a reboot:
For further details or model-specific instructions, you may refer to external Cisco SNMP configuration tutorials. This guide, however, provides the basic steps for enabling SNMP monitoring.
1. Log into Zabbix frontend.
2. Add a new host.
Navigate to Data collection > Hosts and click on Create host.
3. Link Templates
In the Templates field, select the SNMP template that best matches your device. Zabbix provides a range of pre-built SNMP templates for many device families. For example, if you are monitoring a Cisco device, choose the template that corresponds to your device’s OS or model (such as Cisco IOS SNMP or Cisco Catalyst 3750<device model> SNMP).
4. Click on Add to save the host.
Congratulations! Zabbix is now set up to monitor your network device.
Latest Data:
To visualize the performance data, click on Graphs next to the SNMP items to see detailed metrics.
As a next step, you can:
Once the host is set up, you can create items to monitor specific metrics. Note: this step is optional if you're using a template, as templates already contain default sets of items.
1. Identify the SNMP OID:
Use the snmpwalk
command to list available OIDs on your device. For example:
Find the OID for the metric you wish to monitor (for instance, IF-MIB::ifHCInOctets.3 for incoming traffic on port 3). To get the numeric OID, you can use:
2. Create an SNMP item:
cisco.ifHCInOctets.3
).get[1.3.6.1.2.1.31.1.1.1.6.3]
for a single value;walk[1.3.6.1.2.1.31.1.1.1.6.3]
to retrieve a subtree of values asynchronously.To retrieve multiple values in one SNMP transaction, you can specify several OIDs using the syntax walk[OID1,OID2,...]
.
This guide provides basic configuration steps for sending email alerts.
1. Navigate to User settings > Profile, switch to the Media tab and add your email.
2. Follow the guide for Receiving a problem notification.
Next time, when Zabbix detects a problem, you should receive an alert via email.
To ensure that Zabbix correctly detects network performance issues, simulate a real problem by increasing the ICMP ping response time threshold.
1. Open your "Cisco Router" host configuration in Zabbix.
2. Navigate to the Macros tab and select Inherited and host macros.
3. Locate the {$ICMP_RESPONSE_TIME_WARN}
macro (or a similar response time threshold macro).
4. Set a very low value (e.g., 0.001) to trigger an alert when the ping response exceeds this value.
5. Click Update to apply the changes.
6. Wait a few moments for Zabbix to detect the simulated issue.
7. Navigate to Monitoring > Problems to verify that an alert appears (e.g., "High ICMP ping response time").
If alerts are configured, you should also receive a problem alert.
8. Revert the macro value to its original setting and click Update to save the changes.
9. Confirm that the problem is resolved and disappears from the Problems section.
See also: