• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

securitywing

How to Configure SNMP in Zabbix Server (Debian) to monitor Cisco Switches

by wing

To monitor SNMP(simple network management protocol) enabled cisco switches and routers in Zabbix server, you need to configure the server for SNMP. In this post, I have used a Debian 8 server running  zabbix and setup SNMP in a cisco switch for monitoring its interfaces and bandwidth. The configuration will be in three parts. In the first step, we will install SNMP on the Debian server hosting the Zabbix. In the second step, we will configure the switch for snmp host information and community string. In the last step, we will configure a Zabbix host to poll SNMP data from the cisco switch.

Step 1: configure the zabbix server for SNMP

At first add the Debian source list if have not already done so.

# nano /etc/apt/sources.list

Paste the following lines in the sources.list file:

deb http://httpredir.debian.org/debian jessie main contrib non-free

deb-src http://httpredir.debian.org/debian jessie main contrib non-free

deb http://httpredir.debian.org/debian jessie-updates main contrib non-free

deb-src http://httpredir.debian.org/debian jessie-updates main contrib non-free

Next, update your source list

# apt-get update

Install SNMP and MIB database. Run the following two commands to install the SNMP and the MIBS database.

 

# apt-get install snmp

# apt-get install snmp-mibs-downloader

Go to /etc/snmp/snmp.conf and uncomment to following line. This will allow the net-snmp command-line to use the MIBS.

mibs :

 

Next, update the MIBS to its latest version. Run the following command as root user.

#   download-mibs

# /etc/init.d/snmpd restart

Next go to /etc/snmp/snmpd.conf and uncomment the line shown below. This will allow you to query the zabbix server using “public” community string.

rocommunity public  localhost

Now, you can query your zabbix server with the help of “public” community string as shown below:

#  snmpwalk -v1 -cpublic localhost

Restart the zabbix server.

service zabbix-server restart

Now, your zabbix server is ready for SNMP and you can move on to the second step of the configuration.

Step 2: configure snmp v1 in cisco switch.

To configure SNMP in your cisco switch, you need to create an access-list allowing access the SNMP manger(Zabbix server) to the switch. Next, you have to create a community string and give it a read only access(ro) followed by the access list number. Finally, you have to create snmp host ( zabbix server IP) followed by the community string.

switch(config)#access-list 10 permit 200.1.1.15

switch(config)#snmp-server community mycommunity ro 10

Switch (config) #snmp-server host 200.1.1.15 mycommunity

Note: 200.1.1.15 is the zabbix server’s IP.

Step 3: create the host information in zabbix.

To create host information in the zabbix, logon to your zabbix with your admin user credentials and click on configuration and then click on “create host”.

create a host on zabbix server

Next, give a host name and visible name.  Type your switch interface IP in the “SNMP interfaces” box and click on add button located at the bottom of the page.

add an snmp interface in zabbix server

 

Finally, you have to create a macro for the SNMP community string. In the Macro files, type {$SNMP_COMMUNITY} and in the value field type “mycommunity” and click on the update button. Remember that the string value must match that of the switch. In this example, we set the community string as “mycommunity”.

create snmp macro in zabbix server

Related posts:

  1. Exchange Server 2003 Tutorial
  2. Windows DNS Server Configuration
  3. Types of Virtualization Technology-Advantages vs. Disadvantages
  4. How to setup Gmail SMTP relay to send email from your domain?

Filed Under: Tutorial Tagged With: debian, snmp, zabbix

Primary Sidebar

Please help us sharing

Categories

  • AWS
  • Basics
  • Containers
  • Cryptocurrency
  • Cyber
  • Internet Security and Safety
  • IS Audit
  • IT Security Exams
  • Law & Human Rights
  • Network Security Tips
  • Off Track
  • Social Media Governance
  • Tech Comparisons
  • Tech Stack Suitability
  • Telecom
  • Tutorial

CISSP Sample Test

Take a CISSP Sample Test

CISA Sample Test

CISA IT governance Sample test

Please Follow Us

Contact us for Ads

Go to Contact Form

Search

Footer

Copyrights

Protected by Copyscape Duplicate Content Detection Software

Securitywing.com reserves the copyrights of all of its published articles.No contents of this site is permitted to be published to anywhere else in the Internet.If any contents are found in any other websites, securitywing reserves the rights to file a DMCA complaint. But you have the right to use the link of any relevant article of this site to point from your website if you consider that it might improve the quality of your article.

Tags

audit AWS backup basics browser check cisco cloud computer configuration cyber data database email gmail hsrp ids iis informaiton internet kubernetes linux load balancing malware microsoft network protection redundancy risk router security security tips server social media SSL switch test tools vpn vrrp web webserver website windows wordpress

Copyright © 2010-2025 ·All Rights Reserved · SecurityWing.com