Hands-on tutorial

Tutorials · Monitoring

How to Monitor Switches and Gateways With Zabbix and SNMP

Deploy Zabbix in containers, add network devices with SNMPv3 templates, graph interfaces and PoE, and alert on outages and errors.

Intermediate11 min7 steps

Before you start

  • A Linux server with Docker and Docker Compose
  • SNMPv3 enabled on switches and gateways (or SNMPv2c with a unique community on a management VLAN)
  • Firewall rules allowing UDP 161 from the Zabbix server

Step by step

  1. Deploy Zabbix

    Use the official Zabbix Docker Compose files with PostgreSQL, the server and the web interface.

    git clone https://github.com/zabbix/zabbix-docker.git
    cd zabbix-docker
    docker compose -f docker-compose_v3_ubuntu_pgsql_latest.yaml up -d
    
  2. Secure the web interface

    Change the default admin password immediately, put the interface behind HTTPS and restrict access to the network team.

  3. Configure SNMPv3 on devices

    Create an SNMPv3 user with authentication and privacy (SHA and AES) and allow polling only from the Zabbix server.

    snmp-server user zabbix nms v3 auth sha <auth-pass> priv aes 128 <priv-pass>
    snmp-server host 10.0.99.20 version 3 priv zabbix
    
  4. Add hosts with templates

    Create a host per device with its management IP, link a generic SNMP network template, and set the SNMPv3 credentials as macros.

  5. Check discovered items

    Zabbix discovers interfaces and creates traffic, error and status items for each port. Disable discovery on unused ports to reduce noise.

  6. Create useful triggers

    Alert on device unreachable, uplink down, interface errors rising and high CPU or temperature. Add a delay so brief blips do not page anyone.

  7. Build dashboards

    Make one dashboard per site with uplink traffic, availability and active problems, and a summary for management.

Commands are generic, industry-standard examples. Exact syntax and menu names vary by model and firmware; check your device's manual on the Documentation page.

Pro tips

  • Use host groups per site and per device type.
  • Back up the Zabbix database regularly.
  • Keep NavCloud for configuration and Zabbix for long-term metrics if you need both.