scrape_configs: - job_name: 'snmp' static_configs: - targets: - 192.168.1.2 # SNMP device. metrics_path: /snmp params: module: [if_mib] relabel_configs: - source_labels: [__address__] target_label: __param_target - source_labels: [__param_target] target_label: instance - target_label: __address__ replacement: 127.0.0.1:9116 # The SNMP exporter's real hostname:port
sudo apt-get install unzip build-essential libsnmp-dev # Debian-based distros
go get github.com/prometheus/snmp_exporter/generator
cd ${GOPATH-$HOME/go}/src/github.com/prometheus/snmp_exporter/generator
go build
make mibsfortigate_snmp:
walk:
- ifXTable
- fgVpn
- fgSystem
- fgIntf
- fgInetProto
version: 3
max_repetitions: 25
timeout: 10s
auth:
username: your_username # Required, no default. -u option to NetSNMP.
security_level: authNoPriv # Defaults to noAuthNoPriv. -l option to NetSNMP.
# Can be noAuthNoPriv, authNoPriv or authPriv.
password: your_password # Has no default. Also known as authKey, -A option to NetSNMP.
# Required if security_level is authNoPriv or authPriv.
auth_protocol: SHA # MD5 or SHA, defaults to SHA. -a option to NetSNMP.
# Used if security_level is authNoPriv or authPriv. --
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/25d22ab5-2ada-49f8-98f2-14c4dcb99eae%40googlegroups.com.
Im not able to run the ./generator generate to crearte the snmp.yml file
- 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 exporterBrian,Thanks!When setting the __param_module could you point me to an example?
- job_name: "node"
scrape_interval: 15s
metrics_path: /metrics
# static_configs:
# - targets: [1.2.3.4:9100,5.6.7.8:9100]
file_sd_configs:
- files:
- '/etc/prometheus/node_exporter_targets.json'
# dns_sd_configs:
# - names:
# - "metrics"
# relabel_configs:
# - source_labels: ['__meta_dns_name']
# regex: 'metrics\.(.+?)\..+?\.example\.net'
# target_label: 'zone'
# replacement: '$1'
# - source_labels: ['__meta_dns_name']
# regex: 'metrics\..+?\.(.+?)\.example\.net'
# target_label: 'job'
# replacement: '$1'