On Thursday, 30 January 2020 19:54:22 UTC, Elvin cbl wrote:
>
>
> Im not able to run the ./generator generate to crearte the snmp.yml file
>
>
It sounds like you have two different problems.
(1) You are unable to run the generator.
Please show the exact command you ran, and the exact error output you got.
(2) You tried a scrape config using params: [if_mib] but it doesn't work.
The creds for if_mib are SNMPv2 and "public". So the way I suggest you
work on this (without generator) is to edit the provided snmp.yml. Find
this line:
if_mib:
and change it to:
if_mib: &if_mib
Then at the very end of the file, add the following:
if_mib_secret:
<<: *if_mib
version: 3
auth:
username: your_username
security_level: authNoPriv
password: your_password
auth_protocol: SHA
Restart snmp_exporter. Then query it:
curl 'localhost:9116/snmp?module=if_mib_secret&target=x.x.x.x'
If it works, great. Prometheus will be able to scrape this and collect the
if_mib (but not the fortigate specific MIBs of course), and then you can
next work on the generator.
If it doesn't, then you have some problem either with the SNMPv3
parameters, or with firewalling or ACL between or at the target device. At
this point you should try using the net-snmp command-lien tools directly
(e.g. "snmpstatus") and adjust the authentication/encryption parameters
until you can get a successful query and response. Then apply those
parameters to snmp_exporter.
BTW, Andrew Meyer wrote:
> You need a new scrape job for each device type.
This is not true. You just need to set __param_module appropriately for
each device. This can be done in static_sd or file_sd, all within the same
job: they allow you to set labels on groups of targets.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/90411c0f-bfdb-4531-a401-eb93d7d648bb%40googlegroups.com.