The key to monitoring the CPU and memory of the switch is to find the correct OID, please refer to the following blog post for how to find the OID.
http://tryrus.blog.51cto.com/10914693/1788833
Before looking at this blog post please make sure that you have an understanding of the basic operation of Zabbix, there is no clear place to read my previous blog post.
http://tryrus.blog.51cto.com/10914693/1772271
http://tryrus.blog.51cto.com/10914693/1782062
First, configure the environment
CentOS 7 Linux version 3.10.0-229.el7.x86_64
Zabbix-3.0.1
C2960s-universalk9-mz.122-55.se5.bin
C2960s-universalk9-mz.122-55.se3.bin
C2960-lanbasek9-mz.122-50.se5.bin
C3750e-universalk9-mz.122-55.se5.bin
Second, CPU monitoring and configuration trigger
2.1 oid to be used
1.3.6.1.4.1.9.2.1.57.0 CPU utilization for one minute
1.3.6.1.4.1.9.2.1.58.0 CPU utilization for five minutes
1.3.6.1.4.1.9.2.1.56.0 CPU utilization for five seconds
2.2 Create Item
Because the Cisco versions of the CPU OID are consistent, you can create a new template for the Cisco CPU utilization, set the item to be monitored in this template, and finally the template Cisco CPU The utilization is added to the template for each type of switch, so all switches automatically monitor CPU usage.
Set up CPU-related three ITEM,CPU under Cisco CPU Utilization Template utilization for one MINUTE,CPU utilization for five MINUTES,CPU utilization fo R five seconds, as shown in.
Name,key these two values can be filled in casually, but it is better to be like me, can be very intuitive to know what this item is monitored
TYPE:SNMP v2 Version
SNMP OID: the corresponding OID
SNMP Community: The corresponding SNMP read group word
UNITS:CPU usage rate, fill percent%
The other options are default, and the last item description fills in the description when looking up the OID on the Cisco website. Click Add to complete the creation of the item.
After you create three monitoring items for CPU usage.
2.3 Create graph
In the template Cisco CPU Utilization, create graph.
Fill in the graph's name, add the three items you just created in the Items option, and click the last add to finish creating the graph.
2.4 Verifying graph
Add the created template Cisco CPU utilization to the switch template, and then you can select a switch in the monitoring-->graphs to view the CPU utilization .
2.5 Creating trigger
Also create trigger in the template Cisco CPU Utilization, as all switches are used.
Create the trigger.
The important thing here is that the expression, that is, Zabbix should use the trigger (Trigger) to alert the user, let the user know the CPU usage is abnormal. Click Add after expression to add the expressions, as shown in.
Item: Select the CPU utilization for five seconds here. CPU real-time usage exceeds the alarm threshold, Zabbix via mail alarm, so to know the CPU real-time utilization, this is the most appropriate.
Functions: Refers to the function, there is a drop-down list, select the average value greater than n from the drop-down list.
Last of (T): #3, value of most recent three times
n:20 here fill 20, indicating 20%, the percent sign can not write. This is for the convenience of testing only filled in 20.
The last expression is {Cisco CPU Utilization:cpuUtilization5sec.avg (#3)}>20
Create the completed trigger.
You can refer to the following two documents for detailed usage and function of the expression.
Https://www.zabbix.com/documentation/3.0/manual/config/triggers/expression
Https://www.zabbix.com/documentation/3.0/manual/appendix/triggers/functions
2.6 Verifying Trigger
Because I set the switch CPU utilization above 20% will trigger the trigger alarm, so after the creation of trigger completed, after a minute or so, my mail received the problem message shown, the configuration has been in effect.
Then the threshold of 20% is adjusted to 80%, after a minute or so, my mail received the OK message shown, the configuration has been re-effective.
Third, memory monitoring and configuration trigger
3.1 oid to be used
.1.3.6.1.4.1.9.9.48.1.1.1.6.1 Ciscomemorypoolfree
.1.3.6.1.4.1.9.9.48.1.1.1.5.1 ciscomemorypoolused
3.2 Create Item
As with CPU usage, after creating the template Cisco Memory Statistics, create the item ciscomemorypoolfree and ciscomemorypoolused in the template, creating the same method as Just the memory item does not need to fill in the unit. The other options are default, and the last item description fills in the description when looking up the OID on the Cisco website. Click Add to complete the creation of the item.
After creating two monitoring entries for memory.
3.3 Create graph
In the template Cisco Memory Statistics, create graph as shown in.
Fill in the graph's name, add the two items you just created in the Items option, and click the last add to finish creating the graph.
3.4 Verifying graph
Add the Created template Cisco Memory Statistics to the switch template, and you can then select a switch in the monitoring-->graphs to view the Memory Statistics as shown in. Because memory is seldom changed.
3.5 Creating trigger
Also create trigger in the template Cisco Memory statistics, as all switches are used.
To create trigger, click Add after expression.
Here I set the threshold value to 20%, first to add two expressions as shown in the configuration.
{Cisco Memory Statistics:ciscoMemoryPoolFree.last ()}=0
{Cisco Memory Statistics:ciscoMemoryPoolUsed.last ()}=0
After the add is complete .
Modify the expression above for {Cisco memory Statistics:ciscoMemoryPoolFree.last ()}*0.8<{cisco memory Statistics: Ciscomemorypoolused.last ()}*0.2, as shown, indicates that an alarm will be triggered when idle usage is less than 20%.
i.e. a< (a+b) *0.2 converted to a*0.8<b*0.2
Click on the bottom of add to complete the creation of trigger.
3.6 Verifying Trigger
After the trigger configuration is complete, the Zabbix will be configured for the run. So after the creation of the trigger, after a minute or so, my mail received the OK message, stating that the configuration is already in effect.
As for the configuration threshold is how big will produce problem mail, left you to see the test ~ ~
Thank you for opening this blog post, and always adhere to see here, if you feel helpful, please do not skimp on the lower right corner of the praise.
Zabbix 3.0 Monitoring Switch (3)--CPU, memory monitoring and configuration trigger