aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/doc/src/snmp_target_mib.xml
blob: be6fa15c73f7841c81a25ac76b4d12d51e9afa0d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<erlref>
  <header>
    <copyright>
      <year>1998</year><year>2013</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      The contents of this file are subject to the Erlang Public License,
      Version 1.1, (the "License"); you may not use this file except in
      compliance with the License. You should have received a copy of the
      Erlang Public License along with this software. If not, it can be
      retrieved online at http://www.erlang.org/.
    
      Software distributed under the License is distributed on an "AS IS"
      basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
      the License for the specific language governing rights and limitations
      under the License.
    
    </legalnotice>

    <title>snmp_target_mib</title>
    <prepared></prepared>
    <responsible></responsible>
    <docno></docno>
    <approved></approved>
    <checked></checked>
    <date></date>
    <rev></rev>
    <file>snmp_target_mib.xml</file>
  </header>
  <module>snmp_target_mib</module>
  <modulesummary>Instrumentation Functions for SNMP-TARGET-MIB</modulesummary>
  <description>
    <p>The module <c>snmp_target_mib</c> implements the instrumentation
      functions for the SNMP-TARGET-MIB, 
      and functions for configuring the database. </p>
    <p>The configuration files are described in the SNMP User's Manual.</p>

    <marker id="types"></marker>
  </description>

  <section>
    <title>DATA TYPES</title>
    <code type="none"><![CDATA[
transportDomain() = transportDomainUdpIpv4 | transportDomainUdpIpv6
transportAddressIPv4() = [integer()], length 4
transportAddressIPv6() = [integer()], length 8
transportAddressMask() = [integer()], length 0 (default), 6 (IPv4) or 10 (IPv6)
    ]]></code>

    <marker id="configure"></marker>
  </section>

  <funcs>
    <func>
      <name>configure(ConfDir) -> void()</name>
      <fsummary>Configure the SNMP-TARGET-MIB</fsummary>
      <type>
        <v>ConfDir = string()</v>
      </type>
      <desc>
        <p>This function is called from the supervisor at system
          start-up.
          </p>
        <p>Inserts all data in the configuration files into the
          database and destroys all old rows with StorageType
          <c>volatile</c>.  The rows created from the configuration file
          will have StorageType <c>nonVolatile</c>. </p>
        <p>All <c>snmp</c> counters are set to zero. </p>
        <p>If an error is found in the configuration file, it is
          reported using the function <c>config_err/2</c> of the error
          report module, and the function fails with the reason 
          <c>configuration_error</c>. </p>
        <p><c>ConfDir</c> is a string which points to the directory
          where the configuration files are found. </p>
        <p>The configuration files read are: <c>target_addr.conf</c>
          and <c>target_params.conf</c>. </p>

	<marker id="reconfigure"></marker>
      </desc>
    </func>

    <func>
      <name>reconfigure(ConfDir) -> void()</name>
      <fsummary>Configure the SNMP-TARGET-MIB</fsummary>
      <type>
        <v>ConfDir = string()</v>
      </type>
      <desc>
        <p>Inserts all data in the configuration files into the
          database and destroys all old data, including the rows with
          StorageType <c>nonVolatile</c>.  The rows created from the
          configuration file will have StorageType <c>nonVolatile</c>. </p>
        <p>Thus, the data in the SNMP-TARGET-MIB, after this
          function has been called, is the data from the configuration
          files. </p>
        <p>All <c>snmp</c> counters are set to zero.</p>
        <p>If an error is found in the configuration file, it is
          reported using the function <c>config_err/2</c> of the ,
          and the function fails with the reason 
          <c>configuration_error</c>.</p>
        <p><c>ConfDir</c> is a string which points to the directory
          where the configuration files are found. </p>
        <p>The configuration files read are: <c>target_addr.conf</c>
          and <c>target_params.conf</c>. </p>

	<marker id="set_target_engine_id"></marker>
      </desc>
    </func>

    <func>
      <name>set_target_engine_id(TargetAddrName, EngineId) -> boolean()</name>
      <fsummary>Set the engine id for a targetAddr row.</fsummary>
      <type>
        <v>TargetAddrName = string()</v>
        <v>EngineId = string()</v>
      </type>
      <desc>
        <p>Changes the engine id for a target in the 
          <c>snmpTargetAddrTable</c>.
          If notifications are sent as Inform requests to a target, its
          engine id must be set. </p>

	<marker id="add_addr"></marker>
      </desc>
    </func>

    <func>
      <name>add_addr(Name, Ip, Port, Timeout, Retry, TagList, Params, EngineId, TMask, MMS) -> Ret</name>
      <name>add_addr(Name, Domain, Ip, Port, Timeout, Retry, TagList, Params, EngineId, TMask, MMS) -> Ret</name>
      <fsummary>Add one target address definition</fsummary>
      <type>
        <v>Name = string()</v>
        <v>Domain = transportDomain()</v>
        <v>Ip = transportAddressIPv4() | transportAddressIPv6() (depends on the value of Domain)</v>
        <v>Port = integer()</v>
        <v>Timeout = integer()</v>
        <v>Retry = integer()</v>
        <v>TagList = string()</v>
        <v>ParamsName = string()</v>
        <v>EngineId = string()</v>
        <v>TMask = transportAddressMask() (depends on Domain)</v>
        <v>MMS = integer()</v>
        <v>Ret = {ok, Key} | {error, Reason}</v>
        <v>Key = term()</v>
        <v>Reason = term()</v>
      </type>
      <desc>
        <p>Adds a target address definition to the agent config. 
          Equivalent to one line in the <c>target_addr.conf</c> file.</p>

        <marker id="delete_addr"></marker>
      </desc>
    </func>

    <func>
      <name>delete_addr(Key) -> Ret</name>
      <fsummary>Delete one target address definition</fsummary>
      <type>
        <v>Key = term()</v>
        <v>Ret = ok | {error, Reason}</v>
        <v>Reason = term()</v>
      </type>
      <desc>
        <p>Delete a target address definition from the agent config.</p>

        <marker id="add_params"></marker>
      </desc>
    </func>

    <func>
      <name>add_params(Name, MPModel, SecModel, SecName, SecLevel) -> Ret</name>
      <fsummary>Add one target parameter definition</fsummary>
      <type>
        <v>Name = string()</v>
        <v>MPModel = v1 | v2c | v3</v>
        <v>SecModel = v1 | v2c | usm</v>
        <v>SecName = string()</v>
        <v>SecLevel = noAuthNoPriv | authNoPriv | authPriv</v>
        <v>Ret = {ok, Key} | {error, Reason}</v>
        <v>Key = term()</v>
        <v>Reason = term()</v>
      </type>
      <desc>
        <p>Adds a target parameter definition to the agent config. 
          Equivalent to one line in the <c>target_params.conf</c> file.</p>

        <marker id="delete_params"></marker>
      </desc>
    </func>
    <func>
      <name>delete_params(Key) -> Ret</name>
      <fsummary>Delete one target parameter definition</fsummary>
      <type>
        <v>Key = term()</v>
        <v>Ret = ok | {error, Reason}</v>
        <v>Reason = term()</v>
      </type>
      <desc>
        <p>Delete a target parameter definition from the agent config.</p>
      </desc>
    </func>
  </funcs>
  
</erlref>