Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > 675c8c8167236dfcf8d66da674f931e8 > files > 1311

erlang-doc-R15B-03.3.fc17.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns:fn="http://www.w3.org/2005/02/xpath-functions">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../doc/otp_doc.css" type="text/css">
<title>Erlang -- Definition of Manager Configuration Files</title>
</head>
<body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000"><div id="container">
<script id="js" type="text/javascript" language="JavaScript" src="../../../../doc/js/flipmenu/flipmenu.js"></script><script id="js2" type="text/javascript" src="../../../../doc/js/erlresolvelinks.js"></script><script language="JavaScript" type="text/javascript">
            <!--
              function getWinHeight() {
                var myHeight = 0;
                if( typeof( window.innerHeight ) == 'number' ) {
                  //Non-IE
                  myHeight = window.innerHeight;
                } else if( document.documentElement && ( document.documentElement.clientWidth ||
                                                         document.documentElement.clientHeight ) ) {
                  //IE 6+ in 'standards compliant mode'
                  myHeight = document.documentElement.clientHeight;
                } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
                  //IE 4 compatible
                  myHeight = document.body.clientHeight;
                }
                return myHeight;
              }

              function setscrollpos() {
                var objf=document.getElementById('loadscrollpos');
                 document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2;
              }

              function addEvent(obj, evType, fn){
                if (obj.addEventListener){
                obj.addEventListener(evType, fn, true);
                return true;
              } else if (obj.attachEvent){
                var r = obj.attachEvent("on"+evType, fn);
                return r;
              } else {
                return false;
              }
             }

             addEvent(window, 'load', setscrollpos);

             //--></script><div id="leftnav"><div class="innertube">
<img alt="Erlang logo" src="../../../../doc/erlang-logo.png"><br><small><a href="users_guide.html">User's Guide</a><br><a href="index.html">Reference Manual</a><br><a href="release_notes.html">Release Notes</a><br><a href="../pdf/snmp-4.22.1.pdf">PDF</a><br><a href="../../../../doc/index.html">Top</a></small><p><strong>Simple Network Management Protocol (SNMP)</strong><br><strong>User's Guide</strong><br><small>Version 4.22.1</small></p>
<br><a href="javascript:openAllFlips()">Expand All</a><br><a href="javascript:closeAllFlips()">Contract All</a><p><small><strong>Chapters</strong></small></p>
<ul class="flipMenu" imagepath="../../../../doc/js/flipmenu">
<li id="no" title="SNMP Introduction" expanded="false">SNMP Introduction<ul>
<li><a href="snmp_intro.html">
              Top of chapter
            </a></li>
<li title="Scope and Purpose"><a href="snmp_intro.html#id73205">Scope and Purpose</a></li>
<li title="Prerequisites"><a href="snmp_intro.html#id63280">Prerequisites</a></li>
<li title="Definitions"><a href="snmp_intro.html#id61217">Definitions</a></li>
<li title="About This Manual"><a href="snmp_intro.html#id66265">About This Manual</a></li>
<li title="Where to Find More Information"><a href="snmp_intro.html#id65242">Where to Find More Information</a></li>
</ul>
</li>
<li id="no" title="Agent Functional Description" expanded="false">Agent Functional Description<ul>
<li><a href="snmp_agent_funct_descr.html">
              Top of chapter
            </a></li>
<li title="Features"><a href="snmp_agent_funct_descr.html#id70043">Features</a></li>
<li title="SNMPv1, SNMPv2 and SNMPv3"><a href="snmp_agent_funct_descr.html#id69677">SNMPv1, SNMPv2 and SNMPv3</a></li>
<li title="Operation"><a href="snmp_agent_funct_descr.html#id71220">Operation</a></li>
<li title="Sub-agents and MIB Loading"><a href="snmp_agent_funct_descr.html#id75292">Sub-agents and MIB Loading</a></li>
<li title="Contexts and Communities"><a href="snmp_agent_funct_descr.html#id74241">Contexts and Communities</a></li>
<li title="Management of the Agent"><a href="snmp_agent_funct_descr.html#id74376">Management of the Agent</a></li>
<li title="Notifications"><a href="snmp_agent_funct_descr.html#id73838">Notifications</a></li>
<li title="Discovery"><a href="snmp_agent_funct_descr.html#id75718">Discovery</a></li>
</ul>
</li>
<li id="no" title="Manager Functional Description" expanded="false">Manager Functional Description<ul>
<li><a href="snmp_manager_funct_descr.html">
              Top of chapter
            </a></li>
