Trying to configure SNMP on the grafana agent to use V3
What was expected to happen?
I see the snmp block showing a sample configuration like this:
snmp:
snmp_targets:
- name: network_switch_1
address: 192.168.1.2
module: if_mib
walk_params: public
auth: public
- name: network_router_2
address: 192.168.1.3
module: mikrotik
walk_params: private
auth: private
walk_params:
private:
retries: 2
public:
retries: 1
The “auth” block should be for username and password but I don’t see any examples of the Yaml structure it is supposed to take.
I also see a bug issued here on the version block being deprecated. Grafana Agent SNMP V3 · Issue #5294 · grafana/agent · GitHub
From the GitHub snmp.yaml config they show something even different.
I would assume it would be configured this way:
snmp:
enabled: true
relabel_configs:
- action: replace
source_labels: [job]
regex: (^.*snmp)\/(.*)
target_label: job_snmp
replacement: $1
- action: replace
source_labels: [job]
regex: (^.*snmp)\/(.*)
target_label: snmp_target
replacement: $2
snmp_targets:
- name: firewall_main
address: '10.10.32.1'
module: if_mib
auths:
priv_v3:
username:
password:
version: 3
I need assistance creating the correct snmp block for the grafana agent. Has anyone successfully done this?