Zabbix6.2 uses templates and custom monitoring items to monitor Huawei AR3260 router

1: Log in to the router’s WEB management console. Find SNMP in the system management and enable the SNMP agent. It doesn't matter if you choose v2c version as the SNMP version, then click to create a new group.

2: Just enter the default public as the group name. On the WEB side, garbled characters are displayed, but it does not affect the use. Select read-only as the access mode.

3: Log in to Zabbix and click on the host in monitoring.

4: Then click Create Host in the upper right corner.

5: Enter the host name according to the actual situation. You can see the name. The template I use is the Huawei VRP by SNMP template that comes with Zabbix. The hosts and groups can be used with the system or you can create them yourself. Then click Add under the interface.

6: We choose SNMP.

7: IP address Enter the IP address of the router. No other information needs to be changed, and then click Add.

8: The SNMP that has just been added with availability is gray, indicating that the connection has not been successful yet.

9: SNMP turns green to indicate successful monitoring.

10: After successful monitoring, you can find that the template has a total of 76 monitoring items.

11: I can click on the latest data to see what is being monitored, including port information, speed, running time and other information.

12: But I did not find any information about monitoring the status of devices such as CPU, memory and temperature in the monitoring items.

13: For example, if we want to monitor CPU usage, memory usage and temperature, we need to customize monitoring items. To implement custom monitoring items, we need to search the MIB library to find the corresponding OID.

14: Visit the website below to find the OID of your Huawei device. 

Find OID

15: Download the product manual after finding the corresponding product.

16: After downloading, open the product document, click Search, and type the word HUAWEI-CPU-MIB you want to search for.

17: Click on the commonly used MIB node. We found that the following three items meet our needs, taking the physical CPU usage as an example and remembering the value of the OID.

18: Log in to the Zabbix host and ensure that SNMP is installed on the host. I want to use the snmpwalk command to see if I can get the OID value. If not there is need to install SNMP.

yum install net-snmp* -y

Add the startup service to auto-start at boot.

systemctl start snmpd
systemctl enable snmpd

19: Run the following command to view the value of OID. -c is followed by the community name, which defaults to public, followed by the IP address of the router, and the last string of values ​​is the OID value of the actual CPU usage.

snmpwalk -v 2c -c 团体名称 路由器IP 1.3.6.1.4.1.2011.5.25.31.1.1.1.1.5

20: You can see that there is a non-zero value below. Remember the data before INTEGER. This string of numbers should be added to the final ODI of the actual CPU usage.

1.3.6.1.4.1.2011.5.25.31.1.1.1.1.5.3932169

21: Click on the host in the Zabbix configuration, then click on the monitoring item.

22: Click Create Monitoring Item in the upper right corner.

23: Choose the name according to the actual situation, select SNMP agent as the type, the key value can be entered in English at will, it will not have any effect, SNMP OID enter the OID value obtained before, and then click Test.

24: Click to get the value and test it. If you find that the value has been obtained, click Cancel.

25: Finally, click Add to complete the addition of the custom item.

26: Check the monitoring items on the host again and find that there are 77 items, one more than before.

27: Use the same method as above to add monitoring items of actual memory usage percentage and temperature.

28: Let’s compare the values ​​we have obtained. The memory and temperature are exactly the same. It is normal for the CPU to have a slight difference.

 

29: Now that the custom monitoring items have been created, then create triggers for these three custom monitoring items to implement the alarm function. Click Hosts in Configuration, then click Triggers.

30: Click to create a trigger.

31: Fill in the name, severity, allow manual shutdown, etc. according to the actual situation, and then click Add.

32: The monitoring item selects the previously established temperature monitoring item. The function can select many final values, average values, etc. according to the actual situation. As a result, we chose an alarm greater than 35 degrees for testing. Then click Insert.

33: Finally click Add to complete the creation of the trigger.

34: There was a warning message in the past few moments.

35: You can see the specific temperature alarm information.

36: Other monitoring items can also create triggers based on the above method. 

Guess you like

Origin blog.csdn.net/yleihj/article/details/129415671