<li title="Features"><a href="snmp_manager_funct_descr.html#id75862">Features</a></li>
<li title="Operation"><a href="snmp_manager_funct_descr.html#id76012">Operation</a></li>
<li title="MIB loading"><a href="snmp_manager_funct_descr.html#id76080">MIB loading</a></li>
</ul>
</li>
<li id="no" title="The MIB Compiler" expanded="false">The MIB Compiler<ul>
<li><a href="snmp_mib_compiler.html">
              Top of chapter
            </a></li>
<li title="Operation"><a href="snmp_mib_compiler.html#id76200">Operation</a></li>
<li title="Importing MIBs"><a href="snmp_mib_compiler.html#id76263">Importing MIBs</a></li>
<li title="MIB Consistency Checking"><a href="snmp_mib_compiler.html#id76334">MIB Consistency Checking</a></li>
<li title=".hrl File Generation"><a href="snmp_mib_compiler.html#id76371">.hrl File Generation</a></li>
<li title="Emacs Integration"><a href="snmp_mib_compiler.html#id76421">Emacs Integration</a></li>
<li title="Compiling from a Shell or a Makefile"><a href="snmp_mib_compiler.html#id76467">Compiling from a Shell or a Makefile</a></li>
<li title="Deviations from the Standard"><a href="snmp_mib_compiler.html#id76521">Deviations from the Standard</a></li>
</ul>
</li>
<li id="no" title="Running the application" expanded="false">Running the application<ul>
<li><a href="snmp_config.html">
              Top of chapter
            </a></li>
<li title="Configuring the application"><a href="snmp_config.html#id76778">Configuring the application</a></li>
<li title="Modifying the Configuration Files"><a href="snmp_config.html#id79236">Modifying the Configuration Files</a></li>
<li title="Starting the application"><a href="snmp_config.html#id79327">Starting the application</a></li>
<li title="Debugging the application"><a href="snmp_config.html#id79377">Debugging the application</a></li>
</ul>
</li>
<li id="no" title="Definition of Agent Configuration Files" expanded="false">Definition of Agent Configuration Files<ul>
<li><a href="snmp_agent_config_files.html">
              Top of chapter
            </a></li>
<li title="Agent Information"><a href="snmp_agent_config_files.html#id79867">Agent Information</a></li>
<li title="Contexts"><a href="snmp_agent_config_files.html#id79944">Contexts</a></li>
<li title="System Information"><a href="snmp_agent_config_files.html#id79997">System Information</a></li>
<li title="Communities"><a href="snmp_agent_config_files.html#id80066">Communities</a></li>
<li title="MIB Views for VACM"><a href="snmp_agent_config_files.html#id80148">MIB Views for VACM</a></li>
<li title="Security data for USM"><a href="snmp_agent_config_files.html#id80387">Security data for USM</a></li>
<li title="Notify Definitions"><a href="snmp_agent_config_files.html#id80603">Notify Definitions</a></li>
<li title="Target Address Definitions"><a href="snmp_agent_config_files.html#id80684">Target Address Definitions</a></li>
<li title="Target Parameters Definitions"><a href="snmp_agent_config_files.html#id80890">Target Parameters Definitions</a></li>
</ul>
</li>
<li id="loadscrollpos" title="Definition of Manager Configuration Files" expanded="true">Definition of Manager Configuration Files<ul>
<li><a href="snmp_manager_config_files.html">
              Top of chapter
            </a></li>
<li title="Manager Information"><a href="snmp_manager_config_files.html#id81118">Manager Information</a></li>
<li title="Users"><a href="snmp_manager_config_files.html#id81260">Users</a></li>
<li title="Agents"><a href="snmp_manager_config_files.html#id81361">Agents</a></li>
<li title="Security data for USM"><a href="snmp_manager_config_files.html#id81544">Security data for USM</a></li>
</ul>
</li>
<li id="no" title="Agent Implementation Example" expanded="false">Agent Implementation Example<ul>
<li><a href="snmp_impl_example_agent.html">
              Top of chapter
            </a></li>
