Skip to content

 Threejs and TypeScript
 SocketIO and TypeScript
 Blender Topological Earth
 Sweet Home 3D
 Design Patterns Python
 Design Patterns TypeScript
 Course Coupon Codes
Three.js and TypeScript
Kindle Edition
$9.99 $14.99 Paperback 
$29.99 $34.99

Design Patterns in TypeScript
Kindle Edition
$9.99 $14.99 Paperback
$19.99 $24.99

Design Patterns in Python
Kindle Edition
$9.99 $14.99 Paperback
$19.99 $24.99

Setup SNMP for a CISCO Switch

Video Lecture

Setup SNMP for a CISCO Switch Setup SNMP for a CISCO Switch Setup SNMP for a CISCO Switch


I am now going to configure Prometheus to query SNMP from my Cisco Switch.

My Cisco Switch is a 24 Port Cisco Catalyst 2950.

After doing a factory reset of the Switch, It has

  • SNMP enabled
  • The default gateway set to the IP address of my main network router that is connected to the internet

On my switch, I can telnet to it and see the configuration.

#enter the password
#enter the next password
Switch#show config

The response shows that my switch is configured with an IP address, a default gateway, and an SNMP read only community.

interface Vlan1
 ip address
 no ip route-cache
ip default-gateway
snmp-server community public RO

On my internet firewall/router, I have created a new forwarding rule external port 161 to internal port 161 IP address

I have also verified that I can do some basic SNMP queries from the command line on my Prometheus server.

Test snmpget

snmpwalk -v2c -cpublic X.X.X.X

Test snmpwalk

snmpget -v2c -cpublic X.X.X.X


I then add my internet routers external IP address to the prometheus.yml configuration for the SNMP scrape target, and Prometheus is now able to query the SNMP properties of my switch through the SNMP exporter process.

I can verify that i am seeing data in Prometheus by querying the ifInOctets metric. This shows a new metric for every ethernet interface on my Switch.

SNMP Exporter if_mib Grafana Dashboard

I use the SNMP Stats dashboard from the Grafana community at

This is a dashboard was written specifically for the if_mib module that is configured in the snmp.yml and referenced in the prometheus.yml for the SNMP job used by the SNMP Exporter.

This dashboard is very generic and will be a good starting point to work from.