Description
The Zabbix monitoring server is already configured, and the switch is now monitored using Zabbix.
Specific operation:
The following operations are performed on the monitored switch, where Cisco switches are the example.
First, log on to the Cisco switch and turn on the SNMP service
Note: Log in to switch privileged configuration mode using Telnet or emulation terminal
Enable #切换到特权模式
Configure Terminal #进入全局配置模式
Snmp-server Community public ro #打开交换机snmp服务, set community name to public, read-only
Snmp-server community Cisco RW #打开交换机snmp服务, set the community name to Cisco, read/write
Snmp-server Enable traps #启用snmp陷阱
Exit #退出全局配置模式
Show Run #查看当前配置信息
Exit #退出特权模式
Second, use Getif to view the switch port information
Download Getif:http://www.wtcs.org/snmp4tpc/files/tools/snmp/getif/getif-2.3.1.zip
After the installation is complete, open the software
Note: Windows 7/8/8.1 system needs to right-click, choose to run as Administrator, or software open failed!
Host Name: Switch IP address
Read: Public
Other default
Point start
After the connection succeeds as shown:
System operation and maintenance www.osyunwei.com warm reminder: qihang01 original Content © Copyright, reproduced please indicate the source and the original chain
Switch to the Interface tab, click Start to view all port information for the switch, and record it as shown:
Switch to the Mbrowser tab
Select iso->org->dod->internet->mgmt->mib-2->interface->iftable->ifentry->ifinoctets
Point start
After the connection succeeds as shown:
Attention:
Ifinoctets #交换机端口进流量
Ifoutoctets #交换机端口出流量
To view switch port outbound traffic:
Iso->org->dod->internet->mgmt->mib-2->interface->iftable->ifentry->ifoutoctets
The interfaces.iftable.ifentry.ifinoctets.1 corresponds to the Vlan1 interface of the switch , whose OID value is:1.3.6.1.2.1.2.2.1.10.1
The interfaces.iftable.ifentry.ifinoctets.5179 corresponds to the StackPort1 interface of the switch , whose OID value is:1.3.6.1.2.1.2.2.1.10.5179
The interfaces.iftable.ifentry.ifinoctets.10101 corresponds to the GIGABITETHERNET1/0/1 interface of the switch , and its OID value is: 1.3.6.1.2.1.2.2.1.10.10101
And so on
Depending on the int value in the Interface tab, view the OID value of the port on the current switch, and then use the OID value in Zabbix to monitor the switch port.
The ports and OID values for Cisco switches are listed here
1. C3750E Port
Ifinoctets #进口流量1.3.6.1.2.1.2.2.1.10.
Ifoutoctets #出口流量1.3.6.1.2.1.2.2.1.16.
1 Vlan1
5179 StackPort1
5180 stacksub-st1-1
5181 Stacksub-st1-2
10101 GIGABITETHERNET1/0/1
10102 GIGABITETHERNET1/0/2
10103 GIGABITETHERNET1/0/3
10104 GIGABITETHERNET1/0/4
10105 GIGABITETHERNET1/0/5
10106 GIGABITETHERNET1/0/6
10107 GIGABITETHERNET1/0/7
10108 GIGABITETHERNET1/0/8
10109 GIGABITETHERNET1/0/9
10110 GIGABITETHERNET1/0/10
10111 GIGABITETHERNET1/0/11
10112 GIGABITETHERNET1/0/12
10113 GIGABITETHERNET1/1/1
10114 GIGABITETHERNET1/1/2
10115 GIGABITETHERNET1/1/3
10116 GIGABITETHERNET1/1/4
10201 TENGIGABITETHERNET1/1/1
10202 TENGIGABITETHERNET1/1/2
14501 Null0
14502 FastEthernet0
2. c2960s Port
Ifinoctets #进口流量1.3.6.1.2.1.2.2.1.10.
Ifoutoctets #出口流量1.3.6.1.2.1.2.2.1.16.
1 Vlan1
10101 GIGABITETHERNET0/1
10102 GIGABITETHERNET0/2
10103 GIGABITETHERNET0/3
10104 GIGABITETHERNET0/4
10105 GIGABITETHERNET0/5
10106 GIGABITETHERNET0/6
10107 GIGABITETHERNET0/7
10108 GIGABITETHERNET0/8
10109 GIGABITETHERNET0/9
10110 GIGABITETHERNET0/10
10111 GIGABITETHERNET0/11
10112 GIGABITETHERNET0/12
10113 GIGABITETHERNET0/13
10114 GIGABITETHERNET0/14
10115 GIGABITETHERNET0/15
10116 GIGABITETHERNET0/16
10117 GIGABITETHERNET0/17
10118 GIGABITETHERNET0/18
10119 GIGABITETHERNET0/19
10120 GIGABITETHERNET0/20
10121 GIGABITETHERNET0/21
10122 GIGABITETHERNET0/22
10123 GIGABITETHERNET0/23
10124 gigabitethernet0/24
10125 GIGABITETHERNET0/25
10126 GIGABITETHERNET0/26
10127 GIGABITETHERNET0/27
10128 GIGABITETHERNET0/28
10129 GIGABITETHERNET0/29
10130 GIGABITETHERNET0/30
10131 Gigabitethernet0/31
10132 GIGABITETHERNET0/32
10133 GIGABITETHERNET0/33
10134 Gigabitethernet0/34
10135 GIGABITETHERNET0/35
10136 GIGABITETHERNET0/36
10137 GIGABITETHERNET0/37
10138 GIGABITETHERNET0/38
10139 GIGABITETHERNET0/39
10140 GIGABITETHERNET0/40
10141 GIGABITETHERNET0/41
10142 GIGABITETHERNET0/42
10143 GIGABITETHERNET0/43
10144 GIGABITETHERNET0/44
10145 GIGABITETHERNET0/45
10146 GIGABITETHERNET0/46
10147 GIGABITETHERNET0/47
10148 GIGABITETHERNET0/48
10149 GIGABITETHERNET0/49
10150 gigabitethernet0/50
12001 Null0
12002 FastEthernet0
3. C3560 Port
Ifinoctets #进口流量1.3.6.1.2.1.2.2.1.10.
Ifoutoctets #出口流量1.3.6.1.2.1.2.2.1.16.
1 Vlan1
10101 GIGABITETHERNET0/1
10102 GIGABITETHERNET0/2
10103 GIGABITETHERNET0/3
10104 GIGABITETHERNET0/4
10105 GIGABITETHERNET0/5
10106 GIGABITETHERNET0/6
10107 GIGABITETHERNET0/7
10108 GIGABITETHERNET0/8
10109 GIGABITETHERNET0/9
10110 GIGABITETHERNET0/10
10111 GIGABITETHERNET0/11
10112 GIGABITETHERNET0/12
10113 GIGABITETHERNET0/13
10114 GIGABITETHERNET0/14
10115 GIGABITETHERNET0/15
10116 GIGABITETHERNET0/16
10117 GIGABITETHERNET0/17
10118 GIGABITETHERNET0/18
10119 GIGABITETHERNET0/19
10120 GIGABITETHERNET0/20
10121 GIGABITETHERNET0/21
10122 GIGABITETHERNET0/22
10123 GIGABITETHERNET0/23
10124 gigabitethernet0/24
10125 GIGABITETHERNET0/25
10126 GIGABITETHERNET0/26
10127 GIGABITETHERNET0/27
10128 GIGABITETHERNET0/28
10129 GIGABITETHERNET0/29
10130 GIGABITETHERNET0/30
10131 Gigabitethernet0/31
10132 GIGABITETHERNET0/32
10133 GIGABITETHERNET0/33
10134 Gigabitethernet0/34
10135 GIGABITETHERNET0/35
10136 GIGABITETHERNET0/36
10137 GIGABITETHERNET0/37
10138 GIGABITETHERNET0/38
10139 GIGABITETHERNET0/39
10140 GIGABITETHERNET0/40
10141 GIGABITETHERNET0/41
10142 GIGABITETHERNET0/42
10143 GIGABITETHERNET0/43
10144 GIGABITETHERNET0/44
10145 GIGABITETHERNET0/45
10146 GIGABITETHERNET0/46
10147 GIGABITETHERNET0/47
10148 GIGABITETHERNET0/48
10149 GIGABITETHERNET0/49
10150 gigabitethernet0/50
10151 GIGABITETHERNET0/51
10152 GIGABITETHERNET0/52
10501 Null0
Iii. adding monitoring to the switch in the Zabbix
1. Add Host
Open Zabbix
Configuration-Host group-create host group
System operation and maintenance www.osyunwei.com warm reminder: qihang01 original Content © Copyright, reproduced please indicate the source and the original chain
Group Name: Switch
Archive
Configuration-host-Create host
Host Name: Switch IP
Groups: Select the switch created in the previous step
SNMP interface-IP address: Switch IP
Other default
Status: Under test
Archive
2. Create a switch monitoring template
Open Zabbix
Configuration-Templates-Create templates
Template name: Cisco c3750e
Groups: Switches
Host/Template: Select the switch IP you just added
Archive
3. Create a template monitoring project
Host-template, select the template you just created Cisco C3750E
Open the project as shown in:
Create new monitoring
Here we monitor the import traffic of the Cisco C3750E switch Port GIGABITETHERNET0/1
Name: GIGABITETHERNET0/1 in
Type:SNMPV2 endpoint Agent
Key value: ifinoctets.10101
SNMP OID:1.3.6.1.2.1.2.2.1.10.10101
SNMP Community: Public
Data type: Digital (no plus or minus)
Data type: decimal number
Unit:bps
Use custom multiples: Hook 8
Data Update interval: 60
History storage period (in days): 7
Trend storage period (in days): 365
Storage value: difference (rate per second)
Display value: Unchanged
Archive
4. Create a monitoring graphic
Configuration-Host
Select the switch ip-graphic you just created
As shown in the following:
Create a graphic
Name: GIGABITETHERNET0/1 in
Add, Select the monitoring project you just created
Archive
5. View monitoring Status
Open Zabbix
In-Test-graphics
Groups: Switches
Host: Switch IP
Graphics: GIGABITETHERNET1/0/1
As shown
At this point, the ZABBIX monitoring switch setup is complete.
Note: Cisco switch CPU and memory monitor OID values
CPU load (percent) in 5 seconds enterprises.9.2.1.56.0
Snmpwalk-v 2c-c Test IP 1.3.6.1.4.1.9.2.1.56.0
CPU load (percent) in 1 minutes
Snmpwalk-v 2c-c Test IP 1.3.6.1.4.1.9.2.1.57.0
CPU load (percent) in 5 minutes
Snmpwalk-v 2c-c Test IP 1.3.6.1.4.1.9.2.1.58.0
Get Memory usage
Snmpwalk-v 2c-c Test IP 1.3.6.1.4.1.9.9.48.1.1.1.5
Get Memory Idle condition
Snmpwalk-v 2c-c Test IP 1.3.6.1.4.1.9.9.48.1.1.1.6
Current Memory usage
enterprises.9.9.48.1.1.1.5.1
1.3.6.1.4.1.9.9.48.1.1.1.5.1
1.3.6.1.4.1.9.9.48.1.1.1.5.2
1.3.6.1.4.1.9.9.48.1.1.1.5.16
Zabbix Monitoring Switch settings