Description
The Zabbix monitoring server is already configured to monitor the switch using Zabbix.
Specific actions:
The following operations are performed on the monitored switches, for example, Cisco switches.
First, log on to the Cisco switch and turn on the SNMP service
Note: Log on 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 group name to Cisco, read and write
Snmp-server Enable traps #启用snmp陷阱
Exit #退出全局配置模式
Show Run #查看当前配置信息
Exit #退出特权模式
Second, use Getif to view 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 an administrator, otherwise the software failed to open!
Host Name: Switch IP address
Read: Public
Other default
Point start
After the connection is successful, the following illustration shows:
Switch to the Interface tab, click the Start connection to view all port information on the switch and record it, as shown in the following illustration:
Switch to the Mbrowser tab
Select iso->org->dod->internet->mgmt->mib-2->interface->iftable->ifentry-> Ifinoctets
Point start
After the connection is successful, the following illustration shows:
Attention:
Ifinoctets #交换机端口进流量
Ifoutoctets #交换机端口出流量
To view switch port outbound traffic:
Iso->org->dod->internet->mgmt->mib-2->interface->iftable->ifentry->ifoutoctets
Interfaces.iftable.ifentry.ifinoctets.1 corresponds to the Vlan1 interface of the switch, the OID value is:1.3.6.1.2.1.2.2.1.10.1
interfaces.iftable.ifentry.ifinoctets.5179 corresponds to the StackPort1 interface of the switch, the OID value is:1.3.6.1.2.1.2.2.1.10.5179
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
Analogy
Depending on the int value in the Interface tab, view the OID value of the current switch's port, and then use the OID value to monitor the switch port in Zabbix.
Here is a list of the ports and OID values of several Cisco switches
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
Third, to add the monitoring of the switch in the Zabbix
1. Add Host
Open Zabbix
Configuration-Host groups-creating host groups
Group Name: Switch
Archive
Configuration-host-Create host
Host Name: Switch IP
Group: Selecting the switch created in the previous step
SNMP interface-IP address: Switch IP
Other default
Status: Detected by
Archive
2. Create Switch Monitor template
Open Zabbix
Configuration-templates-creating templates
Template name: Cisco c3750e
Group: Switches
Host/Template: Select the switch IP that you just added
Archive
3. Create Template Monitoring Project
Host-template, select the template you just created Cisco C3750E
Open the project as shown in the following illustration:
Create a new monitor
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 digits
Unit:bps
Use custom multiple: Hook 8
Data Update interval: 60
History storage period (in): 7
Trend storage period (in): 365
Stored value: difference (rate per second)
Show Value: Unchanged
Archive
4, the creation of monitoring graphics
Configuration-Host
Select the switch ip-graphic you just created
As shown in the following illustration:
Create a graphic
Name: GIGABITETHERNET0/1 in
Add, Select the monitoring project you just created
Archive
5. View monitoring Status
Open Zabbix
Detection Medium-graphics
Group: Switches
Host: Switch IP
Graphics: GIGABITETHERNET1/0/1
As shown in the following figure
At this point, the ZABBIX Monitor switch setup is complete.
Note: Cisco switch CPU and Memory monitor OID value
CPU load (percent) enterprises.9.2.1.56.0 in 5 seconds
Snmpwalk-v 2c-c Test IP 1.3.6.1.4.1.9.2.1.56.0
CPU load in 1 minutes (percent)
Snmpwalk-v 2c-c Test IP 1.3.6.1.4.1.9.2.1.57.0
CPU load in 5 minutes (percent)
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 the 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