Generate HUAWEI SNMP Exporter Module
For this example, I will create a module for a generic HUAWEI device.
I will need to download a HUAWEI MIB and research which OIDs I should walk/get.
First, navigate to the folder where it will be saved. ie, the ./generator/mibs folder
Download the HUAWEI MIB
curl http://www.circitor.fr/Mibs/Mib/H/HUAWEI-MIB.mib > HUAWEI-MIB.mib
View the contents of the folder and it should contain the new file HUAWEI-MIB.mib
Now navigate back one folder into the generator folder
And we need to edit the generator.yml and add the information for the Huawei device.
sudo nano ./generator.yml
modules ... hauwei: walk: - 220.127.116.11.2.1.10 - 18.104.22.168.2.1.47 version: 2 auth: community: public overrides: ifType: type: EnumAsInfo ...
After saving the file, create the variable that bash can use that points to the new mibs folder
The run the generator to generate a new snmp.yml.
If all is correct, then there will be a new node in the snmp.yml named huawei containing instructions on which OIDs to walk/get and which metrics will be made available for Prometheus.