Brian, 
Thanks!
When setting the __param_module could you point me to an example?

For example this is what I have the fortigate devices.

  - job_name: 'fortinet'
    static_configs:
      - targets: [ 10.150.1.1 ]
    scrape_interval: 15s
    metrics_path: /snmp
    params:
      module: [fortigate]
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: 10.150.10.25:9116  # SNMP exporter

Also does anyone know of a mib to yaml converter?

this would help especially for the fortinet/fortigate devices.

Thank you!!!

On Thursday, April 2, 2020 at 4:17:51 AM UTC-5, Brian Candler wrote:
>
> 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.
>
>
On Thursday, April 2, 2020 at 4:17:51 AM UTC-5, Brian Candler wrote:
>
> 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/a0c9d6cc-3dd7-43c3-aa67-2d1e48c69059%40googlegroups.com.

Reply via email to