TUT:Configuring Net-SNMP Applications
All of the Net-SNMP applications use similar configuration file structures.
Include File
Note: Features discussed on this page require Net-SNMP version 5.6 or higher.
You can include other files from within .conf files. Such as:
# $HOME/.snmp/snmp.conf: include another.conf
Host Specific Configuration Files
Note: Features discussed on this page require Net-SNMP version 5.6 or higher.
Host specific configuration files are also possible in order to set specific variables that are intended only for certain hosts. For example, if you you have a $HOME/.snmp/hosts/host1.example.com.conf file that contains:
16bitIDs true
Then when you run snmpget or any other application it will refrain from using 32bit messageIDs (a SNMP bug that exists in certain devices).
This is especially powerful when combined with the include statement:
# $HOME/.snmp/snmp.conf: defVersion 3 defSecurityLevel authPriv # ...
# $HOME/.snmp/hosts/router.conf: include insecure.conf
# $HOME/.snmp/insecure.conf: # this file overrides the default access settings in the snmp.conf file for our lame servers that don't support SNMPv3 defVersion 1 defCommunity public
Internals
TBD: Describe how init_snmp("appname") triggers reading of appname.conf files