Re: Giving your own MIB file before generating the snmp.yml

35 views
Skip to first unread message
Message has been deleted

Brian Candler

unread,
Mar 3, 2020, 6:17:48 AM3/3/20
to Prometheus Users
The generator does not "create its own set of MIB files" - it only reads in MIB files.  You can set the environment variable MIBDIRS to tell it what directories you want it to look in:
https://github.com/prometheus/snmp_exporter/issues/395

If you don't set this environment variable, it may pick up existing MIBs from a system-defined location (wherever your net-snmp looks by default).

Can you be more specific about the behaviour you're seeing?

Yagyansh S. Kumar

unread,
Mar 3, 2020, 6:30:11 AM3/3/20
to Prometheus Users
Deleted the post by mistake. I understood that it is reading the MIB files from the mibs directory. I even copied my MIB file in that directory and set the environment variable, but it seems that in the generator.yml file some modules are predefined and only those modules are created in the snmp.yml file. Using the default if_mib module gives me only the interface metrics for my LB, I want the service level metrics of my LB such as the server binded to the LB, HTTP stats, TCP stats etc.

Ben Kochie

unread,
Mar 3, 2020, 6:44:54 AM3/3/20
to Yagyansh S. Kumar, Prometheus Users
Yes, you can use your own set of MIBs and create a custom generator config.


On Tue, Mar 3, 2020 at 12:24 PM Yagyansh S. Kumar <yagyans...@gmail.com> wrote:
I want to monitor my Citrix Netscalar LB using SNMP Exporter and I want to give a MIB file provided by the vendor itself and generate the snmp.yml based on that MIB file. Using the default IF_MIB module I am not getting the service level stats of the LB such as the server binded to the LB, HTTP stats, TCP stats etc. Is there a way to give my own MIB file and get the generator according to that? Or if I'm completely wrong here, can someone point me towards the correct path.
Thanks!

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/97dde63e-21a4-4686-bd34-0a9be5f5bae1%40googlegroups.com.

Brian Candler

unread,
Mar 3, 2020, 7:31:28 AM3/3/20
to Prometheus Users
On Tuesday, 3 March 2020 11:30:11 UTC, Yagyansh S. Kumar wrote:
 I understood that it is reading the MIB files from the mibs directory. I even copied my MIB file in that directory and set the environment variable, but it seems that in the generator.yml file some modules are predefined

generator.yml defines what MIB names to use, but the MIB files themselves are not part of generator.

Try running generator under strace:

strace -f ./generator 2>/tmp/strace.out
grep open /tmp/strace.out

Looking for open() calls - you'll see what MIB files it is opening (or attempting to open and failing).
Reply all
Reply to author
Forward
0 new messages