I have a snmpd.conf which looks like this. I would like the comments to auto-fill i.e. make the file human readable with explanations. If it were one file, I could have done copy/paste from default one, but there are many different ones. Is there a command that can insert the comments?
snmpconf -R [belowfile] -a -f [output file]
Above command didn't help :(
m2sec notConfigUser default public
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
access notConfigGroup "" any noauth exact systemview none none
com2sec local localhost bl4h
com2sec wgen 10.1.0.0/22 bl4h
group MyRWGroup any local
group MyROGroup any DOMAIN
view all included .1 80
view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc
access MyROGroup "" any noauth 0 all none none
access MyRWGroup "" any noauth 0 all all all
access notConfigGroup "" any noauth exact roview rwview none
syslocation SFO
syscontact sa.unix <[email protected]>
disk / 10000
load 12 14 14
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat
The reason I posted this question is I read somewhere that snmpconf can insert comments and make it look more understandable. I have a bunch of these files and wanted to make it look pretty and understandable by Jr. SAs.
Comments are for humans - by definition they pretty much need to be inserted into the file by hand by (more knowledgeable) humans.
If you need to have comments in your files I suggest a template file (with comments and
$variable
blocks to substitute in appropriate values for things that might change, like subnets and community strings) -- When you make a change you would just update the template & re-generate the files on the clients.(Honestly though, your file is NOT that complicated - The only thing I would say needs a comment is the
pass
directive :)