HI all,
Appreciate if anyone can help or leave an input. As per title my SNMP exporter state is DOWN and when clicked it is showing unknown with error "server returned HTTP status 400 Bad Request".
I tried to capture snmp to my router (target 192.168.1.253) for testing but it seems not working.
Below is my SNMP yml :-
router:
version: 2
auth:
community: onecommunity
walk:
- 1.3.6.1.2.1.1.3 # sysUpTime
- 1.3.6.1.2.1.31.1 # ifHCInOctets
- 1.3.6.1.2.1.2.2.1.10 # ifInOctets
- 1.3.6.1.2.1.2.2.1.16
- 1.3.6.1.2.1.31.1.1.1
metrics:
- name: ifHCInOctets
oid: 1.3.6.1.2.1.31.1.1.1.6
type: counter
indexes:
- labelname: interface
type: gauge
lookups:
- labels: [interface]
oid: 1.3.6.1.2.1.2.2.1.2
labelname: DisplayString
- labels: [interface]
oid: 1.3.6.1.2.1.31.1.1.1.18
labelname: alias
Below is my prometheus yml:-
- job_name: routersnmp
metrics_path: /snmp
params:
module: [router]
static_configs:
- targets:
- 192.168.1.253
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 192.168.1.181:9116 # URL as shown on the UI
Below is the screenshot:-