Skip to content


 Zabbix
 Grafana
 Prometheus
 Threejs and TypeScript
 SocketIO and TypeScript
 Blender Topological Earth
 Sweet Home 3D
 Design Patterns Python
 Design Patterns TypeScript
   
 Course Coupon Codes
Python   TypeScript
Kindle Edition Kindle Edition
$9.99 $14.99 $9.99 $14.99
Paperback Paperback
$14.99 $19.99 $14.99 $19.99








SNMP Exporter Configuration Generator

SNMP Exporter Configuration Generator SNMP Exporter Configuration Generator SNMP Exporter Configuration Generator

Description

We can generate custom modules that the SNMP Exporter can use.

We do this by generating a customised snmp.yml using a program called the SNMP Exporter Config Generator.

After generating a new snmp.yml, we can configure the existing SNMP Exporter to use the new customised snmp.yml.

The official project can be found at SNMP Exporter Config Generator

Organise a dedicated server for this process so that you don't break your existing Prometheus server or any other production servers.

On the new server, install the dependencies that the SNMP Exporter Config Generator will need.

1
sudo apt update
1
sudo apt install unzip build-essential libsnmp-dev p7zip-full 

Install the go compiler

1
apt install golang-go 

Test that go is installed.

1
go version

Download and build the exporter

1
go get github.com/prometheus/snmp_exporter/generator

CD into the folder where the downloaded repository was saved.

1
cd ${GOPATH-$HOME/go}/src/github.com/prometheus/snmp_exporter/generator

View the contents of the folder

1
ls -lh

Build the project using go

1
go build

There should be a new file named generator with execute permissions.

1
2
3
...
-rwxr-xr-x 1 root root 7.3M Nov  5 06:53 generator
...

Now run

1
make mibs
It will download many MIBs files and place them into a folder named mibs
1
2
3
...
drwxr-xr-x 3 root root 4.0K Nov  5 07:20 mibs
...

We now need to create a variable that bash can use that points to the new mibs folder

1
export MIBDIRS=mibs

Now we can test that generating a new snmp.yml works.

1
./generator generate

In the ./generator folder there will be a new file called snmp.yml. We can now replace the existing snmp.yml on the server running SNMP Exporter with this new snmp.yml file if we wanted to.

Warning

Ensure that the version of the SNMP Exporter Config Generator matches the version of the SNMP Exporter that you are generating the snmp.yml for. In my SNMP Exporter video, I installed version 0.19 so I need to make sure that the version of the SNMP Exporter Config Generator is from the same repository version.

SNMP Exporter v0.19 : https://github.com/prometheus/snmp_exporter/tree/v0.19.0

SNMP Exporter Config Generator v0.19 : https://github.com/prometheus/snmp_exporter/tree/v0.19.0/generator