<li title="MIB"><a href="snmp_impl_example_agent.html#id81793">MIB</a></li>
<li title="Default Implementation"><a href="snmp_impl_example_agent.html#id81833">Default Implementation</a></li>
<li title="Manual Implementation"><a href="snmp_impl_example_agent.html#id81912">Manual Implementation</a></li>
</ul>
</li>
<li id="no" title="Manager Implementation Example" expanded="false">Manager Implementation Example<ul>
<li><a href="snmp_impl_example_manager.html">
              Top of chapter
            </a></li>
<li title="The example manager"><a href="snmp_impl_example_manager.html#id82242">The example manager</a></li>
<li title="A simple standard test"><a href="snmp_impl_example_manager.html#id82333">A simple standard test</a></li>
</ul>
</li>
<li id="no" title="Instrumentation Functions" expanded="false">Instrumentation Functions<ul>
<li><a href="snmp_instr_functions.html">
              Top of chapter
            </a></li>
<li title="Instrumentation Functions"><a href="snmp_instr_functions.html#id82473">Instrumentation Functions</a></li>
<li title="Using the ExtraArgument"><a href="snmp_instr_functions.html#id83088">Using the ExtraArgument</a></li>
<li title="Default Instrumentation"><a href="snmp_instr_functions.html#id83196">Default Instrumentation</a></li>
<li title="Atomic Set"><a href="snmp_instr_functions.html#id83301">Atomic Set</a></li>
</ul>
</li>
<li id="no" title="Definition of Instrumentation Functions" expanded="false">Definition of Instrumentation Functions<ul>
<li><a href="snmp_def_instr_functions.html">
              Top of chapter
            </a></li>
<li title="Variable Instrumentation"><a href="snmp_def_instr_functions.html#id83474">Variable Instrumentation</a></li>
<li title="Table Instrumentation"><a href="snmp_def_instr_functions.html#id83849">Table Instrumentation</a></li>
</ul>
</li>
<li id="no" title="Definition of Agent Net if" expanded="false">Definition of Agent Net if<ul>
<li><a href="snmp_agent_netif.html">
              Top of chapter
            </a></li>
<li title="Mandatory Functions"><a href="snmp_agent_netif.html#id84750">Mandatory Functions</a></li>
<li title="Messages"><a href="snmp_agent_netif.html#id84772">Messages</a></li>
</ul>
</li>
<li id="no" title="Definition of Manager Net if" expanded="false">Definition of Manager Net if<ul>
<li><a href="snmp_manager_netif.html">
              Top of chapter
            </a></li>
<li title="Mandatory Functions"><a href="snmp_manager_netif.html#id85574">Mandatory Functions</a></li>
<li title="Messages"><a href="snmp_manager_netif.html#id85591">Messages</a></li>
</ul>
</li>
<li id="no" title="Audit Trail Log" expanded="false">Audit Trail Log<ul>
<li><a href="snmp_audit_trail_log.html">
              Top of chapter
            </a></li>
<li title="Agent Logging"><a href="snmp_audit_trail_log.html#id85997">Agent Logging</a></li>
<li title="Manager Logging"><a href="snmp_audit_trail_log.html#id86040">Manager Logging</a></li>
</ul>
</li>
<li id="no" title="Advanced Agent Topics" expanded="false">Advanced Agent Topics<ul>
<li><a href="snmp_advanced_agent.html">
              Top of chapter
            </a></li>
<li title="When to use a Sub-agent"><a href="snmp_advanced_agent.html#id86186">When to use a Sub-agent</a></li>
<li title="Agent Semantics"><a href="snmp_advanced_agent.html#id86296">Agent Semantics</a></li>
<li title="Sub-agents and Dependencies "><a href="snmp_advanced_agent.html#id86360">Sub-agents and Dependencies </a></li>
<li title="Distributed Tables"><a href="snmp_advanced_agent.html#id86378">Distributed Tables</a></li>
<li title="Fault Tolerance"><a href="snmp_advanced_agent.html#id86434">Fault Tolerance</a></li>
<li title="Using Mnesia Tables as SNMP Tables"><a href="snmp_advanced_agent.html#id86508">Using Mnesia Tables as SNMP Tables</a></li>
<li title="Deviations from the Standard"><a href="snmp_advanced_agent.html#id86786">Deviations from the Standard</a></li>
</ul>
</li>
<li id="no" title="SNMP Appendix A" expanded="false">SNMP Appendix A<ul>
<li><a href="snmp_app_a.html">
              Top of chapter
            </a></li>
<li title="Appendix A"><a href="snmp_app_a.html#id86932">Appendix A</a></li>
</ul>
</li>
<li id="no" title="SNMP Appendix B" expanded="false">SNMP Appendix B<ul>
<li><a href="snmp_app_b.html">
              Top of chapter
            </a></li>
<li title="Appendix B"><a href="snmp_app_b.html#id87320">Appendix B</a></li>
</ul>
</li>
</ul>
</div></div>
<div id="content">
<div class="innertube">
<h1>7 Definition of Manager Configuration Files</h1>
  
  <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 <span class="code">config_dir</span> 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
    '<strong>.</strong>' and a <strong>newline</strong>. 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 <span class="code">config_err/2</span> of the 
    <span class="bold_code"><a href="snmpa_error_report.html">error report module</a></span>  
    at start-up.
    </p>

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

  <h3><a name="id81260">7.2 
        Users</a></h3>
    <a name="users"></a>
    
    <p>For each <strong>manager user</strong>, the manager needs some information.
      This information is either added in the <span class="code">users.conf</span> config 
      file or by calling the 
      <span class="bold_code"><a href="snmpm.html#register_user">register_user</a></span> 
      function in run-time.
      </p>
    <p>Each row defines a <strong>manager user</strong> of the manager. 
      </p>
    <p>Each entry is a tuple of size four:
      </p>
    
    <p><span class="code">{UserId, UserMod, UserData, DefaultAgentConfig}.</span></p>
    <ul>
      <li>
        <p><span class="code">UserId</span> is any term (used to uniquely identify the user).</p>
      </li>
      <li>
        <p><span class="code">UserMod</span> is the user callback module (atom).</p>
      </li>
      <li>
        <p><span class="code">UserData</span> is any term (passed on to the user when calling the
          <span class="code">UserMod</span>.
          </p>
      </li>
      <li>
        <p><span class="code">DefaultAgentConfig</span> is a list of default agent config's. 
          These values are used as default values when this user registers 
          agents.
          </p>
      </li>
    </ul>
  

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

  <h3><a name="id81544">7.4 
        Security data for USM</a></h3>
    <a name="usm"></a>
    <a name="usm_user"></a>
    
    <p>The information about Security data for USM should be stored in a 
      file called <span class="code">usm.conf</span>, 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 
      <span class="bold_code"><a href="snmpm.html#register_usm_user">register_usm_user</a></span>.
      </p>
    <p>The corresponding table is <span class="code">usmUserTable</span> in the
      SNMP-USER-BASED-SM-MIB.
      </p>
    <p>Each entry is a term:
      </p>
    <p><span class="code">{EngineID, UserName, AuthP, AuthKey, PrivP, PrivKey}.</span>      <br>
<span class="code">{EngineID, UserName, SecName, AuthP, AuthKey, PrivP, PrivKey}.</span></p>
    <p>The first case is when we have the identity-function 
      (<span class="code">SecName</span> = <span class="code">UserName</span>).
      </p>
    <ul>
      <li>
        <p><span class="code">EngineID</span> is a string.</p>
      </li>
      <li>
        <p><span class="code">UserName</span> is a string.</p>
      </li>
      <li>
        <p><span class="code">SecName</span> is a string.</p>
      </li>
      <li>
        <p><span class="code">AuthP</span> is a <span class="code">usmNoAuthProtocol</span>,
          <span class="code">usmHMACMD5AuthProtocol</span> or <span class="code">usmHMACSHAAuthProtocol</span>.</p>
      </li>
      <li>
        <p><span class="code">AuthKey</span> 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 
          <span class="code">usmHMACMD5AuthProtocol</span> is used and 20 if 
          <span class="code">usmHMACSHAAuthProtocol</span> is used.</p>
      </li>
      <li>
        <p><span class="code">PrivP</span> is a <span class="code">usmNoPrivProtocol</span>, 
          <span class="code">usmDESPrivProtocol</span> or <span class="code">usmAesCfb128Protocol</span>.</p>
      </li>
      <li>
        <p><span class="code">PrivKey</span> 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 <span class="code">usmDESPrivProtocol</span> 
          or <span class="code">usmAesCfb128Protocol</span> is used.</p>
      </li>
    </ul>
  
</div>
<div class="footer">
<hr>
<p>Copyright © 1997-2012 Ericsson AB. All Rights Reserved.</p>
</div>
</div>
</div></body>
</html>