Here is prometheus.yml config.
- job_name: 'snmp2'
scrape_interval: 120s
scrape_timeout: 120s
file_sd_configs:
- files :
- /etc/prometheus/targets2.yml
metrics_path: /snmp
params:
module: [customsnmp]
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 192.168.1.15:9116 # The SNMP exporter's real
hostname:port.
20 Kasım 2020 Cuma tarihinde saat 17:15:27 UTC+3 itibarıyla Cihan Tunali
şunları yazdı:
> Hello all,
>
> I want to collect only 1.3.6.1.2.1.31.1.1.1.10 and 1.3.6.1.2.1.31.1.1.1.6
> OID from my devices via snmp_exporter. Is there any way to do it? I tried
> to generate snmp.yml file and cleaned generator.yml but still i got all
> OIDs and collection them took to much time (such as 2minutes :( )
>
> Here is generate.yml file
> modules:
> if_mib:
> walk: [sysUpTime, interfaces, ifXTable]
> lookups:
> - source_indexes: [ifIndex]
> lookup: ifAlias
> overrides:
> ifAlias:
> ignore: true # Lookup metric
> ifDescr:
> ignore: true # Lookup metric
> ifName:
> ignore: true # Lookup metric
> ifType:
> type: EnumAsInfo
> customsnmp:
> walk:
> - 1.3.6.1.2.1.31.1.1.1.6 # Instance of "ifHCInOctets"
> - 1.3.6.1.2.1.31.1.1.1.10 # Instance of "ifHCOutOctets"
> auth:
> community: aliveli
>
>
--
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/9f187119-4caf-452f-9326-8aff73e0c3a7n%40googlegroups.com.