forked from zabbix/community-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request zabbix#119 from BarryCui/main
update template
- Loading branch information
Showing
2 changed files
with
105 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,34 +4,30 @@ | |
|
||
**Description** | ||
--------------- | ||
Testing environment: | ||
- Ubuntu 22.04 LTS | ||
- Zabbix 6.0.6 | ||
- AC WX3510H(ComwareV7) | ||
|
||
|
||
I've created this template for the H3C Access Controller Model WX3510H. | ||
|
||
|
||
For now, I've tested only the AC model WX3510H with the software version ComwareV7 and the AP model WA4320i-ACN on zabbix version 3.4.x and 4.4.x. | ||
|
||
|
||
The templates of version 3.4.x and 4.4.x are the same one. | ||
|
||
|
||
|
||
I've updated and tested this template in the above environment. | ||
|
||
|
||
**Prerequisites** | ||
----------------- | ||
|
||
Before using this template, you must complete the steps below: | ||
|
||
Before you can use this template, you must complete the steps below: | ||
|
||
|
||
1. Download the MIB files from the H3C website: http://download.h3c.com.cn/download.do?id=5087748 or get it from my github template subfolders. | ||
1. Set up snmp configuarions on WX3510H device: | ||
Example: | ||
snmp-agent sys-info version all | ||
snmp-agent community read public | ||
snmp-agent community write private | ||
|
||
2. Download MIB files from H3C website: https://download.h3c.com/app/cn/download.do?id=7378345 | ||
|
||
2. Unzip the .zip file and copy all the files under the subfolder "Comware MIB-20200713\H3C New Style Private MIB\" into the snmp mib folder(normally /usr/share/snmp/mibs/) on your zabbix server(Note: If you're running a dockerized zabbix, you need to copy the mib files into the container run by the zabbix/zabbix-server-mysql:alpine image). | ||
Unzip and copy all the files under the subfolder "H3C Public MIB/" and "H3C New Style Private MIB/" into the snmp MIB folder(normally /usr/share/snmp/mibs/) on your zabbix server. | ||
|
||
|
||
3. Restart zabbix to take effect. | ||
3. Restart Zabbix to take effect. | ||
|
||
|
||
|
||
|
@@ -41,42 +37,40 @@ Before you can use this template, you must complete the steps below: | |
------------ | ||
|
||
|
||
- Automatically discovers and adds items of the number of the currently associated stations for each AP. | ||
- Automatically discovers APs with some of their properties(number of clients, channel number, channel usage, CPU usage, etc.). | ||
|
||
|
||
- Links to the template "Template Module ICMP Ping" in order to do ping tests for AC. | ||
- This template is linked to "Template Module ICMP Ping" in order to do ping tests for AC. | ||
|
||
|
||
|
||
|
||
|
||
**Usage** | ||
**How to use it** | ||
--------- | ||
|
||
|
||
1. Import the template file. | ||
|
||
|
||
2. Add a host of H3C WX3510H AC. | ||
|
||
|
||
3. Link the AC host with this template. | ||
2. Add a host of H3C WX3510H AC, and set the macro {$SNMP\_COMMUNITY} to the value of your own | ||
under host config(not template config). | ||
|
||
|
||
4. Set the macro {$SNMP\_COMMUNITY} to the value of your own under host level. | ||
3. Link the AC host to this template. | ||
|
||
|
||
5. Wait for discovery. | ||
4. Wait for discovery. | ||
|
||
|
||
|
||
|
||
|
||
**Advanced Usage** | ||
**Visualize your APs** | ||
------------------ | ||
|
||
|
||
You can make a real-time AP location map showing the current stations for each AP by the following steps: | ||
You can make a real-time AP location map showing the current statistics for each AP by the following steps: | ||
|
||
|
||
1. Create a topology map. | ||
|
@@ -85,51 +79,67 @@ You can make a real-time AP location map showing the current stations for each A | |
2. Import your own location map picture as background. | ||
|
||
|
||
3. Add an element as each of your AP: | ||
3. Add an element as Access point device: | ||
|
||
Below is an example, the label is an expression macro, the pattern is like this: {?last(/ac ip/item key)} | ||
|
||
- type: host | ||
- type: Host | ||
|
||
- Label: | ||
Name: ap01 | ||
Number of Clients: {?last(/10.1.1.1/numOfClients[ap01])} | ||
2.4G channel number: {?last(/10.1.1.1/hh3cDot11APRadioEntry.5.c2.[ap01])} | ||
2.4G channel usage: {?last(/10.1.1.1/hh3cDot11APRadioEntry.26.c2.[ap01])} | ||
5.8G channel number: {?last(/10.1.1.1/hh3cDot11APRadioEntry.5.c1.[ap01])} | ||
5.8G channel usage: {?last(/10.1.1.1/hh3cDot11APRadioEntry.26.c1.[ap01])} | ||
CPU Usage: {?last(/10.0.200.253/hh3cDot11APSysInfoByAPIDEntry.2[ap01])} | ||
|
||
- tag:{the IP address of AC:hh3cDot11ApStationCurAssocSum[the name of ap, you can get it from the names of items].last(0)} | ||
- Host: (choose your AC device from list) | ||
|
||
Through this way I'm able to dynamicly show all the APs with their statistics. | ||
|
||
Note: | ||
|
||
- host: choose your AC from list | ||
Since Zabbix6.0, expression macros are written in a new way. You can find useful information here: | ||
|
||
|
||
|
||
|
||
|
||
**Note** | ||
-------- | ||
|
||
|
||
To be clear, here's an example of the content of my tag: | ||
https://www.zabbix.com/documentation/6.0/de/manual/introduction/whatsnew600#new-macros | ||
https://www.zabbix.com/documentation/5.4/en/manual/introduction/whatsnew540 | ||
|
||
|
||
AP39 | ||
|
||
|
||
Current stations: {10.0.200.253:hh3cDot11ApStationCurAssocSum[ap39].last(0)} | ||
**How to customize this template** | ||
------------------ | ||
|
||
|
||
As you may want to customize or expand the functionality of this template, here's what I do for the development routine: | ||
|
||
|
||
#From the first line, AP39 is one of my AP names. I added it by hand. | ||
1. In the unzipped folder, you may find a .txt file named "Quick reference of H3C new style MIB objects description". Open it and filter the keyword "DOT11" or more specifically "HH3C-DOT11-APMT-MIB", because the latter one is the only MIB I care about. | ||
|
||
2. In the .txt file, you can see lots of blocks of OIDs: an OBJECT-TYPE followed by "-- FROM" keyword. | ||
Say, I find the OBJECT-TYPE hh3cDot11ApStationCurAssocSum followed by the string "-- FROM HH3C-DOT11-APMT-MIB" on the second line. | ||
You can use snmpwalk to retrieve data based on that format. The command should be like: | ||
pattern: snmpwalk -v 2c -c <community name> <device ip> <OID> | ||
example: snmpwalk -v 2c -c public 10.1.1.1 HH3C-DOT11-APMT-MIB::hh3cDot11ApStationCurAssocSum | ||
|
||
#The second line shows dynamic statistics of the current stations of ap39, in which 10.0.200.253 is the IP address of my AC; The second part you can copy from item key names; last(0) means to get the latest data. You can just replace the IP of AC and the name 'ap39' in [] with your own values. | ||
You see what I'm doing? Yes, just put the MIB string(HH3C-DOT11-APMT-MIB) after device ip, and then followed by two colons followed by the OBJECT-TYPE(hh3cDot11ApStationCurAssocSum in this case). | ||
|
||
There you are. You've successfully retrieved data. | ||
|
||
3. Copy the snippet of OID in snmpwalk command into Zabbix to make your template macro. | ||
A simple example of the usage of it in discovery rule: | ||
discovery[{#NUMOFCLIENTS},HH3C-DOT11-APMT-MIB::hh3cDot11ApStationCurAssocSum] | ||
The first parameter is a macro name, the second one is the OID you used before. | ||
|
||
|
||
An example of the usage in item prototypes: | ||
HH3C-DOT11-APMT-MIB::hh3cDot11ApStationCurAssocSum.{#SNMPINDEX} | ||
The parameter is the OID you used, and it is followed by a dot and a built-in macro {#SNMPINDEX}. | ||
|
||
|
||
|
||
## Author | ||
|
||
Barry Cui | ||
Barry Cui | ||
Email: [email protected]; [email protected] | ||
|
||
## Macros used | ||
|
||
|
@@ -146,14 +156,20 @@ There are no macros links in this template. | |
|
||
|Name|Description|Type|Key and additional info| | ||
|----|-----------|----|----| | ||
|AP Discovery|<p>-</p>|`SNMP agent`|hh3cDot11CurrAPTemplateName<p>Update: 1m</p>| | ||
|AP Discovery|<p>-</p>|`SNMP agent`|ap.discovery<p>Update: 1m</p>| | ||
|
||
|
||
## Items collected | ||
|
||
|Name|Description|Type|Key and additional info| | ||
|----|-----------|----|----| | ||
|number of current associations on $1|<p>-</p>|`SNMP agent`|hh3cDot11ApStationCurAssocSum[{#APNAME}]<p>Update: 60s</p><p>LLD</p>| | ||
|number of current clients on {#APNAME}|<p>-</p>|`SNMP agent`|HH3C-DOT11-APMT-MIB::hh3cDot11ApStationCurAssocSum.{#SNMPINDEX}<p>Update: 60s</p><p>LLD</p>| | ||
|2.4G Channel Number on {#APNAME}|<p>-</p>|`SNMP agent`|hh3cDot11APRadioEntry.5.c2.[{#APNAME}]<p>Update: 60s</p><p>LLD</p>| | ||
|2.4G Channel Usage on {#APNAME}|<p>-</p>|`SNMP agent`|hh3cDot11APRadioEntry.26.c2.[{#APNAME}]<p>Update: 60s</p><p>LLD</p>| | ||
|5.8G Channel Number on {#APNAME}|<p>-</p>|`SNMP agent`|hh3cDot11APRadioEntry.5.c1.[{#APNAME}]<p>Update: 60s</p><p>LLD</p>| | ||
|5.8G Channel Usage on {#APNAME}|<p>-</p>|`SNMP agent`|hh3cDot11APRadioEntry.26.c1.[{#APNAME}]<p>Update: 60s</p><p>LLD</p>| | ||
|CPU Utilization of {#APNAME}|<p>-</p>|`SNMP agent`|hh3cDot11APSysInfoByAPIDEntry.2[{#APNAME}]<p>Update: 60s</p><p>LLD</p>| | ||
|
||
|
||
|
||
## Triggers | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters