aboutsummaryrefslogblamecommitdiffstats
path: root/lib/snmp/doc/src/snmp_manager_config_files.xml
blob: c2ef3cd2c7d5070fb0007f13d7d65c58e77c4b09 (plain) (tree)
























































































































































































































































                                                                                                                                  
<?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">

<chapter>
  <header>
    <copyright>
      <year>2004</year><year>2009</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>Definition of Manager Configuration Files</title>
    <prepared></prepared>
    <responsible></responsible>
    <docno></docno>
    <approved></approved>
    <checked></checked>
    <date></date>
    <rev></rev>
    <file>snmp_manager_config_files.xml</file>
  </header>
  <p>Configuration data may be included in configuration files
    that is located in the configuration directory. The name of this
    directory is given in the <c>config_dir</c> configuration
    parameter. These files are read at start-up.
    </p>
  <p>The directory where the configuration files are found is given as
    a parameter to the manager.
    </p>
  <p>The entry format in all files are Erlang terms, separated by a
    '<em>.</em>' and a <em>newline</em>. In the following sections, the
    formats of these terms are described. Comments may be specified as
    ordinary Erlang comments.
    </p>
  <p>If syntax errors are discovered in these files they are reported with the
    function <c>config_err/2</c> of the 
    <seealso marker="snmpa_error_report">error report module</seealso>  
    at start-up.
    </p>

  <section>
    <marker id="manager"></marker>
    <marker id="manager_information"></marker>
    <title>Manager Information</title>
    <p>The manager information should be stored in a file called
      <c>manager.conf</c>.
      </p>
    <p>Each entry is a tuple of size two:
      </p>
    <p><c>{Variable, Value}.</c></p>
    <list type="bulleted">
      <item>
        <p><c>Variable</c> is one of the following:</p>
        <list type="bulleted">
          <item>
            <p><c>address</c> - which defines the IP address of the 
              manager. Default is local host.</p>
          </item>
          <item>
            <p><c>port</c> - which defines which UDP port the manager uses
              for communicating with agents. <em>Mandatory</em>.</p>
          </item>
          <item>
            <p><c>engine_id</c> - The <c>SnmpEngineID</c> as defined in 
              SNMP-FRAMEWORK-MIB. <em>Mandatory</em>.</p>
          </item>
          <item>
            <p><c>max_message_size</c> - The <c>snmpEngineMaxMessageSize</c> as
              defined in SNMP-FRAMEWORK-MIB. <em>Mandatory</em>.</p>
          </item>
        </list>
      </item>
      <item>
        <p><c>Value</c> is the value for the variable.
          </p>
      </item>
    </list>
    <p>The following example shows a <c>manager.conf</c> file: 
      </p>
    <pre>
{address,          [141,213,11,24]}.
{port,             5000}.
{engine_id,        "mgrEngine"}.
{max_message_size, 484}.
    </pre>
    <p>The value of <c>engine_id</c> is a string, which should have a 
      very specific structure. See RFC 2271/2571 for details.
      </p>
  </section>

  <section>
    <marker id="users"></marker>
    <title>Users</title>
    <p>For each <em>manager user</em>, the manager needs some information.
      This information is either added in the <c>users.conf</c> config 
      file or by calling the 
      <seealso marker="snmpm#register_user">register_user</seealso> 
      function in run-time.
      </p>
    <p>Each row defines a <em>manager user</em> of the manager. 
      </p>
    <p>Each entry is a tuple of size four:
      </p>
    <!-- <p><c>{UserId, UserMod, UserData}.</c></p> -->
    <p><c>{UserId, UserMod, UserData, DefaultAgentConfig}.</c></p>
    <list type="bulleted">
      <item>
        <p><c>UserId</c> is any term (used to uniquely identify the user).</p>
      </item>
      <item>
        <p><c>UserMod</c> is the user callback module (atom).</p>
      </item>
      <item>
        <p><c>UserData</c> is any term (passed on to the user when calling the
          <c>UserMod</c>.
          </p>
      </item>
      <item>
        <p><c>DefaultAgentConfig</c> is a list of default agent config's. 
          These values are used as default values when this user registers 
          agents.
          </p>
      </item>
    </list>
  </section>

  <section>
    <marker id="agents"></marker>
    <title>Agents</title>
    <p>The information needed to handle agents should be stored in a 
      file called <c>agents.conf</c>. It is also possible to add agents
      in run-time by calling the 
      <seealso marker="snmpm#register_agent">register_agent</seealso>.
      </p>
    <p>Each entry is a tuple:
      </p>
    <p><c>{UserId,  TargetName, Comm, Ip, Port, EngineID, Timeout,  MaxMessageSize, Version, SecModel, SecName, SecLevel}.</c></p>
    <list type="bulleted">
      <item>
        <p><c>UserId</c> is the identity of the <em>manager user</em>
          responsible for this agent (term).
          </p>
      </item>
      <item>
        <p><c>TargetName</c> is a <em>unique</em> <em>non-empty</em> string.</p>
      </item>
      <item>
        <p><c>Comm</c> is the community string (string).</p>
      </item>
      <item>
        <p><c>Ip</c> is the ip address of the agent (a list of four integers).</p>
      </item>
      <item>
        <p><c>Port</c> is the port number of the agent (integer).</p>
      </item>
      <item>
        <p><c>EngineID</c> is the engine-id of the agent (string).</p>
      </item>
      <item>
        <p><c>Timeout</c> is re-transmission timeout 
          (<c>infinity</c> | integer).</p>
      </item>
      <item>
        <p><c>MaxMessageSize</c> is the max message size for outgoing messages 
          to this agent (integer).</p>
      </item>
      <item>
        <p><c>Version</c> is the version (v1 | v2 | v3).</p>
      </item>
      <item>
        <p><c>SecModel</c> is the security model (any | v1 | v2c | usm).</p>
      </item>
      <item>
        <p><c>SecName</c> is the security name (string).</p>
      </item>
      <item>
        <p><c>SecLevel</c> is security level (noAuthNoPriv | authNoPriv | 
          authPriv).</p>
      </item>
    </list>
  </section>

  <section>
    <marker id="usm"></marker>
    <marker id="usm_user"></marker>
    <title>Security data for USM</title>
    <p>The information about Security data for USM should be stored in a 
      file called <c>usm.conf</c>, which must be present if the manager
      wishes to use SNMPv3 when communicating with agents. It is also 
      possible to add usm data in run-time by calling the 
      <seealso marker="snmpm#register_usm_user">register_usm_user</seealso>.
      </p>
    <p>The corresponding table is <c>usmUserTable</c> in the
      SNMP-USER-BASED-SM-MIB.
      </p>
    <p>Each entry is a term:
      </p>
    <p><c>{EngineID, UserName, AuthP, AuthKey, PrivP, PrivKey}.</c>      <br></br>
<c>{EngineID, UserName, SecName, AuthP, AuthKey, PrivP, PrivKey}.</c></p>
    <p>The first case is when we have the identity-function 
      (<c>SecName</c> = <c>UserName</c>).
      </p>
    <list type="bulleted">
      <item>
        <p><c>EngineID</c> is a string.</p>
      </item>
      <item>
        <p><c>UserName</c> is a string.</p>
      </item>
      <item>
        <p><c>SecName</c> is a string.</p>
      </item>
      <item>
        <p><c>AuthP</c> is a <c>usmNoAuthProtocol</c>,
          <c>usmHMACMD5AuthProtocol</c> or <c>usmHMACSHAAuthProtocol</c>.</p>
      </item>
      <item>
        <p><c>AuthKey</c> is a list (of integer). This is the User's 
          secret localized authentication key. It is not visible in the MIB. 
          The length of this key needs to be 16 if 
          <c>usmHMACMD5AuthProtocol</c> is used and 20 if 
          <c>usmHMACSHAAuthProtocol</c> is used.</p>
      </item>
      <item>
        <p><c>PrivP</c> is a <c>usmNoPrivProtocol</c>, 
          <c>usmDESPrivProtocol</c> or <c>usmAesCfb128Protocol</c>.</p>
      </item>
      <item>
        <p><c>PrivKey</c> is a list (of integer). This is the User's secret
          localized encryption key.  It is not visible in the MIB. The length
          of this key needs to be 16 if <c>usmDESPrivProtocol</c> 
          or <c>usmAesCfb128Protocol</c> is used.</p>
      </item>
    </list>
  </section>
</chapter>