Or you can edit the existing yaml like this:
...
if_mib: &if_mib
...
... at very end of file:
if_mib_secret:
<<: *if_mib
version: 2
auth:
community: abcd1234
This needs amending for use with SNMPv3. I'd recommend you get it working with snmpstatus or snmpwalk first, then you'll know the correct options to set here.
If it doesn't work, then can you show:
1. the snmpstatus/snmpwalk command line which *does* work
2. the snmp_exporter configuration you've tried which *doesn't* work