snmp_config(4) File Formats snmp_config(4)NAMEsnmp_config - overview of Net-SNMP configuration files
SYNOPSISsnmp_configDESCRIPTION
This page gives an overview of the various configuration files used by
the Net-SNMP software that is shipped with the Solaris operating sys‐
tem.
In a configuration file, lines beginning with a hash character (#) are
treated as a comment and are not parsed.
Search Order
By default, the Net-SNMP applications look for configuration files in
the following directories in the order listed:
1. /etc/sma/snmp
2. /usr/sfw/lib
3. $HOME/.snmp
In each of these directories, the Net-SNMP applications look for files
with the extensions .conf and local.conf, in that order.
The default search path described above can be overridden by setting
the environment variable SNMPCONFPATH to a colon-separated list of
directories. SNMPCONFPATH is used to allow users to place configura‐
tion files in specific directories for their application needs. Cur‐
rently defaulted to /etc/sma/snmp and /usr/local/share/snmp.
Applications that store persistent data will also look in the /var/net-
snmp directory for configuration files.
Switching Configuration Types in Mid-File
You can switch in mid-file the configuration type that the parser is
supposed to be reading. For example, assume you want to turn on packet
dumping output for the agent by default, but you do not want to turn on
packet dumping for the rest of the applications (such as snmpget and
snmpwalk). Normally, to enable packet dumping, you would enter a line
such as the one below in the snmp.conf file:
dumpPacket true
Such a line turns on packet dumping for all of the applications.
Instead, you can put the same line in the snmpd.conf file so that it
applies only to the snmpd daemon. However, you need to tell the parser
to expect this line. You do this by putting a special, type-specifica‐
tion token inside square brackets. For example, inside your snmpd.conf
file you can enter:
[snmp] dumpPacket true
This tells the parser to parse the line as if it were inside a
snmp.conf file instead of an snmpd.conf file. If you want to parse mul‐
tiple lines rather than just one, you can make the context switch apply
to the remainder of the file or until the next context switch directive
by putting the special token on a line by itself:
# make this file handle snmp.conf tokens:
[snmp]
dumpPacket true
logTimestamp true
# return to our original snmpd.conf tokens:
[snmpd]
rocommunity mypublic
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
┌─────────────────────────────┬─────────────────────────────┐
│ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
├─────────────────────────────┼─────────────────────────────┤
│Availability │SUNWsmcmd │
├─────────────────────────────┼─────────────────────────────┤
│Interface Stability │External │
└─────────────────────────────┴─────────────────────────────┘
SEE ALSOsnmpd.conf(4), attributes(5), sma_snmp(5)SunOS 5.10 16 Jan 2004 snmp_config(4)