Skip to content

Commit 5eaa06a

Browse files
committed
(snmp-generator) add mibs folder
1 parent cac93f7 commit 5eaa06a

33 files changed

+57263
-235
lines changed

rke2/ayekan/exporters/snmp-generator/Makefile

Lines changed: 0 additions & 235 deletions
This file was deleted.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Rubin's Ugly SNMP Generator
2+
3+
This repository provides a simple way to generate the `snmp.yml` configuration file using the `generator` binary based on definitions specified in `generator.yml`.
4+
5+
If new mibs are needed, they should be manually downloaded to the mibs directory.
6+
7+
Keep in mind that the `generator` binary is not provided and you should compile it locally to use it.
8+
9+
You can grab a copy of the sources from https://github.com/prometheus/snmp_exporter
10+
11+
## Directory Structure
12+
13+
- `generator.yml`: Input file containing the SNMP targets and configuration schema.
14+
- `snmp.yml`: Output file automatically generated from `generator.yml`.
15+
- `mibs/`: Directory containing all required MIB files used during generation.
16+
17+
## Usage
18+
19+
To generate the `snmp.yml` file, simply run:
20+
21+
```bash
22+
generator generate --fail-on-parse-errors --log.level=debug -m mibs
23+
```
24+
25+
## Example
26+
27+
As of May of 2025 the following is the output of this tool:
28+
29+
```bash
30+
$ generator generate --fail-on-parse-errors --log.level=debug -m mibs
31+
time=2025-05-20T20:37:17.930Z level=INFO source=net_snmp.go:174 msg="Loading MIBs" from=mibs
32+
time=2025-05-20T20:37:18.003Z level=INFO source=main.go:57 msg="Generating config for module" module=if_mib
33+
time=2025-05-20T20:37:18.013Z level=INFO source=main.go:75 msg="Generated metrics" module=if_mib metrics=40
34+
time=2025-05-20T20:37:18.013Z level=INFO source=main.go:57 msg="Generating config for module" module=ip_mib
35+
time=2025-05-20T20:37:18.014Z level=INFO source=main.go:75 msg="Generated metrics" module=ip_mib metrics=4
36+
time=2025-05-20T20:37:18.014Z level=INFO source=main.go:57 msg="Generating config for module" module=raritan
37+
time=2025-05-20T20:37:18.016Z level=INFO source=main.go:75 msg="Generated metrics" module=raritan metrics=86
38+
time=2025-05-20T20:37:18.016Z level=INFO source=main.go:57 msg="Generating config for module" module=xups
39+
time=2025-05-20T20:37:18.018Z level=INFO source=main.go:75 msg="Generated metrics" module=xups metrics=22
40+
time=2025-05-20T20:37:18.018Z level=INFO source=main.go:57 msg="Generating config for module" module=schneider_pm5xxx
41+
time=2025-05-20T20:37:18.020Z level=INFO source=main.go:75 msg="Generated metrics" module=schneider_pm5xxx metrics=36
42+
time=2025-05-20T20:37:18.020Z level=INFO source=main.go:57 msg="Generating config for module" module=arista_tunnel
43+
time=2025-05-20T20:37:18.022Z level=INFO source=main.go:75 msg="Generated metrics" module=arista_tunnel metrics=1
44+
time=2025-05-20T20:37:18.022Z level=INFO source=main.go:57 msg="Generating config for module" module=network_base
45+
time=2025-05-20T20:37:18.023Z level=INFO source=main.go:75 msg="Generated metrics" module=network_base metrics=14
46+
time=2025-05-20T20:37:18.036Z level=INFO source=main.go:100 msg="Config written" file=snmp.yml
47+
$
48+
```
6 KB
Binary file not shown.

rke2/ayekan/exporters/snmp-generator/mibs/.dell

Whitespace-only changes.

rke2/ayekan/exporters/snmp-generator/mibs/.net-snmp

Whitespace-only changes.
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
-- ARISTA-SMI_MIB: arista structure of management information
2+
-- Copyright (c) 2008 Arista Networks, Inc. All rights reserved.
3+
4+
ARISTA-SMI-MIB DEFINITIONS ::= BEGIN
5+
6+
IMPORTS
7+
MODULE-IDENTITY,
8+
OBJECT-IDENTITY,
9+
enterprises
10+
FROM SNMPv2-SMI;
11+
12+
arista MODULE-IDENTITY
13+
LAST-UPDATED "201408150000Z"
14+
ORGANIZATION "Arista Networks, Inc."
15+
CONTACT-INFO
16+
"Arista Networks, Inc.
17+
18+
Postal: 5453 Great America Parkway
19+
Santa Clara, CA 95054
20+
21+
Tel: +1 408 547-5500
22+
23+
24+
DESCRIPTION
25+
"The Structure of Management Information for the
26+
Arista Networks enterprise."
27+
REVISION "201408150000Z"
28+
DESCRIPTION
29+
"Updated postal and e-mail addresses"
30+
REVISION "201103311300Z"
31+
DESCRIPTION
32+
"Updated postal address and telephone"
33+
REVISION "200810271830Z"
34+
DESCRIPTION
35+
"Initial version."
36+
::= { enterprises 30065 } -- assigned by IANA
37+
38+
aristaProducts OBJECT-IDENTITY
39+
STATUS current
40+
DESCRIPTION
41+
"aristaProducts is the root object identifier from
42+
which sysObjectID values are assigned. Values are
43+
defined in ARISTA-PRODUCTS-MIB."
44+
::= { arista 1 }
45+
46+
aristaModules OBJECT-IDENTITY
47+
STATUS current
48+
DESCRIPTION
49+
"aristaModules provides a root object identifier
50+
from which MODULE-IDENTITY values may be assigned."
51+
::= { arista 2 }
52+
53+
aristaMibs OBJECT-IDENTITY
54+
STATUS current
55+
DESCRIPTION
56+
"aristaMibs provides a root object identifier
57+
for management-related MIBs."
58+
::= { arista 3 }
59+
60+
aristaExperiment OBJECT-IDENTITY
61+
STATUS current
62+
DESCRIPTION
63+
"aristaExperiment provides a root object identifier
64+
for experimental MIBs. The structure of information
65+
for these MIBs can not be guaranteed between releases."
66+
::= { arista 4 }
67+
68+
aristaInternalUse OBJECT-IDENTITY
69+
STATUS current
70+
DESCRIPTION
71+
"aristaInternalUse provides a root object identifier
72+
for internal use by Arista Networks, Inc."
73+
::= { arista 5 }
74+
75+
END

0 commit comments

Comments
 (0)