Would you like to learn how to use Zabbix to monitor an HP Switch? In this tutorial, we are going to show you how to configure the SNMP service on an HP Switch and how to use Zabbix to monitor the HP Switch using SNMP.

• Zabbix version: 3.4.12
• HP Switch model: 1910 and 1920

Hardware List:

The following section presents the list of equipment used to create this Zabbix tutorial.

Every piece of hardware listed above can be found at Amazon website.

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 - SNMP on HP Switch

First, we need to enable and configure the SNMP service on the HP Switch.

Using either the console, telnet or ssh, connect to the command-line of your switch and log in with a user who has administrative privileges.

After a successful login, the console command-line will be displayed.

Use the system-view command to enter the privilege mode.

Use the following commands to configure the SNMP service.

# system-view
# snmp-agent
# snmp-agent sys-info version v2c
# snmp-agent sys-info contact Zamasu <zamasu@dbsuper.com>
# snmp-agent sys-info location Universe10 - IT Room
# snmp-agent community read GokuBlack

The GokuBlack Community has read-only permission on the HP Switch.

The contact person responsible for this Switch was configured as Zamasu.

The location of the equipment was configured as the IT Room of Universe 10.

Don’t forget to save your switch configuration.

# save

You have successfully configured the HP Switch SNMP service.

Now, let's test the SNMP communication between the Zabbix server and the HP Switch.

On the Zabbix server console, use the following commands to install and test the SNMP communication.

# apt-get install snmp
# snmpwalk -v2c -c GokuBlack 192.168.0.200

In our example, the Zabbix server used the command SNMPWALK to test the communication.

In our example, the HP Switch has the IP address 192.168.0.200.

Here is a small sample of the SNMPWALK output.

SNMPv2-MIB::sysDescr.0 = STRING: HPE V1910-48G Switch Software Version 5.20, Release 1519P03
Copyright(c) 2010-2017 Hewlett Packard Enterprise Development, L.P.
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.25506.11.1.85
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (197804302) 22 days, 21:27:23.02
SNMPv2-MIB::sysContact.0 = STRING: Zamasu <zamasu@dbsuper.com>
SNMPv2-MIB::sysName.0 = STRING: TECH-SW01
SNMPv2-MIB::sysLocation.0 = STRING: Universe10 - IT Room

Congratulations, the SNMP service was configured successfully on the HP Switch.

Tutorial - Zabbix Configuration

Now, we need to access the Zabbix server dashboard and add the HP Switch 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://35.162.85.57/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 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 Switch
• Visible Hostname - Repeat the hostname.
• New group - Enter a name to identify a group of similar devices.
• Agent Interface - Click on the Remove button.
• SNMP Interface - Click on the Add button and enter the IP address of the HP Switch.

Here is the original image, before our configuration.

zabbix linux - Antes

Here is the new image with our configuration.

zabbix hp configuration

Next, we need to configure the SNMP community that Zabbix will use to connect on the HP Switch.

Access the Macros tab on the top of the screen.

Create a macro named: {$SNMP_COMMUNITY}

The {$SNMP_COMMUNITY} macro value should be the HP Switch SNMP community.

Zabbix SNMP Macro

In our example, the {$SNMP_COMMUNITY} value is GokuBlack

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 Net HP Comware HH3C SNMPv2

zabbix hp snmp template

Click on the Add button (1).

Click on the Add button (2).

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

The final result will take at least one hour.

By default, Zabbix will wait 1 hour to discover the number of interfaces available on the switch.

By default, Zabbix will wait 1 hour before collect information from the HP Switch interfaces.

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