Help generating a complete snmp.yml file for FortiGate with snmp_exporter

50 views
Skip to first unread message

Miguel Ángel Barrientos Ramírez

unread,
Nov 5, 2024, 11:30:35 AM11/5/24
to Prometheus Users

I'm trying to generate an snmp.yml file for snmp_exporter that can pull all possible metrics from a FortiGate device. I have the MIB files provided by FortiGate, but I haven't found a clear way to use them with generate to create the file. Additionally, I'm unsure how to configure the generator.yml file to gather all metrics in a single module that includes everything available from the FortiGate.

Could someone guide me through the process or provide specific examples to configure generator.yml and generate the snmp.yml file in this scenario?

Ben Kochie

unread,
Nov 5, 2024, 11:31:30 AM11/5/24
to Miguel Ángel Barrientos Ramírez, Prometheus Users
Maybe easier, use the fortigate exporter.


On Tue, Nov 5, 2024 at 5:30 PM Miguel Ángel Barrientos Ramírez <miguel.b...@liddev.com> wrote:

I'm trying to generate an snmp.yml file for snmp_exporter that can pull all possible metrics from a FortiGate device. I have the MIB files provided by FortiGate, but I haven't found a clear way to use them with generate to create the file. Additionally, I'm unsure how to configure the generator.yml file to gather all metrics in a single module that includes everything available from the FortiGate.

Could someone guide me through the process or provide specific examples to configure generator.yml and generate the snmp.yml file in this scenario?

--
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 visit https://groups.google.com/d/msgid/prometheus-users/a43c6799-48ba-4165-b684-9c683595a421n%40googlegroups.com.

Chris Siebenmann

unread,
Nov 5, 2024, 4:08:21 PM11/5/24
to Miguel Ángel Barrientos Ramírez, Prometheus Users, Chris Siebenmann
> I'm trying to generate an *snmp.yml* file for *snmp_exporter* that can
> pull all possible metrics from a FortiGate device. I have the MIB
> files provided by FortiGate, but I haven't found a clear way to use
> them with generate to create the file. Additionally, I'm unsure how to
> configure the generator.yml file to gather all metrics in a single
> module that includes everything available from the FortiGate.
>
> Could someone guide me through the process or provide specific
> examples to configure *generator.yml* and generate the *snmp.yml* file
> in this scenario?

I went through something like this a while back and wrote up what I
learned about the process at:

https://utcc.utoronto.ca/~cks/space/blog/sysadmin/PrometheusSnmpExporterMIBsNotes

My case was relatively simple (I had only a single additional MIB and it
was relatively straightforwardly structured, although I did have to
exclude one metric that was different between the MIB and my actual
device). Your case may be more complicated.

Based on what I know about working with the SNMP exporter, I think it's
reasonable to combine all of your new MIBs into one 'fortigate' module,
although it may be easier to do them as separate modules. I wouldn't try
to also put existing standard MIBs, such as IF-MIB, into your new
module; I think it's better to keep those separate so that you can use
the standard snmp.yml.

In general, while the SNMP exporter works, I think it's better to use
another, more focused exporter if you can because the SNMP exporter is
also rather underdocumented if the standard snmp.yml doesn't (fully)
meet your needs. If you have anything complicated (or just if you're
unlucky about your MIBs and devices), you're going to wind up reading
through under-documented configuration file examples and maybe even
source code in order to get things done.

- cks
Reply all
Reply to author
Forward
0 new messages