OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / ucd-snmp / draft / man5 / snmp_config.5
1 .\"
2 .\" Japanese Version Copyright (c) 2002 Yuichi SATO
3 .\"         all rights reserved.
4 .\" Translated Fri Mar 22 01:02:40 JST 2002
5 .\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
6 .\"
7 .\"WORD:
8 .\"
9 .TH SNMP.CONF 5 "28 Aug 2001"
10 .ds )H U.C. Davis
11 .ds ]W V4.2.4
12 .UC 4
13 .\"O .SH NAME
14 .SH Ì¾Á°
15 .\"O snmp_config - describes how to configure the ucd-snmp applications.
16 snmp_config - ucd-snmp ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ÎÀßÄêË¡¤ÎÀâÌÀ
17 .\"O .SH DESCRIPTION
18 .SH ÀâÌÀ
19 .\"O The ucd-snmp package uses various configuration files to configure its 
20 .\"O applications.  This manual page merely describes the overall nature of 
21 .\"O them, so that the other manual pages don't have to.
22 ucd-snmp ¥Ñ¥Ã¥±¡¼¥¸¤Ï¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ÎÀßÄê¤Ë¤¤¤í¤¤¤í¤ÊÀßÄê¥Õ¥¡¥¤¥ë¤òÍѤ¤¤ë¡£
23 ¤³¤Î man ¥Ú¡¼¥¸¤Ï¡¢Â¾¤Î man ¥Ú¡¼¥¸¤ÇÀâÌÀ¤¹¤ëɬÍפΤʤ¤¡¢
24 ÀßÄê¥Õ¥¡¥¤¥ë¤ÎÁ´ÂÎŪ¤ÊÆÃħ¤Î¤ß¤òÀâÌÀ¤·¤Æ¤¤¤ë¡£
25 .\"O .SH "DIRECTORIES SEARCHED"
26 .SH ¸¡º÷¤µ¤ì¤ë¥Ç¥£¥ì¥¯¥È¥ê
27 .\"O First off, there are numerous places that configuration files can be
28 .\"O found and read from.  By default, the applications look for
29 .\"O configuration files in the following 3 directories, in order:
30 .\"O /usr/share/snmp, /usr/lib/snmp, and $HOME/.snmp.  
31 ¤Þ¤ºÂè°ì¤Ë¡¢¤¤¤í¤¤¤í¤Ê¾ì½ê¤ËÀßÄê¥Õ¥¡¥¤¥ë¤òÃÖ¤¤¤Æ
32 Æɤ߹þ¤Þ¤»¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
33 ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï
34 /usr/share/snmp, /usr/lib/snmp, $HOME/.snmp
35 ¤È¤¤¤¦½çÈÖ¤ÇÀßÄê¥Õ¥¡¥¤¥ë¤òõ¤¹¡£
36 .\"O In each of these
37 .\"O directories, it looks for files with the extension of both .conf
38 .\"O and .local.conf (reading the second on last).  In this manner, there are 6 
39 .\"O default places a configuration file can exist for any given
40 .\"O configuration file type.
41 ¤³¤ì¤é¤Î¥Ç¥£¥ì¥¯¥È¥ê°Ê²¼¤Ë¤¢¤ë
42 \&.conf ¤È .local.conf ¤È¤¤¤¦³ÈÄ¥»Ò¤Î¥Õ¥¡¥¤¥ë¤òõ¤¹
43 (2 ÈÖÌܤγÈÄ¥»Ò¤Î¥Ç¥£¥ì¥¯¥È¥ê¤òºÇ¸å¤ËÆɤ߹þ¤à)¡£
44 ¤³¤Î¤è¤¦¤ÊÊýË¡¤Ç¡¢¤³¤ì¤é¤ÎÀßÄê¥Õ¥¡¥¤¥ë¤Î¥¿¥¤¥×¤Ë¤Ä¤¤¤Æ¡¢
45 ÀßÄê¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤Ç¤­¤ë 6 ¤Ä¤Î¥Ç¥Õ¥©¥ë¥È¤Î¾ì½ê¤¬¤¢¤ë¡£
46 .PP
47 .\"O Additionally, the above default search path can be overridden by
48 .\"O setting the environment variable SNMPCONFPATH to a ':' separated
49 .\"O list of directories to search for.
50 ¤µ¤é¤Ë¾åµ­¤Î¥Ç¥Õ¥©¥ë¥È¤Î¸¡º÷¥Ñ¥¹¤Ï¡¢
51 ´Ä¶­ÊÑ¿ô SNMPCONFPATH ¤òÀßÄꤷ¤ÆÊѹ¹¤Ç¤­¤ë¡£
52 SNMPCONFPATH ¤Ë¤Ï¡¢¸¡º÷¤¹¤ë¥Ç¥£¥ì¥¯¥È¥ê¤ò ':' ¤Ç¶èÀڤ俥ꥹ¥È¤Ç»ØÄꤹ¤ë¡£
53 .PP
54 .\"O Finally, applications that store persistent data will also look in the 
55 .\"O /var/snmp directory for configuration files there.
56 ¤½¤·¤Æ±Ê³Ū¤Ê¥Ç¡¼¥¿¤ò³ÊǼ¤¹¤ë¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¡¢
57 ÀßÄê¥Õ¥¡¥¤¥ë¤ò /var/snmp ¤Ç¤â¸¡º÷¤¹¤ë¡£
58 .\"O .SH "CONFIGURATION FILE TYPES"
59 .SH ÀßÄê¥Õ¥¡¥¤¥ë¤Î¥¿¥¤¥×
60 .\"O Each application may use multiple configuration files, which will
61 .\"O configure various different aspects of the application.  For instance, 
62 .\"O the SNMP agent (snmpd) knows how to understand configuration
63 .\"O directives in both the snmpd.conf and the snmp.conf files.  
64 ³Æ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ÏÊ£¿ô¤ÎÀßÄê¥Õ¥¡¥¤¥ë¤ò»È¤¦¤³¤È¤¬¤Ç¤­¤ë¡£
65 ¤³¤ì¤éÀßÄê¥Õ¥¡¥¤¥ë¤Ç¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î¤¤¤í¤¤¤í¤ÊÀßÄê¤ò¹Ô¤¦¡£
66 Î㤨¤Ð¡¢SNMP ¥¨¡¼¥¸¥§¥ó¥È (snmpd) ¤Ï
67 snmpd.conf ¥Õ¥¡¥¤¥ë¤È snmp.conf ¥Õ¥¡¥¤¥ë¤ÎξÊý¤Ë¤¢¤ë
68 ÀßÄê¥Ç¥£¥ì¥¯¥Æ¥£¥Ö¤ÎÆâÍƤò²ò¼á¤Ç¤­¤ë¡£
69 .\"O In fact,
70 .\"O most applications understand how to read the contents of the snmp.conf 
71 .\"O files.  Note, however, that configuration directives understood in one 
72 .\"O file may not be understood in another file.  
73 ¼ÂºÝ¡¢ÂçÉôʬ¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬ snmp.conf ¥Õ¥¡¥¤¥ë¤ÎÆâÍƤò²ò¼á¤Ç¤­¤ë¡£
74 ¤¿¤À¤·¡¢¤¢¤ëÀßÄê¥Ç¥£¥ì¥¯¥Æ¥£¥Ö¤¬Ê£¿ô¤Î¥Õ¥¡¥¤¥ë¤Ë¸ºß¤·¤¿¤È¤­¤Ë¡¢
75 ºÇ½é¤ËÆɤޤ줿ÀßÄê¥Õ¥¡¥¤¥ë¤Ç¤Î»ØÄê¤À¤±¤¬Í­¸ú¤È¤Ê¤ê¡¢
76 ¤½¤ì°Ê¹ß¤ËÆɤޤ줿ÀßÄê¥Õ¥¡¥¤¥ë¤Ç¤Î»ØÄê¤Ï̵¸ú¤Ë¤Ê¤ëÅÀ¤ËÃí°Õ¤¹¤ë¤³¤È¡£
77 .\"O For further information,
78 .\"O read the associated manual page with each configuration file type.
79 .\"O Also, most of the applications support a '-H' switch on the command
80 .\"O line that will list the configuration files it will look for and the
81 .\"O directives in each one that it understands.
82 ¤è¤ê¾Ü¤·¤¤¾ðÊó¤òÆÀ¤ë¤¿¤á¤Ë¤Ï¡¢
83 ³ÆÀßÄê¥Õ¥¡¥¤¥ë¥¿¥¤¥×¤Ë¤Ä¤¤¤Æ¤Î´ØÏ¢¥Ú¡¼¥¸¤òÆɤळ¤È¡£
84 ÂçÉôʬ¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¥³¥Þ¥ó¥É¥é¥¤¥ó¤Ç
85 \&'-H' ¥¹¥¤¥Ã¥Á¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤ª¤ê¡¢
86 ³Æ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬»²¾È¤¹¤ëÀßÄê¥Õ¥¡¥¤¥ë¤È
87 »ÈÍѲÄǽ¤Ê¥Ç¥£¥ì¥¯¥Æ¥£¥Ö¤ò¥ê¥¹¥Èɽ¼¨¤¹¤ë¡£
88 .PP
89 .\"O The snmp.conf configuration file is intended to be a application suite 
90 .\"O wide configuration file that supports directives that are useful for
91 .\"O controlling the fundamental nature of all of the snmp applications,
92 .\"O such as how they all manipulate and parse the textual SNMP mib files.
93 snmp.conf ¤Ï¥¢¥×¥ê¥±¡¼¥·¥ç¥ó·²Á´ÂΤËÂФ¹¤ë
94 ÀßÄê¥Õ¥¡¥¤¥ë¤È¤·¤ÆÁÛÄꤵ¤ì¤Æ¤¤¤Æ¡¢
95 Á´¤Æ¤Î snmp ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î´ðËÜŪ¤ÊÆÃÀ­¤òÀ©¸æ¤¹¤ë¤¿¤á¤Î
96 ¥Ç¥£¥ì¥¯¥Æ¥£¥Ö¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤ë¡£
97 ´ðËÜŪ¤ÊÆÃÀ­¤È¤Ï¥Æ¥­¥¹¥È·Á¼°¤Î SNMP mib ¥Õ¥¡¥¤¥ë¤Î
98 ÁàºîË¡¤ä²òÀÏÊýË¡¤Î¤³¤È¤Ç¤¢¤ë¡£
99 .\"O .SH "SWITCHING CONFIGURATION TYPES IN MID-FILE"
100 .SH "MID ¥Õ¥¡¥¤¥ë¤Ë¤ª¤±¤ëÀßÄ꥿¥¤¥×¤ÎÊѹ¹"
101 .\"O It's possible to switch in mid-file the configuration type that the
102 .\"O parser is supposed to be reading.  Since that sentence doesn't make
103 .\"O much sense, lets give you an example: say that you wanted to turn on
104 .\"O packet dumping output for the agent by default, but you didn't want to
105 .\"O do that for the rest of the applications (ie, snmpget, snmpwalk, ...).
106 .\"O Normally to enable packet dumping in the configuration file
107 .\"O you'd need to put a line like:
108 ¥Ñ¡¼¥µ¡¼¤¬Æɤ߹þ¤àÀßÄ꥿¥¤¥×¤Ï mib ¥Õ¥¡¥¤¥ë¤ÎÃæ¤ÇÀÚ¤êÂؤ¨¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
109 ¤³¤Î¤è¤¦¤Ë¸À¤ï¤ì¤Æ¤â°ÕÌ£¤¬¤ï¤«¤é¤Ê¤¤¤Î¤Ç¡¢Îã¤ò¼¨¤¹¡£
110 .\"sato: Since that sentence ... ¤ÎÌõ¤·Êý¤Ï¡¢¤³¤ì¤Ç¤¤¤¤¤Î¤«¡©
111 Î㤨¤Ð¡¢¥Ç¥Õ¥©¥ë¥È¤Ç¥¨¡¼¥¸¥§¥ó¥È¤Î¥Ñ¥±¥Ã¥È¥À¥ó¥×½ÐÎϤòÍ­¸ú¤Ë¤·¤¿¤¤¤¬¡¢
112 (snmpget, snmpwalk, ... ¤È¤¤¤Ã¤¿) Â¾¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç¤Ï
113 Í­¸ú¤Ë¤·¤¿¤¯¤Ê¤¤¤È¤¤¤Ã¤¿¾ì¹ç¤Ç¤¢¤ë¡£
114 Ä̾ÀßÄê¥Õ¥¡¥¤¥ë¤Ç¥Ñ¥±¥Ã¥È¥À¥ó¥×¤òÍ­¸ú¤Ë¤¹¤ë¤Ë¤Ï¡¢
115 .PP
116 .RS
117 dumpPacket true
118 .RE
119 .PP
120 .\"O into the snmp.conf file.  
121 ¤È¤¤¤¦¹Ô¤ò snmp.conf ¥Õ¥¡¥¤¥ë¤Ë½ñ¤¯É¬Íפ¬¤¢¤ë¡£
122 .\"O But, this would turn it on for all of the
123 .\"O applications.  So, instead, you can put the same line in the
124 .\"O snmpd.conf file so that it only applies to the snmpd demon.  However,
125 .\"O you need to tell the parser to expect this line.  You do this by
126 .\"O putting a special type specification token inside a [] set.  In other
127 .\"O words, inside your snmpd.conf file you could put the above snmp.conf
128 .\"O directive by adding a line like so:
129 ¤·¤«¤·¤³¤ì¤Ç¤Ï¡¢Á´¤Æ¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç¥À¥ó¥×¤¬Í­¸ú¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¦¡£
130 ¤½¤³¤ÇÂå¤ï¤ê¤ËƱ¤¸¹Ô¤ò snmpd.conf ¥Õ¥¡¥¤¥ë¤Ë½ñ¤±¤Ð¡¢
131 snmpd ¥Ç¡¼¥â¥ó¤Ë¤Î¤ßŬÍѤµ¤ì¤ë¡£
132 ¤¿¤À¤·¡¢¥Ñ¡¼¥µ¡¼¤Ë¤³¤Î¹Ô¤òÂÔ¤Á¼õ¤±¤ë¤è¤¦¤Ë»Ø¼¨¤¹¤ëɬÍפ¬¤¢¤ê¡¢
133 Æü쥿¥¤¥×¤Î»ØÄê¥È¡¼¥¯¥ó¤ò [] ¥»¥Ã¥È¤ÎÃæ¤Ë½ñ¤­¹þ¤Þ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
134 ¸À¤¤´¹¤¨¤ì¤Ð¡¢snmpd.conf ¥Õ¥¡¥¤¥ë¤Ë°Ê²¼¤Î¹Ô¤òÄɲ乤뤳¤È¤Ç¡¢
135 ¾åµ­¤Î snmp.conf ¥Ç¥£¥ì¥¯¥Æ¥£¥Ö¤ò½ñ¤­¹þ¤á¤ë¤È¤¤¤¦¤³¤È¤Ç¤¢¤ë¡£
136 .PP
137 .RS
138 [snmp] dumpPacket true
139 .RE
140 .PP
141 .\"O This tells the parser to parse the above line as if it were inside a
142 .\"O snmp.conf file instead of an snmpd.conf file.  If you want to parse a
143 .\"O bunch of lines rather than just one then you can make the context
144 .\"O switch apply to the remainder of the file or until the next context
145 .\"O switch directive by putting the special token on a line by itself:
146 ¤³¤Î¹Ô¤Ë¤è¤ê¡¢¾å¤Î¹Ô¤¬ snmpd.conf ¥Õ¥¡¥¤¥ë¤Ç¤Ï¤Ê¤¯
147 snmp.conf ¥Õ¥¡¥¤¥ë¤Ë¤¢¤ë¾ì¹ç¤ÈƱÍͤ˥ѡ¼¥µ¡¼¤Ë²òÀϤµ¤»¤ë¡£
148 .\"sato: ¤³¤ÎÌõ¤ÏÀµ¤·¤¤¤«¼«¿®Ìµ¤·
149 1 ¹Ô¤À¤±¤Ç¤Ê¤¯Ê£¿ô¤Î¹Ô¤ò¥Ñ¡¼¥¹¤µ¤»¤¿¤¤¾ì¹ç¤Ë¤Ï¡¢
150 Æüì¥È¡¼¥¯¥ó¤Î¤ß¤Î¹Ô¤òÃÖ¤¯¤³¤È¤Ë¤è¤ê¡¢
151 ¥³¥ó¥Æ¥­¥¹¥È¥¹¥¤¥Ã¥Á¤ò¥Õ¥¡¥¤¥ë¤Î»Ä¤ê¤ÎÉôʬ¤Þ¤¿¤Ï
152 ¼¡¤Î¥³¥ó¥Æ¥­¥¹¥È¥¹¥¤¥Ã¥Á¥Ç¥£¥ì¥¯¥Æ¥£¥Ö¤¬¸½¤ì¤ë¤Þ¤ÇŬÍѤ¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
153 .PP
154 .RS
155 .nf
156 .\"O # make this file handle snmp.conf tokens:
157 # ¤³¤Î¥Õ¥¡¥¤¥ë¤ò snmp.conf ¥È¡¼¥¯¥ó¤È¤·¤Æ½èÍý¤µ¤»¤ë:
158 [snmp]
159 dumpPacket true
160 logTimestamp true
161 .\"O # return to our original snmpd.conf tokens:
162 # ¸µ¤Î snmpd.conf ¥È¡¼¥¯¥ó¤ËÌá¤ë:
163 [snmpd]
164 rocommunity mypublic
165 .RE
166 .\"O .SH COMMENTS
167 .SH ¥³¥á¥ó¥È
168 .PP
169 .\"O Any lines beginning with the character '#' in the configuration files
170 .\"O are treated as a comment and are not parsed.
171 ʸ»ú '#' ¤Ç»Ï¤Þ¤ëÀßÄê¥Õ¥¡¥¤¥ë¤Î¹Ô¤Ï¡¢
172 ¥³¥á¥ó¥È¤È¤·¤Æ°·¤ï¤ì¡¢¥Ñ¡¼¥¹¤µ¤ì¤Ê¤¤¡£
173 .\"O .SH "API INTERFACE"
174 .SH "API ¥¤¥ó¥¿¥Õ¥§¡¼¥¹"
175 .PP
176 .\"O Information about writing C code that makes use of this system in
177 .\"O either the agent's mib modules or in applications can be found in the
178 .\"O read_config(3) manual page.
179 ¥¨¡¼¥¸¥§¥ó¥È¤Î mib ¥â¥¸¥å¡¼¥ë¤ä¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç
180 ¤³¤Î¥·¥¹¥Æ¥à¤òÍøÍѤ¹¤ë¤¿¤á¤Î C ¸À¸ì¤Î¥³¡¼¥É¤ò½ñ¤¯¤¿¤á¤Î¾ðÊó¤Ï¡¢
181 read_config(3) ¤Î man ¥Ú¡¼¥¸¤Ë¤¢¤ë¡£
182 .\"O .SH "SEE ALSO"
183 .SH ´ØÏ¢¹àÌÜ
184 read_config(3).
185 .\" Local Variables:
186 .\"  mode: nroff
187 .\" End: